Nucleo AMM
Multi Hop Swap
For this example, consider two pools. One ETH/USDC pool, and one USDC/MEME pool. Swapper wants to sell ETH on Arbitrum for MEME on Solana.
- User interacts with the Satellite Contract on Arbitrum to initiate a "multi-hop-swap" action
- The Application Contract on Arbitrum transfers ETH from the user to the contract
- The Task Gateway receives the intent and forwards it to the Task Executors network
- Task Executors verify the action is valid and correct parameters have been specified
- If valid, the executors update their shared AMM state, update the pool reserves, and send back the results to the Task Gateway. Internally, this requires swapping ETH -> USDC and then USDC -> MEME
- The Task Gateway aggregates the execution results and sends a response to the Satellite Contract on Solana
- The Application Contract on Solana transfers MEME to the user's address