Requesting Swaps
Otto can help you perform token swaps on the same blockchain using the Li.Fi aggregation service for optimal routing
Supported Chains for Swaps: You can perform same-chain swaps with Otto on various networks. For a detailed list of chains Otto supports for swaps and the Li.Fi DEX aggregators available, refer to our Supported Chains & Li.Fi Integrations page.
Steps:
-
Ensure DeFi Agent is Active: Select the “Otto AI DeFi Agent” tab.
-
Formulate Your Request: Clearly state your intention to swap tokens on a specific chain. Include:
- The word “swap”.
- The amount and symbol of the token you want to sell (e.g., “0.5 WETH”).
- The symbol of the token you want to buy (e.g., “USDC”).
- The name of the blockchain (e.g., “on Arbitrum”, “on Base”).
-
Example Request:
-
Send the Message: Type your request into the input box and send it.
-
Review the Plan: Otto will analyze your request and use the
lifiSwap
tool. It will present a plan including:- A summary of the swap.
- The specific route or DEX likely to be used (provided by Li.Fi, e.g., Uniswap, SushiSwap).
- A prompt asking you to confirm.
-
Confirm or Cancel:
- Click “Confirm” to proceed with the planned swap.
- Click “Cancel” if you don’t want to proceed.
-
Wallet Approval: If you confirm, Otto (via Li.Fi and your wallet connection) will prompt you to approve the transaction in your connected wallet. You must approve it there to execute the swap.
Behind the Scenes:
- Otto uses the Li.Fi SDK’s
getQuote
function to find the best swap route based on your parameters. - The DeFi hook handles the execution logic after your confirmation.
- The source chain and destination chain will be the same for same-chain swaps.