---
eip: 8222
label: EIP-8222
title: Lean Staking
status: Draft
type: Standards Track
category: Core
created: 2026-04-09
requires: 6110, 7251
official: https://eips.ethereum.org/EIPS/eip-8222
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8222.md
canonical: https://eips.huatuo.xyz/eip-8222/
lang: en
tldr: "Proposes a two-phase, zero-knowledge staking deposit that breaks the public link between the address that funds a validator and the validator's keys, and can double as a private ETH transfer."
tags: [staking, privacy, zero-knowledge, deposits, core]
---

# EIP-8222: Lean Staking

> L1 native, two-phase staking with validator unlinkability

**TL;DR:** Proposes a two-phase, zero-knowledge staking deposit that breaks the public link between the address that funds a validator and the validator's keys, and can double as a private ETH transfer.

## What problem does it solve?

Today a staking deposit is fully public: anyone can see which execution-layer address funded which validator key. That leaks who runs which validators, which can expose solo and institutional stakers to targeted attacks, including physical ones.

Since [EIP-6110](/eip-6110/) moved deposit processing to the execution layer, the deposit contract itself can be changed to hide that link. Lean Staking does this with a commitment tree and a zero-knowledge proof, in the style of mixer protocols, but built into the one mechanism every validator must use.

## How it works

**Phase 1: pending deposit.** The depositor sends ETH (at least 1 ETH) and a commitment to `add_pending_deposit`, which appends it to an on-chain *pending deposit tree* (an incremental Merkle tree using a SNARK-friendly hash such as Poseidon):

```
commitment = hash(nullifier_preimage | validator_key | withdrawal_cred | amount)
nullifier  = hash(nullifier_preimage)
```

This transaction is public but reveals nothing about the future validator.

**Phase 2: claim.** Later, a *different* party (a relayer or AA bundler) calls `claim` with the validator key, withdrawal credentials, amount, the nullifier and a zk-proof that some unclaimed leaf in a recent tree root matches those values. The contract records the nullifier to block double claims and sends the deposit to the normal validator entry queue. Because the credentials are inside the committed preimage, a front-runner cannot swap in their own keys. The contract keeps a ring buffer of recent roots (the spec suggests something like 1024), so proofs stay valid for a while.

**Optional: two-phase withdrawals.** A new withdrawal credential type `0x03` stores a *withdrawal commitment* instead of an address. On exit, the consensus layer inserts it into a *pending withdrawal tree*, and anyone who knows the secret can claim the ETH to the committed recipient. A pending deposit may also go straight into the withdrawal tree without ever becoming a validator. The result is a private transfer where both sender and recipient look like ordinary stakers. This part requires consensus-layer changes; the deposit side alone does not.

## Sample code

The new deposit entry point, as sketched in the spec:

```solidity
function add_pending_deposit(bytes32 commitment) external payable {
    require(msg.value >= 1 ether);
    bytes32 newRoot = insertLeaf(root, commitment);
    storeRoot(newRoot);                         // kept in a circular buffer
    emit PendingDeposit(commitment, commitmentCount - 1);
}
```

Off-chain, the depositor keeps three secrets safe until the claim: `nullifier_preimage`, the validator key and withdrawal credentials (plus `withdrawal_nullifier_preimage` if using `0x03`).

## Things to know

- **Status: Draft.** The proof encoding, hash function and field are not fixed; the reference implementation uses LeanVM with Poseidon over the Koala-Bear field, which the authors describe as post-quantum ready.
- Privacy depends on the anonymity set. Unusual amounts stand out, so the spec discusses restricting deposits to fixed denominations (e.g. 32 up to 2048 ETH, reflecting [EIP-7251](/eip-7251/) balances), each with its own tree.
- Users should wait a variable time and let many other commitments land before claiming, or timing can link the two phases. The original depositor should not send the claim themselves.
- `0x03` credentials in their current form do not work with [EIP-7002](/eip-7002/) contract-triggered exits; the spec suggests a separate public exit-authority address as a fix.
- The spent-nullifier set grows forever; "evolving nullifiers" are mentioned as a possible remedy.
- Compare [EIP-7503](/eip-7503/) (Wormhole), a different in-protocol privacy approach.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8222
