Transfer DAI & WETH to Vault

NOTICE: In most cases, naively sending tokens directly to an Arrakis vault contract address, or any other ERC20 contract address, can result in total loss of funds. Outside of this tutorial, you should only do something like this if you know exactly what you are doing and why.

Now that you've instantiated your ArrakisV2 vault and made it "private" you can think of the vault address as something like a "proxy wallet" for the vault tokens (DAI and WETH, in this case). We can even transfer DAI and/or WETH to the vault contract address directly and it will become available for use in the vault's DAI/WETH Uniswap LP strategy (ONLY works for private vaults that you fully control, see below).

That is all we'll be doing in this step: transferring DAI and WETH directly to the vault address.

Only transfer tokens to your private vault ON THE NETWORK YOU CREATED THE VAULT sending tokens to your e.g. polygon Arrakis vault address on ethereum mainnet will result in total loss of funds.

To follow along in detail, let's switch to the browser and first inspect the vault address from the last step. Navigate to the goerli etherscan page for your vault address:

You should see the Arrakis Vault V2 DAI/WETH token name and the RAKISv2-# token symbol, and the address should currently hold 1 DAI.

Now let's open the Metamask extension, make sure we are on the Goerli test network, and then send the vault address DAI and WETH:

Notice that Metamask wallet will likely throw a warning here (this is good as sending tokens directly to an ERC20 contract is usually a bad idea). In this case (provided we double check we are sending the correct token, to the correct vault contract address, on the correct network) we can acknowledge the warning and proceed anyway.

After these transfers are complete we can refresh the goerli etherscan page and see the tokens in the vault contract:

Ideally your vault is now holding roughly equal portions of DAI and WETH (in dollar terms). Once your vault address holds both DAI and WETH, you are ready to move on.

Why does this "transfer" work?

ArrakisV2 vaults have an ERC20 shares pattern, where each depositor adds DAI/WETH liquidity into the vault and mints new vault shares. In the previous step we did this: deposited 1 DAI and minted 1 Arrakis LP Token. But tracking shares isn't really necessary for a private vault where the intended effect is to only ever use it as a personal liquidity manager. After calling mint to create the initial vault share supply you don't actually have to use the mint method anymore and expand the share supply whenever you add more tokens to the vault. You can simply transfer DAI and WETH directly to the vault address, in any proportion you like, and use the vault's rebalance method to deploy those funds in and out of Uniswap. If you ever want your tokens back from the vault just burn the 1 Arrakis LP token (the entire token supply). Notice that bypassing the mint like this would NOT work in a "public" ArrakisV2 vault context as any tokens you transfer to the contract would be understood as spread over all the vaults current shareholders proportionally (so if you do not own the entire supply of the vault ERC20 shares, you are giving free money away to the other shareholders).

Last updated