Stake ETH

In order to stake ETH with Bloq, follow the steps in this guide.

Staking in Ethereum requires infrastructure, Ether, and carefully following some steps to become a validator and start earning Ether.

While ethereum.org provides a step by step guide on how to become a validator, the Bloq platform makes it simpler by providing the infrastructure needed and an API to allow the users easily create validators and start staking.

Requirements

1. Prepare to create a validator

Before starting, ensure you have control on 3 Ethereum 1.0 addresses:

  1. A funding address with at least 32 ETH plus an extra amount to pay for transaction fees.

  2. A withdrawal address to receive the 32 ETH back.

  3. A fee address to collect the transaction fees.

Be very careful when selecting and inputting the withdrawal address. The withdrawal address can not be changed later and losing access to the withdrawal keys will result in loss of access to tokens.

2. Create a validator

To create a validator using the addresses previously defined, call the BloqStake API with the authentication token (created using the steps outlined in authentication.md), the withdrawal address, and the fee address.

curl -X POST https://api.bloq.com/staking/ethereum/mainnet/validators \
  -H 'Authorization: Bearer <AUTH_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
    "withdrawalAddress": "<WITHDRAW_ADDRESS>",
    "feeAddress": "<FEE_ADDRESS>"
  }'

The response to the call will include the data required to create the 32 ETH deposit transaction:

{
  "balance": "0",
  "chain": "mainnet",
  "pubkey": "91adb75d3347747a2d143d204adaaa3eb6edaf136c3429ff796c6f825c956916f4494d433ec94615184ddc3abe8697b2",
  "status": "pending",
  "depositData": "0x22895118000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012066c8e8eecc24c7c2fd0d1eabf608207069492414be53d3c8bc4c23c7e7d2459b000000000000000000000000000000000000000000000000000000000000003091adb75d3347747a2d143d204adaaa3eb6edaf136c3429ff796c6f825c956916f4494d433ec94615184ddc3abe8697b200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000f12bf2780ee9e15dff6ddedd3e0216e754a3d52f25bd9532fd71f78787d80e00000000000000000000000000000000000000000000000000000000000000608816e587d36f04837113260fcb8a71509e4db3b1459b1dff6d3bd9c91169458a6f34b2763d2b53071709eb01924bcf92061bd85fe022b698875f760e2573500816beb173d98c0dc27f133a60c423a5317c88183db5bcd3e04ea50add2dcf9888"
}

The response includes the pubkey of the validator and other status information. That key can be used to check the status in the beaconcha.in website.

3. Initiate the deposit

With the depositData provided, create, sign and transmit the transaction to the Ethereum PoW network. Using web3.js, doing so will look like this:

web3.eth.sendTransaction({
  from: '<FUNDING_ADDRESS>',
  to: '0x00000000219ab540356cbb839cbe05303d7705fa', // Ethereum Foundation Eth 2.0 deposit contract
  data: '<DEPOSIT_DATA>',
  value: '32000000000000000000'
})

Once the transaction is confirmed, the Beacon Chain will process it and issue the 32 ETH in the PoS chain. Then, the validator will start attesting new blocks.

Last updated