Our Batch Smart Contract
Our batch contract enables you to fund up to 250 validators in a single transaction instead of having to create, sign, and broadcast one transaction per validator. It's better UX and it's battle tested: including our old batch smart contract, over 1 million ETH has been staked with us via our batch contracts.
Addresses
If your custodian requires it, please whitelist these addresses on Testnet and Mainnet respectively:
- Testnet contract (Holesky):
0xA627f94a8F94E4713d38F52aC3a6377B0a111d47
(View on Etherscan). - Mainnet contract:
0xf0075b3cf8953d3e23b0ef65960913fd97eb5227
Β (View onΒ Etherscan).
Audit
Our contract has been audited by Halborn. Read the report here.
Why we recommend 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.
How to modify 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.
Gas cost = gas price * gas usage
# 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 });
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 6 months ago