πŸ’ΈSwaps

At the end of the day, the 2sAMM is still a constant product AMM and thus the implied price is still computed the same way. Just like uniswap V3, the ratio of the implied token balances determine the swap price. If you only consider the net liquidity in our pools (the Maker minus the Taker liquidity), then our pools behave identically to Uniswap V3. The exact details can be found in the Uniswap V3 whitepaper.

Swap Fees

Similar to Uniswap V3's design, every time there is a trade the trader pays a fee. A small percent (currently 5%) of trading fee is deposited into the protocol to help fund its operation and growth. The rest is split pro-rata amongst all in-range liquidity providing positions (colloquially called Makers).

Unlike UniswapV3 however, the fee rate is dynamic (look forward to a technical deep dive on the economics of this on our blog). The fee rate scales according to the ratio of liquidity reserved by Takers to the liquidity provided at a given price. For example, if there is no liquidity reserved away at the current price then the lowest possible fee rate is paid (currently 0.01%). If half of the liquidity provided is reserved away then a higher fee is charged (currently 0.5%), and if all liquidity is reserved then the fee caps out at 5%. In practice we never want all the liquidity to get reserved, so we cap the amount that can be reserved to something like 70% depending on the volatility of the pool.

Here is an example fee rate curve:

This has the nice property of automatically raising fee rates when the market becomes volatile, thus compensating liquidity providers more for their potential losses; and lowering fee rates when the market is calm with little price action to encourage more trading. Sometimes lower fee rates with more volume can earn more total fees than higher fee rates, it all simply depends on market volatility.

This means there is no need to fragment liquidity in multiple pools with different fee tiers for a single token pair like Uniswap does.

The short reason why this fee design works is because the Takers tell us about implied volatility. If the fee rate is too low, then it is profitable to open a Taker which then raises the fee to something more fare. If the fee rate is too high, then Takers will close to positions thus dropping it back down. This lets the market naturally find a fee equilibrium.

Last updated