This article provides an overview of how to stake ETH via Fireblocks using the Blockdaemon Staking API and Raw Signing.
To begin onboarding the Staking API with Blockdaemon, follow these steps:
- Provide Blockdaemon with the following information:
- Network: Mainnet or Goerli/Prater testnet.
- MEV: (Miner Extracted Value) enabled or disabled.
- Geolocation Preference.
- Default Fee Recipient Address for Blockdaemon to set for all validators in the plan (this value can be overridden when you make the stake-intent API call).
- Once you have provided this information, Blockdaemon will create a staking plan with the above configuration. A staking plan is a pool of validators dedicated to your organization.
- Review the plan details in the Blockdaemon app and accept the plan if all looks good.
After accepting the staking plan, login to your Blockdaemon app to create a new API key.
- Navigate to Staking API under the Manage Plan section.
- Go to the Connect tab and click Create API Key.
- Enter the name of the API key and click Create.
- Copy the generated API key by clicking I've copied my API Key.
Please ensure that the API key is stored securely as you cannot review any previously created keys. A key can only be deleted within the Blockdaemon app, however, you can create additional API keys whenever you need to.
Now, you have a Staking API plan with deployed validators and the API key. The next step is to use the Post Stake Intent method. This method calls through Blockdaemon’s Staking API and reserves one or more of Blockdaemon’s validators, then returns an unsigned transaction.
Follow the steps below to learn how to do that:
- Go to Blockdaemon's API documentation.
- Under the Staking API section, select Ethereum.
- Click on the Post Stake Intent endpoint.
- Specify the required parameters:
|Specifies the network. Ensure that you have entered "mainnet" here.|
|Specifies the amount of Ethereum that you wish to stake. This will show the full amount of ETH represented in Gwei with the trailing zeros.|
|Hex-encoded Ethereum account or smart contract address. This will usually be the same address as the fee recipient address defined earlier when you created your Blockdaemon API staking plan.|
|Refers to the number of validators that you are going to create. For instance, if depositing 32 ETH, you would select a quantity of one.|
|An Ethereum address to receive transaction fees from published blocks. 20-bytes, hex encoded with 0x prefix, case insensitive.|
|This enables you to stake to validators from the specified plan(s). When no plan ID is specified, validators across all plans that match the API route will be available for staking. Specify this object with the Plan ID you can copy from the Blockdaemon app.|
In most cases, the fee recipient address will be the same as the withdrawal address.
However, you can set it up differently using the address where you funded your Ethereum. This way, you can receive staking rewards at another address, earning rewards for the ETH you staked.
- Paste your API Key into the Header field under Authentication on the right-hand side of the page.
- The shell updates on the right-hand side of the page as you input the data. This endpoint returns a 'raw unsigned transaction'.
Ensure that you have raw signing enabled on your Fireblocks account.
- From the Post Stake Intent endpoint, click the copy icon to copy the code from the shell.
- Create a Fireblocks API User (if you already have created one, skip and proceed to the next step).
- On your Fireblocks account, run the unsigned transaction in the raw signing interface wallet.
- It will go through your transaction authorization policy and then approve the transaction to launch the validator.
- Congratulations! You know how to stake ETH via Fireblocks using the Blockdaemon Staking API.
- Upload the transaction to the Fireblocks Console using the Fireblocks API POST /v1/transactions endpoint.
- Populate the
unsigned_transaction(returned in the response from the Post Ethereum Stake Intent endpoint) into the
contractCallDatafield in the Fireblocks endpoint.
- Complete the transaction signing.
There is a default two-hour timeout after the transaction is created for signing in Fireblocks.
Updated 18 days ago