Pools
Last modified:

How pools work
Each CenturionDEX v2 pool is a trading venue for a pair of ERC20 tokens. A new pool starts with zero reserves — someone must seed it with an initial deposit of both tokens. This first liquidity provider sets the initial price. They are incentivized to deposit at the prevailing market rate: any deviation creates an immediate arbitrage opportunity.
Subsequent liquidity providers deposit tokens proportional to the current reserve ratio. Depositing at a different ratio exposes the added liquidity to arbitrage.
Pool tokens

When liquidity is deposited, the pool mints liquidity tokens to the provider's address. These tokens represent a proportional claim on the pool's reserves. For the first deposit, the number of tokens minted equals sqrt(x * y), where x and y are the deposited amounts.
A 0.3% fee is charged on every trade and added directly to reserves. This increases the value of outstanding liquidity tokens — a continuous, pro-rata payout to all LPs.
To withdraw, LPs burn their liquidity tokens and receive their share of reserves plus accrued fees. Liquidity tokens are standard ERC20 tokens and can be transferred, sold, or composed into other protocols.
Further reading:
Why pools instead of order books?
Order books require infrastructure to host and match orders, creating points of centralization. They demand active management from market makers using sophisticated tooling, limiting participation. They were designed for a world with relatively few traded assets — a poor fit for an ecosystem where anyone can create a token, most of which have low liquidity.
CenturionDEX pools take advantage of Ethereum's properties: trusted code execution, a perpetually running virtual machine, and permissionless access. A pool is just a smart contract — swapping tokens calls swap, providing liquidity calls deposit. No intermediary, no permission required.
Developer resources
- Providing Liquidity — adding and removing liquidity from a smart contract