EchoDEX Documents
  • 👋Overview
  • architecture
    • 🌎EcoDEX Ecosystem
    • ☄️EchoDEX ZkEVM
    • ✨Aggregator Liquidity
      • Smart Order Router (SOR) technology
    • 💧Liquidity Protocol
      • EchoDEX AMM
      • Price discovery
  • economy
    • 💵Fees
    • 🎁Swap To Get xECP
    • 📈$ECP Tokenomics
    • 🥇$ECP Loyalty Program
    • 🎯xECP
  • API Documents
    • ⛓️Subgraph
    • ⛓️Restful API
  • Go to
    • 💻Our Socials
    • 🗺️Roadmap
    • ✅Audit Docs
    • ⚙️Technical Information
Powered by GitBook
On this page
  1. architecture
  2. Liquidity Protocol

EchoDEX AMM

PreviousLiquidity ProtocolNextPrice discovery

Last updated 2 years ago

To further explain how the EchoDEX Liquidity protocol works, consider a simple example of a liquidity pool containing two tokens, A and B

Let x be the initial supply of token A in the liquidity pool, and y be the initial supply of token B in the pool, such that x = y.

When a trader wants to buy token A using token B, they swap δB amount of token B for δA amount of token A, where δA/δB = x/y. The new supply of token A, x', and token B, y', in the liquidity pool is given by:

x′=x−δAy′=y+δBx' = x - δA y' = y + δBx′=x−δAy′=y+δB

The total value of the pool, represented by the constant product, is given by:

xy=x′y′xy = x'y'xy=x′y′

As the trader buys more token A, the supply of token A in the pool decreases and the supply of token B increases, such that:

dx/dt=−δAdy/dt=δBdx/dt = -δA dy/dt = δBdx/dt=−δAdy/dt=δB

The price of token A in terms of token B is given by:

P=y/xP = y/xP=y/x

As the pool's supply of token A decreases, the price of token A in terms of token B increases, reflecting an increase in demand for token A.

The EchoDEX Liquidity protocol ensures that liquidity providers (LPs) are incentivized to provide liquidity to the platform by earning fees based on the percentage of the liquidity pool they provide, which is determined by the number of assets they deposit.

The EchoDEX Liquidity protocol provides a decentralized alternative to centralized exchanges, enabling trustless trading of assets. The AMM model and the constant product market-making formula provide a mathematical basis for the price-setting mechanism in a liquidity pool, ensuring that the platform can adjust asset prices automatically based on supply and demand. EchoDEX's unique features and governance structure make it a popular choice among traders and liquidity providers in the decentralized finance (DeFi) ecosystem.

💧