Remove Liquidity
Here we explain how to remove liquidity from a Meta Vault that you own LP shares of.
- Identify the Meta Vault address you want to exit, and verify it matches the address of your LP token. See for example here for a full list of deployment addresses related to HOT AMM.
- From now on, we use the Arrakis Public Router contract, defined here
ArrakisPublicVaultRouter.sol
- Approve the LP token amount you want to burn and convert in the underlying tokens by using the standard ERC20
Approve
. The approval must be toArrakisPublicVaultRouter
. Alternatively, you can set up Permit2 data and signature for a gasless approval transaction. - Prepare the
RemoveLiquidityData
- Depending on the approval type for the vault LP token, there are two paths:
- If you did an ERC20 approval, call
removeLiquidity
. - If you set up Permit2 Data and Signature, call
removeLiquidityPermit2
- You will receive
token0
andtoken1
amounts correspondig to the amount of shares burned.