According to the design of concentrated liquidity in Uniswap V3, we can define an AMM curve (Eq.M-1) which acts like a constant product pool with larger reserves within a specific price range [pa,pb] ( current price pc∈[pa,pb] ). The real reserves of the two tokens in the pool can be disproportionate when the tokens are traded within the defined range.
(x+pbL)⋅(y+Lpa)=L2 (Eq.C-1)where x:=the real reserve of token0y:=the real reserve of token1pa:=lower bound of token1 to token0 pricepb:=upper bound of token1 to token0 priceL:=virtual liquidity of the poolx+pbL:=virtual reserve of token0y+Lpa:=virtual reserve of token1
In TermMax, we put our Fixed-Rate Token (FT) and X Token (XT) as token0 and token1 in the AMM pool. FT and XT are minted by the Underlying Token (UT, e.g. USDC) and Initial LTV (ILTV, e.g. 0.9) defined in the pool (Eq.M-2). Liquidity providers can provide 1 USDC and mint 0.9 FT (worth 0.9 USDC at maturity) and 1 XT (worth 0.1 USDC at maturity) and the market price will remain the same.
mint FT and XT from UTUT:FT:XT=1:ε:1 (Eq.C-2)
As mentioned above, the real reserves of FT and XT provided in the pool are disproportionate. Therefore, we apply the same AMM curve as Uniswap V3 in TermMax.
In addition, to adjust the slippage according to liquidity in the pool and market demand, we define a Liquidity Scaling Factor (γ) to increase the virtual liquidity as γ−1L and derive virtual liquidity x′ and y′ from Eq.C-1.
subject to x′⋅y′=(γ−1L)2⇒x′=γ−1(x+pbL)∧y′=γ−1(y+Lpa)⇒γ−1(x+pbL)⋅γ−1(y+Lpa)=(γ−1L)2 (Eq.C-3)
In TermMax, we set pb=∞ (the upper bound of the XT to FT price) and derive Eq.C-4 from Eq.C-3
γ−1x⋅γ−1(y+Lpa)=γ−2L2 (Eq.C-4)
With variable substitution, we can derive Eq.C-5 from Eq.C-4