Stake ETH with Kiln
Prerequisites
Requirements :
- Ledger Enteprise with Smart contract Interaction support (to activate this feature on your workspace, please reach out to your Technical Account Manager)
- LAM setup
- Admin access to the Ledger Enteprise Application
How to start :
- Create your API users
- Create an Ethereum Account (that owns at least 32 ETH), with a dedicated Smart Contract goverance rule , as Ethereum Staking relies on interacting with Kiln's staking contract; therefore, staking operations on Ethereum are managed by the Smart Contract rule (as opposed to the Staking rule that you can find for accounts on other protocols, such as Tezos or Solana)
- Add the relevant API users to the ETH Staking Smart Contract governance rule, based on your business workflows.
Environment variables
LAM_URL = "https://eth-staking.minivault.ledger-sbx.com/lam"
API_USER_NAME = "bluestar" #The username of the API Operator you set as Creator in the Smart Contract rule of your MATIC Staking account
HEADER = {'X-Ledger-API-User': API_USER_NAME}
Create your programmatic staking operation request
Important
Make sure that you have the right staking contract address to stake with Kiln (for increased security, you can whitelist it in your ETH staking account Smart Contract Rule):
-
Goerli:
0x9c1D4220cA82115167A5da4c00c062C78Fd3D3F8
-
Mainnet:
0x746d8A8FCAB7f829Fa500504f60D89C5CC1EA973
You can initiate your ETH staking request programmatically by calling the POST/transactions
endpoint. Below is an example of a request body to create a request to stake 32 tETH (on Goerli) with Kiln, using the encoded payload.
payload = {
"account_name": "ETH Staking",
"amount": "32",
"coin_fields": {
"contract_interaction": {
"contract_data": "0xd0e30db0"
}
},
"max_fees": "1000000000000000000",
"note": {
"content": "Stake ETH with Kiln",
"title": "ETH Staking"
},
"recipient": "0x9c1D4220cA82115167A5da4c00c062C78Fd3D3F8",
"speed": "FAST"
}
r = request.post(LAM_URL + "/transactions", json=payload, headers=HEADER)
r.json
Once the transaction is fully approved, it will be signed and broadcast. You will have succesfully staked your ETH, and will start earning rewards. You can monitor your staking positions by heading to Kiln's DApp in the DApps section of your Ledger Enterprise platform, or by calling the GET /accounts
endpoint. To monitor all your individual staking positions via API, you can also leverage our GET /ethereum/accounts/{account_id}/stakes
endpoint.
Stake via UI
Note that you can also perform your staking operations with Kiln directly from your Ledger Enterprise UI. To learn more about Staking with Kiln via UI, please refer to the tutorials in our Help Center.