total LP tokensβ net asset value, in USD, equal to LPβs cash after instantly closing all user positions without fee
s
net position of each currency in USD for all users. = (loi-soi)
pr
Oracle price of each currency
execution price of each currency
When calculating the mint and redeem process, Symmetry's algorithm looks at its impact on the overall welfare of the LP holders. Specifically:
When a liquidity provider mints lp tokens, it reduces the risk (or does not change the risk) other LPs take (from acting as the counterparty of traders). Therefore, lpmintβ=lporacleβ
When a liquidity provider redeems lp tokens, it adds risks (or does not change the risks) other LPs take. Therefore, lpredeemββ€lporacleβ
Let's go through the calculation with examples. Note: the following examples do NOTincludegas fees.
If someone wants to mint 250,000 lp, how much USDC would he need (assuming the USDC's price remains at $1)?
lporacleβ=1,000,000100,000,000β=$100
250,000Γlporacleβ=$25,000,000=
Redeem
If someone wants to redeem 250,000 lp, how much USDC could he get (assuming the USDC's price remains at $1)?
The maximum liquidity available for redemption is LPβββ£sβ£=$90,000,000.
lporacleβ=1,000,000100,000,000β=$100
Every lp can be viewed as holding 0 BTC-USDC position and 1,000,000β10,000,000β=$β10 ETH-USDC position. Thus, 250,000 lp would hold 0 BTC-USDC position and $-2,500,000 ETH-USDC position.