Comment on page


There are different type of Contracts used in DerpDEX, most of them falls under the below category:
  1. 1.
    Factory Contract:
    • The Factory contract is responsible for deploying and managing the creation of new instances of trading pairs or liquidity pools.
    • It provides a template for creating new pools and ensures standardisation across different trading pairs.
    • The Factory contract may also handle the registration and listing of newly created pools.
  2. 2.
    Router Contract:
    • The Router contract acts as the core routing mechanism within the DEX.
    • It facilitates the swapping of tokens between different liquidity pools or trading pairs.
    • Users interact with the Router contract to execute trades, allowing them to buy or sell tokens based on specified trade routes.
  3. 3.
    Liquidity Pool Contracts:
    • Liquidity Pool contracts are where liquidity providers contribute their funds, creating pools of tokens for trading.
    • These contracts enable users to add liquidity to the DEX by depositing token pairs in exchange for liquidity provider (LP) tokens.
    • Liquidity Pool contracts manage the liquidity ratio and pricing for the tokens within the pool.
  4. 4.
    NFT Position Manager Contract:
    • The NFT Position Manager contract is commonly used in decentralised exchanges that implement Automated Market Maker (AMM) models, such as Uniswap V3.
    • It allows liquidity providers to manage their positions in the liquidity pool as non-fungible tokens (NFTs).
    • Liquidity providers can adjust the price range and capital allocation of their positions within the pool using this contract.