Programmatic native restaking on Kiln validators
This guide walks you through the different integration steps required to propose direct restaking on top of Kiln Ethereum validators.
Overview
To restake an Ethereum validators on the EigenLayer platform, the withdrawal_credentials
address of the validator MUST be set to an EigenPod Contract address.
EigenPod is a contract deployed per restaker address, one address = one pod maximum.
Integration
1. Get the EigenPod address of the restaker
EigenPod are deployed at deterministic addresses, so you don't need to deploy them to know their address (it will be deployed in the third step of this guide).
You can get the EigenPod address by calling the view function getPod(address podOwner)
of the EingePodManager contract, where podOwner
is the address that will perform the restaking / deposit of the validator(s).
This function returns the address of the EigenPod, which will be set as withdrawal_credentials of the validators to deposit.
Network | EigenPodManager Address |
---|---|
Mainnet | 0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338 |
Goerli (testnet) | 0xa286b84C96aF280a49Fe1F40B9627C2A2827df41 |
2. Create Kiln ETH validators
You can get a Kiln API token by going on your organization dashboard under the Applications
section.
To create ETH validators on Kiln infrastructure, you can call the POST /v1/eth/keys Kiln API route.
where:
API_TOKEN
is your kiln api tokenACCOUNT_ID
is a Kiln account you can create under the "Accounts" section of your organization Kiln dashboardEIGENPOD_ADDRESS
is the address we fetched at the previous step (mandatory)FEE_RECIPIENT_ADDRESS
is the address that will receive the Execution Layer rewards of the validatorsNUMBER
is the number of keys you want to generateFORMAT
can be et tobatch_deposit
3. Create your EigenPod
Call the createPod()
function on the EigenPodManager contract. This deploys a unique pod per call address, you cannot own multiple pods with a single address.
4. Deposit Kiln ETH validators
Kiln provide a Smart Contract utility called BatchDeposit contract which enables you to deposit multiple validators in the same transaction.
To efficiently do this, modify the above flow by using the Kiln Batch Deposit contract
if < 64 validators:
call the
batchDeposit(bytes publicKeys, bytes withdrawalCreds, bytes signatures, bytes32[] dataRoots)
if > 64 validators
call the
bigBatchDeposit(bytes publicKeys, bytes withdrawalCreds, bytes signatures, bytes32[] dataRoots)
Other resources
Unstake
There are two ways to unstake your validators.
Post an ETH Request Exit call using our API. This can be triggered from depositor of the validator’s stake OR from the withdrawal creds of the validator. In the case of an EigenLayer restaked validator, it will be the former.
Retrieve a pre-signed exit message from Kiln and broadcast it, using the instructions described here. This is also a disaster recovery flow you can use in case Kiln is not available.
Compute the amount of Restaked Points a validator has accumulated
Call the
GET /v1/eth/stakes
Kiln api route using?validators=0xa...,0xb...
query parameter with your validator addressesUsing the information returned, compute points amount for each of them:
Last updated