Batch deposits and withdrawals for Ethereum vaults

Use Wido Batch transactions to save up to 90% in gas.

At Wido, we believe that everyone should benefit from DeFi. Smart brains behind yearn.finance and other protocols built vaults offering exceptional APYs in a set and forget manner. Whales poured millions of dollars into these vaults to make their crypto productive. But for many those meaty APYs are economically infeasible due to very high transaction costs. Not anymore—meet Wido Together.

With Wido Together, you can deposit in or withdraw from vaults on Ethereum L1 and save 90% in gas fees. And you will not spend any ETH.

And yes it is non-custodial. You have control over your funds all the time.

How to save 90% gas on Ethereum vault deposits or withdrawals

Instead of executing your deposit or withdrawal transaction directly, you can join Wido Batch. After others join the same batch, Wido will execute the batch as a single transaction and split gas evenly across all batch participants.

To try it out, go to https://app.joinwido com, select a vault tagged "gasless" and join withdraw, deposit or migration batch.

After you join a batch, wait till next weekend. Wido executes batches every weekend when the gas is low.

Don't forget to share your batch with others to save even more. More people = more savings.

How are the gas savings achieved?

The short answer is by batching expensive transactions together for multiple users and splitting gas fees. For curious, let's go down the rabbit hole. 🐰

We will explain it in an example of depositing USDC into a yearn vault. It works analogously for other tokens and protocols.

Regular deposit without Wido Together

Let's first explore how a regular deposit into a vault works.

Following is an illustration of a regular deposit into a yearn vault, without Wido Together.

Illustration of USDC deposit into yearn vault without Wido Together.

The illustration above shows a user depositing USDC into a yearn vault. 2 transactions need to be submitted by the user.

1: Approve. This transaction is relatively cheap. USDC token will not be deposited during this transaction.

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

Finally, the user gets yTokens in return (visualised as step 3).

Deposit using Wido Together

In this case, only 1 transaction needs to be submitted. And it’s the cheap one – approve. Wido together will take care of the more expensive transaction – deposit. Let's see how.

Illustration of USDC deposit into yearn vault with Wido Together.

1: Approve. In this step user grants permission to Wido Smart Contract to pull their funds later on, when the batching happens. This is a cheap transaction and nothing can be done to avoid it.

2: Sign. User signs a message that contains relevant information about their transfer – the amount they intend to deposit and the vault to deposit into. This is a free, gasless step. Also, notice that the USDC will not be withdrawn during this step.

That's all. Approve is the only transaction the user paid for (it's a relatively cheap transaction). Only one approval is required for all vaults on Wido.

Now there is a maximum of 1 week waiting period for more people to join the batch. And then the magic happens during step 3.

3: Batch deposit. This whole step happens within a single transaction. For clarity, we will break it down into 4 steps. Step 3 is done automatically by Wido.

3.1: Pull funds. During low gas period (usually weekend), Wido smart contract will pull USDC from every person who signed their message during step 2.

3.2: Deposit all funds as a single transaction. Only one deposit transaction needs to be executed for all USDC in the batch. This is by far the most expensive operation, so combining it from multiple users results in significant gas savings for everyone involved.

3.3: yTokens returned. Yearn vault will return yTokens to Wido contract.

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

Note: transaction fee for steps 3.1–3.4 will be covered by 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.

Is it safe?

It's been live on mainnet since November 2021. Recent batches are available on the Wido Together page.

For more insights into the security model of Wido Together, there is an article on our conversation with Facu from yearn.finance.

Wido smart contracts have not been audited so use at your own risk. The code is publicly available on GitHub.

What about gasless withdrawals or gasless migrations?

It's all available as Wido Together.

Reach out to Telegram to learn more about the launch date.

Wido Bot 🤖

Wido Bot tweets automatically whenever a batch is executed.