# Ethereum (ETH)

There are two ways to unstake Ethereum validators with Kiln.&#x20;

## Option 1: Unstake from Kiln Dashboard

Following the Shapella upgrade, you can unstake your validators in a couple of clicks from the Kiln dashboard:

{% embed url="<https://www.youtube.com/watch?v=3V3rEd9TKbI>" %}
Unstake ETH from Kiln Dashboard
{% endembed %}

You can request multiple validators to exit by:

1. Selecting them on the dashboard and using the **batch request exit** button (ideal for specific stakes; otherwise, use option 2).
2. Using the **batch request exit** on the dashboard and adjusting the slider to auto-select stakes (for exiting many stakes simultaneously).
3. Inputting a list of validators in the `requestExit` function with the `bytes[] validators` parameter.

On the dashboard you can see when a stake is pending to exit along with the estimated time it will take (look for the status **Exit requested**).

The addresses of our Ethereum Exit Contracts are as follows:

{% hint style="info" %}
Make sure these contracts are whitelisted in your custody solution.&#x20;
{% endhint %}

<table><thead><tr><th width="102.65625">Network</th><th>Address</th></tr></thead><tbody><tr><td>Mainnet</td><td><a href="https://etherscan.io/address/0x004c226fff73aa94b78a4df1a0e861797ba16819"><code>0x004c226fff73aa94b78a4df1a0e861797ba16819</code></a> <code>(</code>Batch Exit - Kiln > Single Exit)<br><a href="https://etherscan.io/address/0x00000961Ef480Eb55e80D19ad83579A64c007002"><code>0x00000961Ef480Eb55e80D19ad83579A64c007002</code></a> (Single Exit - <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7002.md">Official</a>)</td></tr><tr><td>Hoodi</td><td><a href="https://hoodi.etherscan.io/address/0x06f9c32a3093dde837a2e172041df79b4b850a2e"><code>0x06f9C32A3093DDE837a2E172041DF79B4b850A2e</code></a> (Batch Exit- Kiln > Single Exit)<br><a href="https://etherscan.io/address/0x00000961Ef480Eb55e80D19ad83579A64c007002"><code>0x00000961Ef480Eb55e80D19ad83579A64c007002</code></a> (Single Exit - Official)</td></tr><tr><td>Holesky</td><td><a href="https://holesky.etherscan.io/address/0x75838e6FC51fa2dFE22be1d5f3817AEf90306Be6"><code>0x75838e6FC51fa2dFE22be1d5f3817AEf90306Be6</code></a> (deprecated) </td></tr><tr><td>Goerli</td><td><a href="https://goerli.etherscan.io/address/0x0b846434ce660730c9d986c4febc12587c076cad"><code>0x0b846434ce660730c9d986c4febc12587c076cad</code></a> (deprecated)</td></tr></tbody></table>

For more details on what happens behind the scenes when you unstake, check out [this blog post](https://www.kiln.fi/post/ethereum-withdrawals-exit-request-flows).

## Option 2: pre-signed exit messages

In Option 1, you rely on Kiln processing the `requestExit` message that you send via the Dashboard. Option 2 is a fully non-custodial approach we describe below.&#x20;

The validator exit operation requires the validator’s validation key to sign a VoluntaryExit message and broadcast it to the Consensus Layer. It has become an industry standard that the validation keys are protected by the node operator themselves and are rarely shared with customers; having the same validation key in multiple places exposes the staker to slashing risks.

The problem we are trying to solve is the following:

> *As an ETH holder staking on dedicated ETH validators through a node provider, I want to be able to exit my validator without relying on the node operator to perform the VoluntaryExit task.*

This is why at Kiln we developed a full flow to provide pre-signed VoluntaryExit messages to all our clients.

<figure><img src="https://1911902555-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fnye3yqpuOzdfrtWAlwng%2Fuploads%2FOQmc9N2d1efqpC8wiG26%2FCleanShot%202024-02-06%20at%2011.20.51.png?alt=media&#x26;token=e017caaf-0347-4559-8d8c-84816eb46331" alt=""><figcaption></figcaption></figure>

We built our ExitMessage API, which exposes signed VoluntaryExit messages of your validators, encrypted using your GPG key, this way guaranteeing that only you can access these messages. After getting these messages you can decrypt them and send them directly to a beacon chain node which will execute the exit.

### Steps to setup and exit validators

* Provide PGP/GPG public key
  1. PGP/GPG key must be provided in order to encrypt the messages in our database and in the API
  2. The public key can be shared with your CSM or Sales Engineer and they’ll share it internally
  3. PGP/GPG private key must be stored in a safe place as it’ll be the only way to decrypt the messages.
* Create integration with our `getExitMessage` [endpoint](https://docs.api.kiln.fi/reference/getexitmessage)
* Request encrypted messages via `getExitMessage` [endpoint](https://docs.api.kiln.fi/reference/getexitmessage)
* Decrypt exit messages with the private key that corresponds to the PGP public key shared
* If you want to perform exits, broadcast the messages to a Beacon Chain node

  1. For testing we usually use Nimbus open Beacon Nodes APIs:&#x20;
     1. Goerli/Prater: `http://unstable.prater.beacon-api.nimbus.team/eth/v1/beacon/pool/voluntary_exits`
     2. Holesky: `http://unstable.holesky.beacon-        api.nimbus.team/eth/v1/beacon/pool/voluntary_exits`
     3. Mainnet: `http://unstable.mainnet.beacon-        api.nimbus.team/eth/v1/beacon/pool/voluntary_exits`&#x20;
  2. The request must be a `POST` with the following structure:&#x20;

     ```json
     {
       "message": {
         "epoch": "162304",
         "validator_index": "487005"
       },
       "signature": "0xb1ab6ec1476c7797667ac1d460c5adc7215074ba5b"
     }
     ```
  3. `curl` request example

  ```bash
  curl --location --request POST 'http://unstable.holesky.beacon-api.nimbus.team/eth/v1/beacon/pool/voluntary_exits' \
  --header 'accept: */*' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "message": {
      "epoch": "162304",
      "validator_index": "487005"
    },
    "signature": "0xb1ab6ec1476c7797667ac1d460c5adc7215074ba5b"
  }'
  ```
* Wait for exit queue + skimming cycle to get the ETH back to the withdrawal credentials of your validator(s). You have now unstaked!

If you have any questions on this flow, please don't hesitate to reach out to your CSM or SE.&#x20;

### Verify wallet credentials

In certain cases, you may need to verify your wallet credentials before you can generate the exit messages, these are the steps to be taken: &#x20;

* Head to the "Wallet" tab and click on "Add wallet"

<figure><img src="https://1911902555-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fnye3yqpuOzdfrtWAlwng%2Fuploads%2FXxqaaBed4Esrl3WIyArH%2Fwallet.png?alt=media&#x26;token=c7ce848e-d9c6-4fdb-9b6c-7214bca1900c" alt=""><figcaption></figcaption></figure>

* Click on "Connect wallet"&#x20;
* Then click on "Add Wallet" and sign the transaction&#x20;
