Quickstart: Public Vaults

To make the deposit process safe and simple we created the Arrakis Public Vault Router. This contract is in charge of getting the right amounts and tokens to deposit, as well as containing convenient functions with the ability to wrap assets and swap atomically before deposit. It also integrates the Permit 2 standard for gassless approvals.

Add Liquidity

The following provides a step-by-step explanation of depositing liquidity into an Arrakis Public Vault via the Router.

  1. Identify the Meta Vault associated to the pair you want to participate in. See for example here for a list of Public Vaults.

  2. Next step is use the Router to determine how many of each tokens you expect to need to join the Meta Vault.

    • Use getMintAmounts to determine the extact amounts of token0 and token1 you expect to deposit, given the maximum of each token you'd like to provide.
  3. In order to set token transfer authorizations before depositing, there are two alternatives:

    • Calling the standard ERC20 Approve (approve <router> to spend)
    • Set up Permit2 data and signature
  4. Now, in order to deposit into the pool there are multiple paths:

  5. Once your deposit transaction goes through, you obtain ERC20 LP shares of the vault you are depositing to.

Remove Liquidity

Removing Liquidity from an Arakis Public Vault that you hold LP tokens of is easy.

Simply call the burn directly on an Arrakis Meta Vault Public contract to burn amount of LP tokens that you hold and remit two-sided underlying (token0 and token1) to your receiver address of choice.