Batch Deposits Contracts
We have developed smart contracts to enable batch deposits. They offer the ability to fund multiple validators by signing one transaction, an important integration UX improvement, saving signing time and gas.
- A contract for
0x01validators, deployed in July 2023. Deployed on Hoodi and Mainnet. Audit report here - A contract for
0x02validators (compatible with0x01), deployed in October 2025. Deployed on Hoodi and Mainnet. Audit report here.
Setting your own gas limit
Setting the gas limit for a transaction is considered an advanced feature, and libraries such as Ethers normally do a great job of estimating the right gas limit to use for any transaction. However, ethers and other libraries sometimes use too low of a gas limit for ETH staking transactions. Using too low of a gas limit may result in wasted gas on several transaction attempts due to your transactions running out of gas, so use this guide to prevent transaction issues.
The credential type (0x01 vs 0x02) does not directly affect the gas limit. The gas limit is driven mainly by the number of validators in the transaction (i.e. the calldata size), not by the withdrawal credential type. The estimates on this page apply to both 0x01 and 0x02 validators. Note that our newer batch contract includes a per-validator deposit amount in the calldata, so it uses marginally more gas per validator than the original contract, but for a given contract, 0x01 and 0x02 are effectively the same.
Modifying the gas limit
Funding a large number of validators is likely to require a lot of gas, in which case you should use the table below for reference when building the staking transaction yourself (i.e. not from our API).
| # of Validators | Suggested Gas Limit | Estimated Cost in Gwei (assuming gas price of 25 gwei and 100% gas usage) |
|---|---|---|
| 1 | 123,142 | 3,078,550 |
| 10 | 431,543 | 10,788,575 |
| 50 | 1,893,657 | 47,341,425 |
| 100 | 3,700,260 | 92,506,500 |
| 150 | 5,534,921 | 138,373,025 |
| 200 | 7,367,352 | 184,183,800 |
| 250 | 9,164,722 | 229,118,050 |
An alternative to referencing this table is using a gas multiplier. Ethers has a method for estimating gas here. Implementing a gas multiplier can be as simple as:
const estimatedGas = await contract.estimateGas.method(args);
const tx = await contract.method(args, { gasLimit: 1.2 * estimatedGas });
Based on mainnet transactions we pulled from the newer contract: For a quick estimate, gas scales roughly linearly with validator count. Suggested gas limit ≈ (39,000 + 32,400 × n) × 1.15, where n is the number of validators. The 15% pad guards against variation; unused gas is refunded, so over-estimating is safe.
Important notes
- A higher gas limit may mean the transaction will take longer to execute, but ultimately will prevent having to waste extra gas in multiple transaction attempts if the gas limit is set too low.
- Setting a high gas limit does not mean higher fees, it just means less likelihood of an out of gas reversion! Any unused gas in a transaction will be returned to the sender's address.
References
Updated 8 days ago
