Base & Quote Tokens
quote are two concepts that will be mentioned frequently. Two easy ways to distinguish between them are:
- In a trading pair, the
baseis always the token before the hyphen, and
- In transactions, price refers to how many
quotetokens are needed in exchange for one
For example, in the ETH-USDC trading pair, ETH is the
base token and USDC is the
The funding pool of PMM is described by four parameters:
- : base token regression target - total number of base tokens deposited by liquidity providers
- : quote token regression target - total number of quote tokens deposited by liquidity providers
- : base token balance - number of base tokens currently in the pool
- : quote token balance - number of quote tokens currently in the pool
PMM Pricing Formula
The PMM price curve is plotted by the following pricing formula:
Where is defined to be the piecewise function below:
is the market price provided by an oracle, and is a parameter in the range (0, 1).
The Three Possible States in PMM
At any given time, PMM is in one of three possible states: equilibrium, base token shortage, and quote token shortage.
Initially, i.e. prior to any transaction, the capital pool is in equilibrium, and both base tokens and quote token are at their regression targets. That is, and .
When a trader sells base tokens, the base token balance of the capital pool is higher than the base token regression target; conversely, the quote token balance is now lower than the quote token regression target. In this state, PMM will try to sell the excess base tokens, lowering the base token balance and increasing the quote token balance, in order to move this state back to the state of equilibrium.
When a trader buys base tokens, the quote token balance of the capital pool is higher than the quote token regression target; conversely, the base token balance is now lower than the base token regression target. In this state, PMM will try to sell the excess quote tokens, lowering the quote token balance and increasing the base token balance, in order to move this state back to the state of equilibrium.
The parameter in the pricing formula above assumes a critical role in facilitating this regression process. The more the capital pool deviates from the equilibrium state, the more deviates from
1. When the price given by the PMM algorithm deviates from the market price, arbitrageurs step in to help bring the capital pool back to the equilibrium state.
Liquidity Provider Fee
A small amount of transaction fee will be charged on every trade. This fee is called the liquidity provider fee and will be distributed to every liquidity provider based on their proportional stake in the capital pool.
More specifically, liquidity provider fees are collected from what buyers received and distributed to liquidity providers who supplied this kind of asset to the capital pool. In other words, liquidity providers are rewarded in the same asset denomination.
For example, when traders buy ETH tokens with USDC tokens, liquidity provider fees will be charged in the form of ETH tokens, and distributed to liquidity providers who deposited ETH tokens into the capital pool.
When traders sell ETH tokens for USDC tokens, liquidity provider fees will be charged in the form of USDC tokens, and distributed to liquidity providers who deposited USDC tokens into the capital pool.
Base and quote tokens have different returns on investments (ROI) in PMM's funding pool.
A maintainer fee is also collected from what buyers received, and will be directly transferred to the maintainer. The maintainer may be a development team, a foundation, or a staking decentralized autonomous organization (DAO).
Currently, the maintenance fee on DODO is 0.
A withdrawal will change the PMM price curve and may harm the interests of other liquidity providers. DODO charges a withdrawal fee from liquidity providers who withdraw their assets and distribute it to all remaining liquidity providers.
Normally, the withdrawal fee is 0 or an extremely small percentage (<0.01%) of what you withdraw. The withdrawal fee will increase significantly only if the funding pool suffers from a serious shortage of either base or quote tokens and liquidity providers intend to withdraw the type of token in shortage.
The withdrawal fee serves as a protection mechanism for liquidity providers who maintain their supplies of liquidity and contribute to the sustainability and overall health of the DODO platform.
Rewards will be distributed to those who make a deposit of base(quote) tokens when the capital pool faces a shortage of base(quote) tokens.
In the next section, we will explain the math behind these core concepts.
, the "Liquidity Parameter"Flexibility and
Last but not least, we will introduce the DODO's "liquidity parameter", . The parameter gives DODO the flexibility to handle different market situations.
When is , DODO naively sells or buys at market price, as shown by the flat, blue line. As increases, DODO’s price curve becomes more “curved”, but, consequently, liquidity becomes increasingly jeopardized, because more funds are placed far away from market price and are thus underutilized or not utilized at all. When increases to , the flat section near the market price is completely eliminated and the curve essentially becomes a standard AMM curve, which Uniswap uses.
Normally, is recommended to be a relatively small value, such as , which could provide liquidity 10 times better than the standard AMM algorithm.