Starting the pool
Last modified:
Starting the pool
Suppose a liquidity provider initializes an empty CenturionDEX v2 pool by depositing units of token and units of token . Since the pool has no pre-existing reserves, there is no reserve ratio that the initial deposit must satisfy. Therefore, any positive pair can be used to create the pool, and these deposited amounts become the initial reserves of the AMM.
Following the Centurion v2-style initialization rule, the amount of LP tokens minted at pool creation is determined by the geometric mean of the initial reserves. More precisely, if , then on-chain the first liquidity provider receives
provided that
since the on-chain Math.sqrt returns the integer floor of the square root. Equivalently, the smallest that allows a successful first deposit is .
In addition, 1000 LP tokens are permanently locked by minting them to an unrecoverable address. Hence, the total LP token supply after initialization is
It follows that, once the pool has been created, the total LP token supply is always bounded below by 1000. In practice, this permanently locked amount is negligible for a normally sized pool, but it ensures that a minimum quantity of LP tokens can never be redeemed.