ETH Batch Deposit Contract
The Kiln Ethereum Batch Deposit Contract is a minimal implementation of deposit transaction batching. The goal is to deposit N validations keys in one transaction with N * 32 ETH as value.
The Batch Deposit Contract is available at:
You can interact with the
batchDeposit
function of the contract to deposit multiple validator keys deposit data, with the multiple of 32 ETH as transaction value.We recommend you use it to send N deposit data with N * 32 ETH where N < 150.
function batchDeposit(
bytes[] calldata pubkeys,
bytes[] calldata withdrawal_credentials,
bytes[] calldata signatures,
bytes32[] calldata deposit_data_roots
) external payable
ABI:
{
"inputs": [
{
"internalType": "bytes[]",
"name": "pubkeys",
"type": "bytes[]"
},
{
"internalType": "bytes[]",
"name": "withdrawal_credentials",
"type": "bytes[]"
},
{
"internalType": "bytes[]",
"name": "signatures",
"type": "bytes[]"
},
{
"internalType": "bytes32[]",
"name": "deposit_data_roots",
"type": "bytes32[]"
}
],
"name": "batchDeposit",
"outputs": [],
"stateMutability": "payable",
"type": "function",
"payable": true
}
The smart contract is relatively straightforward and does not maintain a state of the deposited keys. It simply exposes a
function batchDeposit(bytes[] calldata pubkeys,bytes[] calldata withdrawal_credentials, bytes[] calldata signatures, bytes32[] calldata deposit_data_roots) external payable
one can call with N deposit data and N *32 ETH as tx value.The Contract sources are available here:
Here is a model of gas costs evolution based on a mainnet fork:
Batch Deposit 7
Gas: 221233
Batch Deposit 8
Gas: 251485
Batch Deposit 9
Gas: 279802
Batch Deposit 10
Gas: 312046
Batch Deposit 100
Gas: 3049083
Batch Deposit 200
Gas: 6103163
Batch Deposit 300
Gas: 9233661
Batch Deposit 400
Gas: 12419018
Batch Deposit 500
Gas: 15697211
We recommend to not batch deposit more than 150 keys to avoid transaction with too much gas and low chance to get included by the network.
Last modified 4mo ago