---
eip: 8148
label: EIP-8148
title: Custom sweep threshold for validators
status: Draft
type: Standards Track
category: Core
created: 2026-02-05
requires: 7251, 7685
official: https://eips.ethereum.org/EIPS/eip-8148
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8148.md
canonical: https://eips.huatuo.xyz/eip-8148/
lang: en
tldr: Lets compounding (0x02) validators choose the balance above which rewards are automatically swept to their withdrawal address, instead of the fixed 2,048 ETH, via a new execution-layer request contract.
tags: [staking, validators, withdrawals, consensus, core]
---

# EIP-8148: Custom sweep threshold for validators

> Allow setting custom balance thresholds for sweep withdrawals for validators with compounding withdrawal credentials (`0x02`).

**TL;DR:** Lets compounding (0x02) validators choose the balance above which rewards are automatically swept to their withdrawal address, instead of the fixed 2,048 ETH, via a new execution-layer request contract.

## What problem does it solve?

[EIP-7251](/eip-7251/) introduced compounding withdrawal credentials (`0x02`), which let a validator's balance grow up to 2,048 ETH. The catch: automatic reward sweeps only kick in above that 2,048 ETH ceiling. A 32 ETH or 128 ETH validator that wants regular payouts has to trigger partial withdrawals manually, which costs a transaction each time and goes through a queue whose waiting time depends on network conditions.

The authors cite this as one reason few validators have switched to `0x02`. EIP-8148 lets each compounding validator set its own sweep threshold, so rewards above, say, 128 ETH flow out automatically through the normal withdrawal sweep.

## How it works

**Execution layer.** A new system contract (address still TBD) accepts *set sweep threshold* requests, modelled on the [EIP-7002](/eip-7002/) withdrawal-request contract:

- Calldata of exactly 56 bytes: the 48-byte validator pubkey followed by an 8-byte big-endian `uint64` threshold. The caller must send at least the current fee.
- Empty calldata returns the current fee. The fee rises exponentially when more than 2 requests per block are queued on average (`fake_exponential` with min fee 1 wei, update fraction 17).
- At the end of each block a system call dequeues up to 16 requests and emits them as [EIP-7685](/eip-7685/) requests of type `0x05`.

**Consensus layer.**

- `BeaconState` gains a `validator_sweep_thresholds` list; existing `0x02` validators default to `MAX_EFFECTIVE_BALANCE_ELECTRA` (2,048 ETH), and `0x00`/`0x01` validators get 0.
- A new `0x02` validator can set its initial threshold in bytes 10–11 of its withdrawal credentials at deposit time; zero bytes mean the default.
- A request can change the threshold only to a value at or above the current balance, and it must be a multiple of `EFFECTIVE_BALANCE_INCREMENT` (1 ETH). This stops the feature from being used as an instant withdrawal.
- The sweep and effective-balance logic use the per-validator threshold instead of the global maximum.

## Sample code

Building and sending a request (ethers v6). The contract address is not yet assigned; the threshold unit below assumes Gwei, as used for consensus-layer balances.

```ts
import { Contract, JsonRpcProvider, Wallet, concat, toBeHex, zeroPadValue } from "ethers";

const PREDEPLOY = process.env.SWEEP_THRESHOLD_CONTRACT!; // TBD in the EIP
const provider = new JsonRpcProvider(process.env.RPC_URL);
const wallet = new Wallet(process.env.PRIVATE_KEY!, provider);

const pubkey = "0x" + "ab".repeat(48);                         // 48-byte BLS pubkey
const thresholdGwei = 128n * 10n ** 9n;                        // 128 ETH, multiple of 1 ETH
const data = concat([pubkey, zeroPadValue(toBeHex(thresholdGwei), 8)]); // 56 bytes

const fee = BigInt(await provider.call({ to: PREDEPLOY, data: "0x" })); // fee getter
await wallet.sendTransaction({ to: PREDEPLOY, data, value: fee });
```

## Things to know

- Status: **Draft**. The contract address, deployment transaction and full consensus specs are still placeholders.
- Fully optional: validators that never send a request keep today's behaviour.
- The request is sent from the execution layer; like EIP-7002, the `source_address` is recorded so the consensus layer can check it against the validator's withdrawal credentials.
- To lower the threshold below the current balance, first partially withdraw down to the desired level, then set the new threshold.
- Overpaying the fee is not refunded; read the current fee first, as with EIP-7002.


---

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