LogoLogo
Trade Now
  • Trade Now
  • πŸ‘‹Welcome
    • About Demex
      • Roadmap
      • Terms and Conditions
      • Disclaimers
    • Getting Started
      • Depositing
      • Activate Account
      • One-Click Trading
  • πŸ’°Demex Rewards
    • πŸͺ‚Demex Points
      • Spins
      • Wheel of Fortune and Loot Boxes
      • Squads
      • DMX Token
      • FAQs
    • 🏁Demex Endgame: 50,000,000 Demex Points
    • πŸ’΅Demex Credits
    • πŸ’§User Pools
    • πŸ•™Past Events
      • 2022
        • Futures Trading Competition
          • Maker vs Taker #1
          • Maker vs Taker #2
        • Perpetuals Trading Competition
          • Top Gainers and Top Traders #1
          • Top Gainers and Top Traders #2
          • Top Gainers #3
      • 2023
        • Demex Trading Leagues
          • Demex Trading League
            • How to Register
          • Demex $100,000 Mega Marathon
            • Demex Trading League Vol 1
              • How to Register
            • Deposit Booster
            • Demex Trading League Vol 2
          • Demex Trading League (Round 3)
            • How to Register
          • Demex Trading League (Round 4)
          • LUNA Earn-A-Thon & Demex Trading League (Round 5)
          • Demex Trading League (Round 6)
          • SCRT Trading League
        • Earn-a-thons
          • Demex x StaFi ATOM Earn-A-Thon
          • Demex x Zilliqa ZIL Earn-A-Thon
            • How to Register
        • Trading Challenges
          • BNB Trading Challenge
            • How to generate your custom hashtag
          • NEO Trading Challenge
            • How to Register
          • OSMO Perp Trading Challenge
          • Perps Trading Challenge
        • Special Events
          • $500 Surprise Flash Promotion
          • Demex Incentivized Devnet (Ended)
            • Perp Pools Deposits
            • Base Vault and $CLP Staking
            • Fluo Dashboard (Deprecated)
              • Stake FLUO
              • Boost Rewards
              • esFLUO Rewards
            • Demex Trading League (Devnet)
              • How to Register
            • The HODL Lottery
              • How to Register
              • How to Count Your Tickets
      • 2024
        • Celestia Trading League
        • FOMO Points Booster
        • DeFi Points Booster
        • Celestia Points Booster
        • πŸ₯›milkTIA x Demex Points Booster Bonanza
        • BTCETH Points Booster
        • 🟠 Archway Trading League
        • βš›οΈ Cosmos Trading Competition
          • πŸ‹Whalecome to Demex
        • πŸ’―DeFi & FOMO Points Booster
        • πŸ’―DeFi & Layer 1 Points Booster
        • πŸ’§dATOM Lend and Trade Spins Promo
        • 🐸Perp Pool Incentives with Leap Wallet
        • πŸ‘‹Welcome #BackToDemex
        • πŸ₯›milkTIA Lend and Trade Spins Promo
        • πŸ›‘οΈLoss Protection
        • πŸƒβ€β™‚οΈSTRD Lend and Trade Spins Promo
        • 🐢Meme Traders Arena
        • πŸ›‘οΈLoss Protection Oct-Nov
        • πŸŒ™LUNA Lend and Trade Spins Promo
        • πŸ’―Modular Pool Points Booster
        • πŸ•°οΈMantle Lend & Trade Spins Promo
        • 🏎️Mantle Trading League
        • πŸ›‘οΈLoss Protection Dec 9 - 20
        • πŸ‘‘Mantle Trading League S2
      • 2025
        • πŸ”²Mantle Rewards Station: 30,000,000 Demex Points
        • πŸ”²Mantle Rush
        • πŸ”Loss Protection March 19 - 26, 2025
        • πŸŒ€Mantle Lend & Trade Spins Promo
        • πŸ’™Base Trading League
        • 🧒Base Lend & Trade Spins Promo
        • πŸ›‘οΈLoss Protection Feb 10 - 20, 2025
        • πŸ“#DemexContentQuest
        • πŸ“ˆ#PerpsOnDemex
        • πŸ‘₯Demex Referral Club
        • πŸ€–TradΜ‡emex Bot
  • πŸ“ŠTrade
    • Features
    • Perps & Futures
      • Pricing Engine
      • Margin Specifications
      • Liquidation Engine
      • Market Specifications
      • Pre-launch Perpetuals
      • Glossary
      • FAQs
    • Grouped USD Token
      • Constituent Criteria
      • Safety Features
      • Migration Guide
    • Fees
      • Trading Fees
      • Funding Fees
      • Network Fees
      • Deposit & Withdrawal Fees
      • Fee Delegation
      • CEX to Demex VIP Program
      • Fee Distribution
    • Notifications
      • Demex Progressive Web App (PWA)
    • Trading Modes
      • Lite Mode
      • Pro Mode
        • Features
        • Market Leverage
        • Order Types
        • Execution Options
        • Time-In-Force πŸ†•
        • Trigger (Stop) Orders
          • Take-Profit
          • Stop-Loss
        • Chart Trading πŸ†•
  • πŸ’°EARN
    • Liquidity Pools
      • Spot Pools
        • Earnings
        • Amplified Pools
        • Uneven Pool Weights
        • Multi-Pool Routing
        • FAQs
      • Perp Pools
        • Earnings
        • Deposting & Redeeming
        • AMM Strategy
    • Nitron (Lend & Borrow)
      • Lending
      • Borrowing
        • Avoiding Liquidations
      • Liquidation
        • Partial Liquidations
      • USC Stablecoin
        • Interest Rate Model
      • High Efficiency Mode (E-Mode)
      • Liquidations
        • Liquidation Guide
      • Strategies
        • Using Nitron for Perp Trading
      • Protocol Safety Features
      • Risks
    • Referrals
      • Sharing Your Referral Link
      • FAQs
      • Terms and Conditions
  • Stake SWTH / DMX
  • πŸ«‚COMMUNITY
    • Public Community Nodes
    • Feedback
    • Glossary
      • Annual Percentage Rate (APR)
      • Arbitrage
      • Decentralized Applications
      • Execution Options
      • Liquidation
      • Liquidity Pool
      • Liquidity Providers
      • Perpetual Pool
      • Open Interest (OI)
      • Order Book
      • Time-In-Force
      • Volume
      • Yield Farming
  • βš™οΈDevelopers
    • APIs Overview
    • WebSocket API
    • RPC API
    • EVM API
    • Insights API
    • Node CLI
    • Running a Node
      • Testnet
      • Mainnet
      • Public API Node
      • Validators
        • Commissions & Penalties
  • πŸ€–EVM
    • Overview
    • Deployment Tutorial
    • Interacting with Demex L1
      • Built-in Oracle Contracts
      • Precompiled Trading Contracts
    • ICS-20 <> ERC-20 Token Conversion
    • Explorers
Powered by GitBook
On this page
  • Overview
  • How it Works

Was this helpful?

  1. EARN
  2. Liquidity Pools

Spot Pools

No πŸ‘™ required.

PreviousLiquidity PoolsNextEarnings

Last updated 1 month ago

Was this helpful?

Overview

Powered by the , Demex was the first protocol to combine AMMs with order books on spot markets. This means that the liquidity pool module is able to interoperate with the order books to display AMM liquidity on the orderbook DEX in real-time.

As such, trading of spot markets is supported by liquidity pools. Liquidity providers (LPs) can earn fees from market maker rebates, spread, and protocol incentives.

How it Works

An order book is available for each coin pair. Users can submit both limit and market orders and transparently observe existing limit orders on order books. The orderbook helps to facilitate a good onboarding process for users who are familiar with orderbooks on CEXs.

Next, liquidity pools offer permissionless liquidity via smart contracts, bypassing the need for intermediaries.

When a user is swapping tokens, they are depositing tokens into the pool to remove a market rate amount of the other token. The effective price for the swap is determined by the ratio of tokens in the pool.

For a token pair, a liquidity pool can be created by anyone on Demex. By simply depositing a pair of coins (in corresponding ratios) into a pool, anyone can become a liquidity provider.

After approving the transaction, the AMM sends SWTH tokens into the ETH-SWTH pool. Finally, it sends the quoted amount of ETH from the pool to the user’s wallet.

To buy ETH (x) on Demex, users need to add SWTH (y) tokens to the pool. Note that k demands that the amount of liquidity remains constant. Therefore, by adding SWTH tokens, users increase one side of the pool and decrease the other (removing ETH).

The pool price is defined as the ratio of the number of quote coins and the number of base coins in the pool. For the coin pair A-B, the pool price is the number of coin B divided by the number of coin A in the pool.

In our example, the algorithm divides the pool's total liquidity by the new amount of SWTH in the pool, then divides that by the new amount of ETH in the pool so that (k / y) / x = price. This is how the protocol determines the price paid for ETH (and other tokens), which will increase the more ETH is bought from the pool.

AMM-Orderbook Hybrid

Under the hybrid model, users can play several roles:

  • Trader

  • Liquidity provider

As illustrated above, liquidity in the pool is automatically converted to orders to be submitted to the orderbook.

The AMM provided by the liquidity pool coexists with traditional market makers. This facilitates greater capital efficiency for traders who can enjoy the effectively abundant liquidity on the orderbook.

This allows liquidity to be used as efficiently as possible by the AMM so that LP earnings are maximized.

Let us imagine trading ETH tokens for SWTH tokens on . After swapping the tokens, the algorithm calculates how much the trade impacts the liquidity pool’s reserves, after which a price quote is given.

The liquidity of a token pair automatically makes orders in the orderbook of the token pair by the .

Liquidity pools also feature flexible bonding curves via and . On top of that, can route to a single market.

The protocol also certain core pools with additional incentives.

πŸ’°
Demex
Constant Product Market Maker (CPMM) model
Uneven Pool Weights
Amplification
multiple pools
rewards
Hybrid Liquidity Engine