Based on community feedback as well as core team research, there are 2 problems with the pDEX AMM mechanism.
1. Friction in liquidity provision - providers must contribute both sides of a pair. This requires LPs to forfeit long positions on their tokens and take on exposure to other assets in the pool.
2. Impermanent loss (IL for short) - the difference between holding tokens in an AMM and holding them in your wallet.
The Provide feature currently allows LPs to contribute single-sided liquidity, but can be improved significantly in terms of sustainability and autonomy. This topic briefly details a new idea for an economically sustainable design that eliminates potential loss from IL; a LP mechanism that enables single currency contributions, supported by trading fees and possibly liquidity mining rewards (TBD, please see the final paragraph for initial thoughts).
It is important to note here that contrary to other AMM protocols, pDEX v.2 uses its protocol token, PRV, as the counterpart asset in every pool. This enables the protocol to co-invest in pools alongside liquidity providers (LPs).
If a liquidity provider (LP) only wants to contribute a non-PRV asset (let’s take USDC as an example), then the Incognito protocol will provide PRV to match that contribution as a co-investment. That match happens at the current pool exchange rate, meaning the relative pool balance will not change pre or post contribution.
Contribute pUSDC (privacy USDC in Incognito)
The process for contributing pUSDC is as follows:
- LP supplies an amount of pUSDC. If it is verified that the protocol holds less PRV than the required limits (specific to the pool), this action will fail until more PRV is freed up from the protocol by LPs providing PRV.
- According to the current pool rate, the protocol provides the same value of PRV tokens as deposited pUSDC.
- pUSDC from the LP and PRV from the protocol are supplied to the pool
- LP’s Share balance is updated (increased by 50% of the issued shares)
- Protocol’s Share balance is updated (increased by 50% of the issued shares)
After this process, both the LP and the protocol have increased their Share balance. Note that Shares owned by the LP and Shares owned by the protocol earn fees from swap transactions in the pool.
When a LP decides to remove the single-sided pUSDC position from the pool, the following steps are executed:
- LP inputs pUSDC amount to be withdrawn, up to 100% of their contribution.
- Based on the percentage of Shares owned by the LP correlating with their contribution, the system determines the amount that can be withdrawn by the LP from the pool.
- If there is sufficient pUSDC in the pool to pay the LP fully in pUSDC, then pUSDC will be the only settlement currency. Otherwise, the settlement amount will include an amount of PRV based on the delta to the withdrawn amount.
- When the LP receives PRV, tokens are locked for a set period of time (e.g. 24h), to disincentivize panic liquidations.
- New Pool amounts are updated.
PRV contributions can be made at any point, but amounts must correspond to how much pUSDC is currently supplied by LPs. It is only possible to make PRV contributions when the protocol holds the corresponding Shares (as a result of pUSDC contribution in this example).
The process for contributing PRV is as follows:
- LP supplies an amount of PRV.
- The value of PRV in Shares is calculated according to the current rate.
- If it is verified that the protocol holds enough Shares, the action will be executed. If not, it will fail.
- PRV deposited is burned.
- Shares held by Incognito Protocol are transferred to the LP.
When a LP decides to remove the single-sided PRV position, the system will compute how much PRV the LP needs to receive:
- LP inputs the amount of PRV to be withdrawn, up to 100% of the PRV contributed.
- The associated Shares are moved under the protocol’s ownership.
- The settlement value is equal to the amount withdrawn.
- PRV is distributed to the LP according to the settlement value from the Incognito Protocol reserve.
- When the LP receives PRV, the tokens are locked for a set period of time (e.g. 24h), to disincentivize panic liquidations.
Call for feedback
This topic simply outlines an initial idea for redefining the pDEX LP mechanism. There are a few open questions yet to be answered. Feedback is always welcome.
1. PRV is needed to match a non PRV contribution as a co-investment. A straightforward and decentralized source is a percentage of the block reward. If this route is pursued, block mining rewards for validators would decrease by the corresponding percentage. A preliminary tokenomic document for pDEX v.2 will be published soon, with more concrete numbers for further discussion. In the meantime,
What do you think about this approach to protocol sustainability that rewards all forms of contribution?
2. In addition to withdrawing non-PRV tokens, the single-sided LP may sometimes receive additional compensation in PRV based on the delta to the withdrawn amount (see the section on removing pUSDC for more details).
If PRV must be locked for a set period of time (e.g. 24h) to mitigate panic liquidations, how can we mitigate the impact on UX?
If you have any ideas or questions, please share them. We’d love to work out the answers with you.