- 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
lifiSwaptool. 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.
- Otto uses the Li.Fi SDK’s
getQuotefunction 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.
