Add Liquidity

To make the deposit process safe and simple we have designed the Arrakis Public Vault Router. This contract is in charge of getting the right amounts and tokens to deposit. This is achieved by integrating with a swap aggregator and wrapping tokens when necessary. It also implements the Permit 2 standard for gassless approvals.

The following provides a step-by-step explanation of manually creating and sending an addLiquidity transaction to deposit into an Arrakis Public Vault.

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

  2. From now on, we use the Arrakis Public Router contract, defined here ArrakisPublicVaultRouter.sol

  3. Next step is 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 to deposit.
  4. In order to set token transfer authorizations before depositing, there are two alternatives:

    • Calling the standard ERC20 Approve
    • Set up Permit2 data and signature
  5. Now, in order to deposit into the pool there are multiple paths:

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