📄
Autonomy Docs
  • Autonomy Network
    • Overview
    • Use Cases
    • System Components
      • Registry
      • Requests
      • Executors
      • StakeManager
    • Products
      • AutoSwap
        • How It Works
        • Integrating Limits/Stops Into Your DEX
        • Limits & Stops SDK
      • AutoHedge
        • How to Use AutoHedge
        • Return/Profit Analysis
        • How It Works
        • How It Works (detailed)
          • Derivations
        • Links
      • AutoStation
        • Tutorial 1: Create A Condition And Upload It
          • Part 1: non-recurring
          • Part 2: recurring
          • Part 3: uploading to AutoStation
          • Part 4: bonus - how to call manually
        • Tutorial 2: Example automation using AutoStation
  • Developers
    • How to create a Request
    • Deployed Contracts
Powered by GitBook
On this page
  • UniswapV2 Forks
  • Other DEXes

Was this helpful?

  1. Autonomy Network
  2. Products
  3. AutoSwap

Integrating Limits/Stops Into Your DEX

PreviousHow It WorksNextLimits & Stops SDK

Last updated 2 years ago

Was this helpful?

Especially after the collapse of FTX, centralized exchange (CEX) users are moving to DEXes, compounding the trend of DEX volume eating up CEX volume. Currently DEXes typically only provide market orders, and these new users coming from CEXes are demanding the features they're used to using - namely, limit orders and stop losses. Fortunately it's easy to add these onto an existing DEX without any modification to the underlying DEX! is an example of this.

Generally, as with anything on Autonomy, the condition and action of a Request needs to be defined in a smart contract so that the condition can be guaranteed - this is the smart contract that is the target of a Request . The same condition/action contract can be used for many DEXes that have the same interface, such as UniswapV2 forks. DEXes that are unique require a modified condition/action contract that uses the interface of the unique DEX.

UniswapV2 Forks

The condition/action contract for UniswapV2 forks and is deployed on many EVM chains! Integrating limits/stops into your DEX therefore requires no new contracts to be deployed, it only requires modification to your UI.

Fortunately this modification is made even easier with our frontend SDKs:

Other DEXes

If your DEX is not a UniswapV2 fork, then the needs to be modified slightly to use the interface of your DEX. This can be done by your team or Autonomy depending on the specific situation - hop into our Discord and create a ticket to chat with us about your situation! Either way it should require fairly minor changes and take only 1-2 weeks.

AutoSwap
already exists
https://www.npmjs.com/package/@autonomylabs/limit-stop-orders
https://www.npmjs.com/package/@autonomylabs/limit-orders-react
UniswapV2 condition/action contract