Adding/Removing Liquidity
Adding and removing liquidity in the LogX pool can be done through the RewardRouter contract. Adding liquidity means providing your tokens that you want to put in the liquidity pool and minting the LLP token.
In order to mint LLP tokens, you can call:
RewardRouter.mintLlp with:
_token: address of the token you want to add to the liquidity pool(USDC/USDT)
_amount: amount of USDC/USDT token
_minUsdl: minimum acceptable USD value of the LLP purchased
_minLlp: minimum acceptable LLP amount
Once you call the mintLLP function, tokens specified in _amount are transferred from msg.sender and deposited in the Vault contract, and corresponding LLP tokens are minted for msg.sender.
In order to remove liquidity or burn LLP:
Call RewardRouter.burnLlp with:
_llpAmount: amount of LLP tokens to burn
_minOut
tokenOut: address of token to sell LLP for
Once you call the burnLlp function, the amount of LLP specified in _llpAmount is burned, and the initial tokens provided for minting LLP are returned back to msg.sender.
Last updated