Skip to main content
lifi.bridge sends a token from the flow’s chain to another chain through the LI.FI aggregator. It consumes a resource on amountIn and produces amountOut, a resource of the resourceOut token on the destination chain. At compile time the op fetches one LI.FI quote, which picks the bridge and any source-chain swap step. The transaction calls the LI.FI router with that quote’s calldata. For a swap on the same chain, use lifi.swap.

Ports

amountOut is a future output: it takes no guards and can’t feed another op in the same flow, except a continuation.settle node. unspentIn follows the lifi.swap rules.

Config

Tool keys are the key values from the LI.FI API’s GET /v1/tools, for example across, stargateV2 or relaydepository.

Example

Bridge 1,000 USDC from Arbitrum to a recipient on Base:
This is the deliver-only path: the tokens land at destination and nothing runs on Base. To run more steps once they arrive, see Bridge into a continuation; to pick between the two, see Which cross-chain path?.

Track the delivery

The compile result describes bridge.amountOut before you send anything:
  • amount.minimum.value is the floor the bridge quote guarantees on the destination chain. amount.estimate.value is the quote’s expected amount, which is not enforced.
  • delivery.provider is the LI.FI tool key of the chosen bridge, for example across.
  • delivery.etaSeconds is the quote’s estimated delivery time. It is absent when the bridge publishes no estimate.
After the source transaction confirms, poll the LI.FI API’s GET /v1/status with the transaction hash as txHash and delivery.provider as bridge. See Transaction status tracking for the status values. The bridge call’s sender is the signer’s execution proxy (result.userProxy), not the wallet: the quote names the proxy as fromAddress. So a bridge that fails and refunds on the source chain returns the tokens to the proxy. To move them to the wallet, compile a flow on the source chain for the same signer that reads the proxy’s balance with core.balanceOf and sends it to context.sender with core.transfer, as shown in Non-transferable terminal resources.

Bridge into a continuation

amountOut can fund a continuation.settle node on the destination chain. Bind the settle node’s input to bridge.amountOut and omit the bridge’s destination; the compiler quotes the bridge with the escrow as receiver. The settle node’s expiry must leave room for the bridge: at least three times the quoted ETA, and never less than 30 minutes. See Cross-chain flows and the Bridge and deposit recipe.

Errors