Handling Liquidity Withdrawals and Adjustments

When a user deposits stablecoins into a project vault, Plit Protocol calculates the amount of ABC tokens needed to match the value of the stablecoins provided and creates a new contract to hold the tokens. The new contract will hold 50% ABC tokens and 50% stablecoins provided by the user.

Instead of receiving LP tokens in exchange for providing liquidity, the user will receive an NFT that represents the number of stablecoins in the newly created contract. The NFT is linked to the newly created contract's address, which allows for the exact calculation of fees and the number of stablecoins available for withdrawal.

If a user wants to withdraw their stablecoins, they can redeem their NFT, and the newly created contract will transfer the stablecoins and fees to the user. The remaining ABC tokens in the newly created contract will be sent to the project vault, which can use them for future liquidity provision.

Adjustments

If the price of the token has changed since the time the user deposited their stablecoins and received their NFT, then Plit Protocol will handle the situation differently depending on whether the price has increased or decreased.

If the price of the token has increased, the user will be able to redeem their NFT for more stablecoins than they originally deposited. In this case, the newly created contract associated with the NFT will automatically sell a portion of the stablecoins held in the contract for the ABC tokens.

If the price of the token has decreased, the user will be able to redeem their NFT for fewer stablecoins than they originally deposited. In this case, the newly created contract associated with the NFT will automatically sell a portion of the ABC tokens held in the contract for the stablecoins.

Plit Protocol uses a smart contract to handle these adjustments in order to ensure that users receive the correct amount of stablecoins based on the current value of the token, while also maintaining the necessary balance of ABC and stable tokens in the newly created contract.

Last updated