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 https://app.joinwido.com and look for vaults with "gasless migration" label.
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.
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, 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.
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. As you can see, you need to do it in two steps. First, you need to withdraw from the old vault and then you deposit into the new vault. This is costly and expensive.
Step 1.1: approve. This is an Approve transaction on your old yToken. This transaction is relatively cheap.
Step 1.2: withdraw (zap). This is when USDC gets out of the old vault. This is a HIGH GAS transaction. After this step, you will have your USDC inside your wallet, withdrawn from the old yearn vault.
Step 2.1: approve. You need to call 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 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 your USDC will not be withdrawn during this step. You can cancel after this!
And that’s it!
Now there is a waiting period for more people to join the batch. And then, when 5-10 users approve+sign, then the magic happens.
3: batch migration. Wido executes the transaction covering the ETH required. 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. We are 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’s split across all users. Wido does not charge any extra fees.
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.
We have opted for a few best practices to ensure that your funds are safe.
1: Your valid signature (Step 2 above) is required for the contract to pull funds from your account.
2: Your signed message has an expiration after which the signature becomes invalid.
3: Replay protection. Your signed message has a nonce and cannot be executed twice.
4: Tokens are pulled and returned back to the same address.
5: You are the owners of your tokens all the time! You can cancel anytime before the actual migration happens.
Our smart contracts have not been audited so use at your own risk.
The code is publicly available on GitHub.
Cheap deposits using Wido Deposit Together are live. We are working hard to launch withdrawals using Wido Together asap.
Reach out to Telegram to learn more about the launch date or ask any questions.
Follow Wido Bot to get notified whenever a batch is executed.