Search…
Ethereum
How to programmatically stake and retrieve rewards data on Ethereum.

At a high-level, the flow for staking Ethereum involves:
  1. 1.
    Generating one or multiple validation keys using Kiln API
  2. 2.
    Making the deposit transaction, either with one by one with the official deposit contract or by batches through Kiln Batch Deposit Contract. Based on the custodian you use, you may be able to generate this transaction with a higher-level API provided by your custodian.
  3. 3.
    Monitoring validator performance and accrued rewards using Kiln Rewards API

Ethereum Stake is an API object linked to an Account and represents a validation key (ie a 32ETH stake).
Field
Value
Format
pubkey
Validation public key
String
state
Current deployment state
State (see State machine)
state_updated_at
Last state update date
iso
balance
Validator balance (in gwei)
String (Bigint)
apy
APY of accrued rewards
Number
effective_balance
Validator effective balance
String (Bigint)
deposit_tx_sender
Staker Ethereum Address
String

This state machine represents all the state an Ethereum object can be in. Transitions are performed automatically by Kiln services.
State
Description
UPLOADED
Validator key is uploaded and waiting for deployment
ETH1_DEPOSIT_IN_PROGRESS
Deposit transaction is made but not yet in a finalized block
ETH1_DEPOSITED
32 ETH deposit is complete on Ethereum mainnet chain
DEPLOYMENT_REVIEW
Validator configuration is under review to avoid errors or slashing risks
WAITING_FOR_DEPOSIT
Deployed and waiting for the Beacon Chain to process the deposit
PENDING
Validator is waiting in activation queue to start validation (~2 days)
ACTIVE
Validator is participating to the network
INACTIVE
Validator is offline
SLASHED
Validator has been slashed for bad behavior
TO_BE_DELETED
User wants to stop a validator
DELETION_REVIEW
Validator deletion is under review
DELETING
Validator is exiting and being deleted
DELETED
Validator has exit and been deleted

This object represents stats about the Ethereum network.
Field
Value
Format
apy
Current network staking APY
Number
supply_staked_percent
Current percentage of tokens staked on the network
Number

The following routes are available in the Kiln API:
post
https://api.kiln.fi/v1
/eth/keys
Create a new Ethereum Stake (validation key)
get
https://api.kiln.fi/v1
/eth/stakes
Retrieve Ethereum Stakes, for an Account, a Wallet or a Pubkey
get
https://api.kiln.fi/v1
/eth/network-stats
Retrieve Ethereum Network Statistics
Copy link
On this page
Staking flow
Rewards API
Ethereum stake API object
State machine
Ethereum network stats API object
Ethereum API routes
post
Create a new Ethereum Stake (validation key)
get
Retrieve Ethereum Stakes, for an Account, a Wallet or a Pubkey
get
Retrieve Ethereum Network Statistics