Ambient Docs
  • Introduction to Ambient
  • Concepts
    • AMMs
    • Concentrated Liquidity
    • Knockout Liquidity
    • Governance & Policy
    • Surplus Collateral
    • Permissioned Pools
    • Account Abstraction
  • Users
    • Swaps
    • LP Positions
    • Surplus Collateral
    • Dynamic Fees
    • Knockout Positions
    • Initializing Pools
    • Gasless Transactions
    • External Routers
  • Governance & Policy
    • Ops & Treasury Multisigs
    • Policy
    • Upgrading Code
    • Emergency
  • Developers
    • Deployed Contracts
    • Token Transfers
    • Type Conventions
    • DEX Contract Interface
      • userCmd Callpaths
      • Swaps
        • Hot Path Swap Migration
          • Directly Calling CrocSwapDex
          • External Swap Router
      • Flat LP Calls
      • Long Form Orders
      • Knockout LP Calls
      • Pool Initialization
      • Surplus Collateral
      • Router Calls
      • Relayer Calls
    • Query Contracts
      • CrocQuery Contract
      • CrocImpact Contract
    • Logs and Queries
    • Libraries and APIs
      • SDK
      • Indexer API
      • Subgraph
Powered by GitBook
On this page
  1. Users

External Routers

Generally most operations can be carried out by directly interacting with the single DEX contract, obviating the need for the typical router contracts seen in most AMM designs.

However Ambient does support the ability for users to approve external contracts to call operations on their behalf. This is useful for cases where a user wants bespoke logic, or wants to use Ambient through another protocol.

Users can approve an external contract address to call Ambient on their behalf for a fixed or unlimited number of times. Users should be very careful before approving any router contract, as it can execute arbitrary logic, including taking their positions on its own behalf.

PreviousGasless TransactionsNextOps & Treasury Multisigs

Last updated 1 year ago