Swaps and bridges
Ask any DeFAI agent to swap tokens or bridge assets, and it prepares an inline execution panel. Routing is handled by LI.FI, which aggregates DEX liquidity across 35+ chains to find the optimal path.How to use
"Swap 100 USDC to ETH on Base""Bridge 500 USDC from Ethereum to Base""How much ETH can I get for 1000 USDC?"
Swap flow
1
Agent prepares quote
The agent queries LI.FI for the best route, considering slippage, gas costs, and liquidity depth. The result renders as a DefiSwapQuotePanel or SwapExecuteInline.
2
Quote panel displays
Depending on the response, you see:
- Full quote: From token → To token with amounts, price impact, gas estimate, route details
- Token price: Quick price lookup
- Available tokens: List of tradeable tokens on the selected chain
- Suggestions: Clickable suggestion chips for follow-up actions
3
Confirm execution
The SwapExecuteInline panel shows:
- Token icons and symbols for from/to
- Exact amounts
- Price impact percentage
- Gas estimate
- Route path
4
Multi-step progress
The execution follows these steps:
- Check — verify balance and network
- Approve — token approval signature (if needed)
- Execute — swap transaction
- Done — completion with transaction hash
5
Feedback message
On success or failure, the agent automatically sends a feedback message to the chat confirming the outcome. Wallet data is refetched to update balances.
Cross-chain bridges
Cross-chain transfers use the same flow but with Circle CCTP or LI.FI bridge routes:- Circle CCTP: USDC transfers between Base ↔ Ethereum ↔ Polygon ↔ Arbitrum. Native USDC bridging with no wrapped tokens.
- LI.FI: Aggregated bridge routes across 35+ chains for any supported token.

