SunSwap V3 Overview
Keywords of SunSwap V3: market making model, liquidity pool, and swap
Background
While SunSwap V2 achieved remarkable success in decentralized trading, it also has its limitations. One of its key drawbacks is the underutilization of liquidity. To address this issue, SunSwap V3 introduces a concept called concentrated capital efficiency. This mechanism empowers liquidity providers to concentrate their funds within a specific price range, thereby allowing them to provide liquidity more effectively and earn higher rewards within a price range featuring high price volatility.
Developed by the SUN.io team, SunSwap V3 was launched in June 2023. It introduces a new trading model called "concentrated liquidity". With this new model, liquidity providers can allocate their funds to a specific price range rather than a fixed trading pair, which improves the efficiency of liquidity and offers better prices for traders. SunSwap V3 has also introduced flexible fee tiers, allowing liquidity providers to set different fee rates for different price ranges accordingly, which generates higher returns for liquidity providers and incentivizes them to provide more liquidity.
Mechanism
The swap logic can be inferred from the constant product formula. Here, x and y represent the respective reserve balance of the tokens involved (token0 and token1):
L stands for liquidity, and the liquidity of a pool can be calculated from the reserve balance of the tokens involved. Based on the formula, the product of x and y (denoted as k) remains constant.
Therefore, we can measure the liquidity of a pool by L is actually the geometric mean of x and y.
Dividing y by x, we can get the prices of token0 and token1. Since the prices of the two tokens in the pool are reciprocal to each other, we'll only use one of them when doing the calculation (SunSwap V3 uses y/x).
L also indicates the relation between the change of the output amount and the change of p:
Proof:
,, thus:
Last updated