How to migrate USDC yearn vault and save 90% in gas

Migrate yvUSDC to the new vault and save gas by using Wido Together

Yearn recently launched a new USDC vault and wants everyone to migrate their funds. Use Wido gasless migration and save on gas.

$45M out of $349M have already migrated. You should migrate too.

Update: Gasless migration is now available for other vaults too, i.e. USDC, DAI, YFI and ETH. Go to and look for vaults with "gasless migration" label.

Why migrate using Wido gasless migration

Withdrawing and depositing in and out of yearn vaults is gas expensive. Users have paid hundreds of dollars in fees for this. Whales don't care but most people cannot spend hundreds of dollars in gas. In many cases it is more than their earnings in the vault!

Wido brings people together and batches their transactions into one to save on these expensive operations for everyone. Read on to learn how it works.

How to migrate using Wido gasless migration

Step 1: Visit USDC v0.3 yearn vault on Wido

Step 2: Connect your Wallet to find out if you have some old USDC tokens and should migrate

Step 3: If you have old USDC tokens to migrate, click Migrate Gaslessly to open the dialog and approve Wido to use your tokens for migration. Click the "Approve" button, MetaMask window will popup. Click confirm. This is a low gas operation and cannot be avoided. It is also the only gas operation you need to do

Step 4: Click on "Migrate" to sign the Migrate transaction. This is gasless so does not cost any ETH

That's it! Now just wait for others to join the batch to increase savings for everyone.

Wido will execute the migration during low gas period and when there is enough people in the batch.

Follow Wido Twitter Bot to get updates on when a batch executes, or just check your wallet regularly. At some point, your old tokens will automatically switch to new tokens.

How does Wido Gasless Migration work

To understand Wido Gasless Migration, let's first look into how a regular vault migration works.

Following is an illustration of a regular migration from yearn vault 1 into yearn vault 2. This is without using Wido Gasless Migration. First, user needs to withdraw from the old vault and then deposit into the new vault. This is costly and expensive.

Step 1.1: Approve. This is an Approve transaction on the old version of yToken. This transaction is relatively cheap.

Step 1.2: Withdraw (zap). This is when the USDC actually gets out of the old vault. This is a HIGH GAS transaction. After this step, USDC will be withdrawn from the old vault.

Step 2.1: Approve. User calls another approve, this time on your USDC token. This transaction is relatively cheap.

Step 2.2: Deposit (zap). This is when USDC finally gets into the new vault. This is a HIGH GAS transaction, especially for Zaps where the gas can easily skyrocket to hundreds of dollars.

Then the user gets new yTokens in return (visualised as step 2.3).

Now let’s see how it works with Wido. Instead of 4 transactions, only 1 transaction needs to be submitted. And it’s the cheap one of course – approve. Wido together will take care of the rest.

1: Approve. This is the same transaction as if depositing outside of Wido Together. It’s a cheap transaction and only 1 approve transaction is needed with Wido Together.

2: Sign. User signs a message that contains relevant information about their migration – mainly which vault they are migrating from and which vault they are migrating to. This is a free, gasless step. Also, notice that the USDC will not be withdrawn during this step. It's possible to cancel after this step!

And that’s it!

Now there is a waiting period for more people to join the batch. And then, when more people approve+sign, the magic happens.

3: Batch migration. Wido executes the transaction covering the ETH required to pay gas. It’s a single transaction that performs the following 4 steps.

3.1: Pull funds. Wido smart contract will pull old vault’s ytokens from every person who signed their message.

3.2: Swap old ytokens, deposit into new yearn vault, get new ytokens back. All of this in a single transaction. Wido is leveraging Bowswap’s smart contract to help with the magic.

3.3: New yTokens returned. Bowswap will return new yTokens to Wido contract.

3.4: Return yTokens. Wido contract will return new yTokens to each user pro-rata to their old yTokens amount.

Note: Transaction fee for steps 3.1–3.4 will be covered by new yTokens returned from the vault step (step 3.3). This is how it gets split across all users. Wido does not charge any extra fees.

How do I know which USDC vault is new and which one is old?

On Wido, you will see both USDC vaults tagged accordingly. Just search for “USDC” so you can see them next to each other, as in the screenshot below.

Is it safe?

We have opted for a few best practices to ensure that funds are safe.

  1. Valid signature (Step 2 above) is required for the contract to pull funds from your account
  2. The signed message has an expiration after which the signature becomes invalid
  3. Replay protection. The signed message has a nonce and cannot be executed twice
  4. Tokens are pulled and returned back to the same address
  5. The user is the owner of their tokens all the time. It's 100% non-custodial and it's possible to cancel anytime before the actual migration happens

The smart contracts have not been audited so use at your own risk.

The code is publicly available on GitHub.

What about cheap withdrawals or cheap deposits?

It's live.

Reach out to Telegram to learn more about the launch date or ask any questions.

Wido Bot 🤖

Follow Wido Bot to get notified whenever a batch is executed.