L2 Bridge & Vault Compose
Move stablecoins across chains and into a yield position in a single user operation. Built on LayerZero V2 OFT and VaultComposerSync.
The pattern
Section titled “The pattern”Source chain Destination chain───────────── ─────────────User OFT.send() ──► LZ V2 endpoint ──► OFT.receive() ──► VaultComposerSync.deposit()The user signs once. The bridge transport and the destination vault deposit are composed — the recipient on the destination chain is the vault, with the user’s deposit credited atomically.
Use cases
Section titled “Use cases”- Settlement to a yield position. Customer pays on Base; funds land in an sUSDe vault on Ethereum.
- Treasury rebalancing. Move idle USDC from Arbitrum to Base and deposit into a yield strategy in one step.
- Cross-chain checkout. Accept payment on any supported chain, settle on the chain you operate from.
Quote a bridge
Section titled “Quote a bridge”curl -X POST https://api.stablecoinx.com/v1/bridge/quote \ -H "Authorization: Bearer $STABLECOINX_KEY" \ -H "Content-Type: application/json" \ -d '{ "fromChain": "arbitrum", "toChain": "base", "asset": "USDC", "amount": "10000", "composeAction": { "type": "vault_deposit", "vault": "sUSDe" } }'Response:
{ "quoteId": "qte_01HX2K9...", "estimatedTime": "90s", "fees": { "bridge": "0.50", "gas": "0.15", "total": "0.65" }, "minReceived": "9999.35", "expiresAt": "2026-05-26T17:05:00Z"}Execute
Section titled “Execute”Submit the quote with a signature from the holding wallet:
curl -X POST https://api.stablecoinx.com/v1/bridge/execute \ -H "Authorization: Bearer $STABLECOINX_KEY" \ -d '{ "quoteId": "qte_01HX2K9...", "signature": "0x..." }'You get back a transferId to poll or subscribe to via webhook.
Settlement stepper
Section titled “Settlement stepper”Each transfer moves through observable legs:
| Step | State | Typical duration |
|---|---|---|
| 1 | source_pending | < 12s |
| 2 | in_flight (LayerZero in transit) | 30–90s |
| 3 | dest_received (compose pending) | < 6s |
| 4 | composed (terminal) | — |
If a leg stalls, the transfer’s status payload includes a recoveryAction describing what’s required to unstick it.
Error paths
Section titled “Error paths”| Error | Recovery |
|---|---|
| Destination compose reverts | OFT funds are credited to the recipient; retry the compose via POST /v1/bridge/{id}/retry-compose. |
| LZ message stalls | Manual retry via the LayerZero Scan dashboard, then re-poll status. |
| Insufficient gas on destination | Top up the relayer, or switch to a Paymaster-sponsored compose. |
Gas model
Section titled “Gas model”- Source gas — paid by the wallet executing
OFT.send(). Sponsorable via the Paymaster. - Destination gas — covered by the LayerZero relayer fee, embedded in the quote.
Supported routes
Section titled “Supported routes”| From | To | Asset |
|---|---|---|
| Base | Arbitrum, Optimism, Ethereum | USDC, USDT, sUSDe |
| Arbitrum | Base, Optimism, Ethereum | USDC, USDT, sUSDe |
| Optimism | Base, Arbitrum, Ethereum | USDC, USDT, sUSDe |
| Ethereum | Base, Arbitrum, Optimism | USDC, USDT, sUSDe |