How to Prepare for Withdrawals for Ethereum Stakers using Dappnode

Pol Lanski
DAppNode
Published in
9 min readApr 12, 2023

The Shapella Upgrade Arrives April 12th, 2023!

The Shapella network upgrade will activate on Ethereum Mainnet at Epoch 194048, scheduled for 22:27:35 UTC on Apr. 12, 2023.

Do you want to withdraw your sweet, sweet ETH? Here are the instructions explaining:

  1. The Basics: How do withdrawals work?
  2. The comprobation: Check to see if you are have an Execution Address set as your Withdrawal Credentials or have Legacy BLS Withdrawal Credentials
  3. The preparation: How To make your validator(s) ready and eligible for withdrawals if it is not already eligible
  4. The Withdrawal: how to initiate a voluntary full withdrawal

For a simple video explanation, you can check this out — BUT ATTENTION! WE HIGHLY RECOMMEND DOING ANYTHING RELATED TO THE MNEMONIC COMPLETELY OFFLINE IN AN AIR-GAPPED COMPUTER!

The Basics: How do withdrawals work?

A common misconception is to think that withdrawals can be triggered by the user. Withdrawals are passive and cannot be triggered manually. Instead, the act of receiving your extra balance ETH in your wallet will occur automatically if you fulfill all the right conditions.

All you can do is to make sure you fulfill the conditions for the type of withdrawal you want to be performed: Partial or Full withdrawal

The beacon chain will check 16 validators per slot and will trigger either a full withdrawal or a partial withdrawal. The next slot, it will check for the next 16 validators of the validator set, and will go on until the end of the validator list, at which point it will start from the beginning again.

Withdrawals automatically begin being processed by the network regularly at a current network set maximum rate of 16 validators per slot starting on the next Beacon Chain slot following the activation of Shapella at epoch 194048.

Here’s a rough representation of how the beacon chain would go, slot by slot, down the validator list, and attempt to process a withdrawal, either an Excess Balance Withdrawal (Partial Withdrawal) or if it’s already exited, a Full Withdrawal.

Types of withdrawals and the necessary conditions for them to happen:

There are full withdrawals and partial withdrawals:

To be fully withdrawable, your validator(s) needs to:

  1. Be exited, either voluntarily exited or slashed (forcibly exited).
  2. Have waited for enough time to have passed since its exit (to be past its withdrawable epoch).
  3. Have an Execution / Eth1 withdrawal address set. (NOT a BLS withdrawal credential, more on that below)
  4. Of course, still have a balance!

Then, when the turn of this validator arrives on the Beacon Chain, all the balance will be transferred to the withdrawal address.

To be partially withdrawable you need to:

  1. Have an Execution / Eth1 withdrawal address set
  2. Have excess effective balance (that is balance over 32 ETH)

Then, all your balance over 32 ETH will be sent to the withdrawal address.

If you just want to reap your hard earned rewards, you only need to set up an Execution Withdrawal Address and your excess balance will be automatically deposited every time the Beacon Chain processes it!

So, how do you know if you are ready and everything will happen automatically?

The comprobation: Check to see if you are have an Execution Address set as your Withdrawal Credentials or have Legacy BLS Withdrawal Credentials

Depending on when and how you created your validator keys, it is possible that your address is already an eth1 address and you don’t need to do anything extra!

The easiest way is to go to beaconcha.in and find your validator.

Remember that you can go to the Web3Signer UI and click on this button to be sent to the beaconcha.in page of your validator!

If you see 0x01 in the field “Withdrawal Credentials” in the Beaconcha.in image above, you’re good to go! You don’t need to do anything else to receive partial withdrawals, and you can voluntarily initiate the validator exit process should you want to do so.

If instead you see 0x00 in Yellow as shown in the image above, you will need to change it to an Execution/Eth1 withdrawal address, and you can read how to do it below.

The Preparation: Changing to an Execution Address from a BLS Withdrawal Credential (0x00) => (0x01)

First we need to gather the needed data and software online to create your BTEC (BLS to Execution Credentials) message.

We need:

  • your seed/mnemonic used to create your validator(s). If you used more than one seed/mnemonic for your validators you need to complete this process for each seed from which you generated active validator keys.
  • The Validator’s Index: Upper Left Red Box on Beaconcha.in as shown in the image below
  • The Validator’s BLS Credentials: Lower Red Box below (should begin with 0x00 or else you already have an Execution Address). Click the copy icon circled in green to copy the full BLS Withdrawal credential

Keep the mnemonic safe and note the Validator’s index and the corresponding BLS for each validator you want to generate the BLS to Execution Message in a text editor.

If you have many validators perhaps 5 or more you will likely want to do this process using ETH-DO’s CLI which can handle and create batch transactions without needing to pull all your validator’s information i.e. PubKeys, BLS Withdrawal Credentials, Validator Indexes, manually — -{Instructions are in this more advanced guide Here}

Using Wagyu to generate the message

🔒 This guide is going to take into account best security practices (Which we at Dappnode STRONGLY recommend you always follow) for handling sensitive information such as validator seeds.

⚠️ This includes using 2 machines: one offline air-gapped machine and another online computer able to connect to your dappnode. This setup drastically increases security.

⚠️ If you do not have another air-gapped offline computer, like an old laptop, you could use a Linux Live CD/USB such as Tails to use on your regular computer with the internet disabled

⚠️ Whatever you choose to do, DO NOT have your computer online when dealing with your seed/mnemonic. And make sure to clear your clipboard (Wagyu automatically clears your clipboard upon close of the app), and to clear and remove any and all versions of your seed/mnemonic from your computer before reconnecting to the internet.

⚠️ If you use an offline computer you will need a USB drive to transfer the file created by Wagyu onto the online computer for broadcasting the message

  1. Download wagyu from wagyu.gg and open the app.
  2. Click on “USE EXISTING RECOVERY PHRASE”
Choose USE EXISTING SECRET RECOVERY PHRASE

3. It will ask you to confirm which network you want to use. Test first on goerli if you have validators there and then proceed to mainnet.

4. Finally you will be shown the following screen select the Bottom option “GENERATE YOUR BLS TO EXECUTION CHANGE (ADD A WITHDRAWAL ADDRESS)”.

5. This brings up this page to enter your seed/mnemonic/recovery-phrase.

6. Enter your securely stored mnemonic here. Double check your mnemonic is correct before continuing. (It will validate the mnemonic after clicking import.)

7. Once your mnemonic is verified it will show this page

  • Starting Index. You will in most cases use 0 as the starting index if your first validator was created from the first generated keystore of the seed/mnemonic.
  • The Validator Index or Validator Indices collected in step 1 should be entered in the upper right text field separated by commas.
  • The Validator BLS credentials collected in step 1 should be entered in the large field in the center of the page, also separated by commas.

Make sure the order of your validator indexes is in the same order as the BLS withdrawal credentials (i.e. first listed validator index will have its corresponding BLS withdrawal credential be the first listed in its field, and so on.)

  • Finally the last parameter is your Execution address/ETH1 Address you want to set as your withdrawal credential; ensure you have full control over this address.

Example:

8. Click Next and it will ask for the folder you’d like to have Wagyu save the BTEC message.

9. Once you select the destination folder and click create it will begin creating the BTEC message for you to broadcast from your online computer

The next page shows the completed BTEC message’s location on your drive (its blacked out in my example)

10. This listed file path leads to the signed BTEC message file you now need to copy onto the USB drive used earlier in the process, to be transferred back to the online computer to broadcast the message to the network or node.

Submit the message in the file you have created to the Beacon Chain

💡 This step needs to be done online — on your online computer or after wiping your cache / resetting the laptop and coming back online.

The easiest way to broadcast your BTEC Message is simply going to Beaconcha.in’s Broadcast Message Tool and drag and drop, copy paste, or select inside the box to open a dialog to select your signed BTEC Message .json file.

And that’s it! After submitting, you are ready to roll! It is possible that the message will only be propagated after Shapella activates, so check back after in your Beaconcha.in validator page to see the change.

The Withdrawal: Performing a voluntary exit with Dappnode

If you have set your withdrawal address to a 0x01 address, you will automatically receive everything you generate above 32 ETH.

You don’t need to do anything else to collect the ETH you generated!

But if you want to fully exit and stop validating, you must follow the following steps on dappnode:

  1. Select the validator you want to exit and click on the exit icon on the top right, as in the image below

2. Type “I want to exit” in the confirmation box and press “EXIT”. You can also download the signed exit message, but it is not relevant for solo stakers, in most cases.

Downloading this message (known as a Voluntary Exit Message, or VEM) can have utility in some situations where you want to have an emergency way to exit your validators without needing to be on your node with you validators active (i.e. full node crash, stolen node, death/severe injury that requires non technical family or friends to exit your validators all they need to do is have the VEM downloaded, its already signed and cannot be altered and can simply be dragged and dropped onto the Beaconcha.in Broadcast Message Page which will exit the validator(s) and withdraw the full remaining balance to your set Execution Withdrawal Address)

And that’s it! You have exited and if you have set your withdrawal address to an Execution/Eth1 address, you will receive your full balance when the Beacon Chain iterates over your validator and determines you fulfil all the conditions.

Thanks to Voss and Chuy for their help writing this guide!

Questions? Join our discord!

You don’t have a Dappnode yet? Check our website!

Wanna be up to date? Follow us on twitter!

--

--

Pol Lanski
DAppNode

Passionate about a better world and technology. #DAppNode #Blockchain4Good