How It Works

  1. The user makes a tx (the only tx that the user makes in the whole flow) which creates a Request on Autonomy that asks Autonomy to call the limits/stops contract. Initially this Request is impossible to execute, because the condition is codified in a require statement - any tx that tries to execute the Request will revert. This check is done on the actual input/output amounts of the trade, and is therefore a guarantee that the user will always get the trade they want, and doesn't need to rely on an oracle. The user still has their tokens in their wallet.

  2. The price on the DEX drops to $900 as 3rd parties trade on it.

  3. The Autonomy bots are constantly simulating whether executing a Request will succeed or revert. If they see it would succeed, that means that the condition for the trade is now true, and the require statement won't make the tx revert. This means the bot can know when a trade can be executed without knowing anything about tokens or prices or oracles. The bot now executes the Request, which atomically swaps the user's input token to the output token and it shows up in their wallet. At no point does the bot ever have control over the user's tokens.

Last updated