{"eip":7804,"title":"Withdrawal Credential Update Request","description":"Allow validators to update their withdrawal credentials via execution requests","authors":["Lucas Saldanha (@lucassaldanha)","Mikhail Kalinin (@mkalinin)"],"status":"Draft","type":"Standards Track","category":"Core","created":"2024-10-31","discussionsTo":"https://ethereum-magicians.org/t/eip-7804-withdrawal-credential-update-request/21514","repo":"EIPs","label":"EIP-7804","officialUrl":"https://eips.ethereum.org/EIPS/eip-7804","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7804.md","url":"https://eips.huatuo.xyz/eip-7804/","tldr":{"en":"A new execution-layer request (type 0x03) that lets a validator change its withdrawal address, or switch between 0x01 and 0x02 credentials, without exiting and re-staking.","ja":"バリデーターが、退出して再ステークすることなく、出金アドレスの変更や 0x01 と 0x02 のクレデンシャル間の切り替えを行えるようにする、新しい実行レイヤーのリクエスト（タイプ 0x03）。","ko":"검증자가 퇴출했다가 다시 스테이킹하지 않고도 출금 주소를 바꾸거나 0x01과 0x02 자격 증명 사이를 전환할 수 있게 하는 새로운 실행 계층 요청(타입 0x03).","zh":"一种新的执行层请求（类型 0x03），让验证者无需退出再重新质押，就能更改提款地址，或在 0x01 与 0x02 凭证之间切换。"},"tags":["staking","validators","withdrawals","execution-requests","core"],"explainers":{"en":{"lang":"en","tldr":"A new execution-layer request (type 0x03) that lets a validator change its withdrawal address, or switch between 0x01 and 0x02 credentials, without exiting and re-staking.","tags":["staking","validators","withdrawals","execution-requests","core"],"related":[7685,7002,7251,7600],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7804/","markdown":"## What problem does it solve?\n\nSince Capella, a validator's withdrawal credentials point to an execution-layer address, and they can be set only once (from the original BLS credentials). After that, they are fixed forever. Stakers have long asked to change them, for example to rotate a possibly compromised key or to move withdrawals to a smart contract.\n\nThis matters more since Pectra. Execution-layer requests ([EIP-7685](/eip-7685/)) let the withdrawal-credential address trigger exits and partial withdrawals ([EIP-7002](/eip-7002/)) and consolidations ([EIP-7251](/eip-7251/)), with the request authorized by whichever address calls the system contract. A validator whose credentials are a plain EOA can never hand that control to a smart contract (for multisig, DAO or protocol management) without exiting and depositing again. EIP-7804 adds the missing \"change my withdrawal address\" request.\n\n## How it works\n\nIt follows the same pattern as the other Pectra request contracts:\n\n- **Request contract.** A predeployed system contract accepts a 68-byte call: the validator's 48-byte BLS `pubkey` plus the 20-byte `new_address`. The caller (`msg.sender`) is recorded as `old_address`. Requests are queued, and a fee that rises with demand (the same excess-based design as EIP-7002) limits spam. An empty call returns the current excess count.\n- **Block processing.** At the end of each block, the client calls the contract from the system address to dequeue up to `MAX_..._PER_BLOCK` (4) requests, and includes them in the block's request list as type `0x03`.\n- **Consensus layer.** For each request, the beacon chain checks that the validator exists, has execution credentials, and that `old_address` matches its current withdrawal address. If so, it rewrites the credentials as `prefix ‖ 11 zero bytes ‖ new_address`, where the prefix is `0x01` (regular) or `0x02` (compounding).\n\nMoving from `0x01` to `0x02` would reuse the existing switch-to-compounding logic, including the churn rules. The spec marks this as a TODO.\n\nBecause authorization is \"the current withdrawal address called the contract\", only whoever controls that address (its private key, or the contract at that address) can change it.\n\n## Sample code\n\nSubmitting a request from the current withdrawal address (ethers v6). The contract address and fee query are taken from the draft and may change:\n\n```ts\nimport { Wallet, JsonRpcProvider, concat, getBytes } from \"ethers\";\n\nconst REQUEST_CONTRACT = \"0x09Fc772D0857550724b07B850a4323f39112aAaA\"; // per current draft\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst withdrawalKey = new Wallet(process.env.WITHDRAWAL_KEY!, provider); // must be the CURRENT credential address\n\nconst pubkey = \"0x\" + \"ab\".repeat(48);                         // validator BLS pubkey (48 bytes)\nconst newAddress = \"0x1111111111111111111111111111111111111111\"; // e.g. a Safe\n\nconst data = concat([pubkey, newAddress]);\nif (getBytes(data).length !== 68) throw new Error(\"bad input\");\n\nconst tx = await withdrawalKey.sendTransaction({\n  to: REQUEST_CONTRACT,\n  data,\n  value: fee, // request fee; exact fee rules are not finalized in the draft\n});\nawait tx.wait();\n```\n\n## Things to know\n\n- Status is **Draft**, with large TODOs: contract bytecode, the full consensus spec, rationale, backward compatibility and tests are missing. `FORK_TIMESTAMP` is TBD and it is not scheduled for any upgrade.\n- The draft is not fully consistent: the request has no field for the new credential prefix (`0x01`/`0x02`), yet the consensus pseudocode reads one. Expect the format to change.\n- Anyone who controls your withdrawal address could redirect future withdrawals, so a leaked withdrawal key would become more dangerous than it is today, where at worst it can trigger exits and withdrawals to that same address.\n- BLS (`0x00`) credentials are out of scope. They still use the existing BLS-to-execution change.\n"},"ja":{"lang":"ja","tldr":"バリデーターが、退出して再ステークすることなく、出金アドレスの変更や 0x01 と 0x02 のクレデンシャル間の切り替えを行えるようにする、新しい実行レイヤーのリクエスト（タイプ 0x03）。","tags":["staking","validators","withdrawals","execution-requests","core"],"related":[7685,7002,7251,7600],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7804/","markdown":"## 何を解決するのか\n\nCapella 以降、バリデーターの出金クレデンシャルは実行レイヤーのアドレスを指し、（元の BLS クレデンシャルから）一度しか設定できません。その後は永久に固定されます。ステーカーは、たとえば侵害された可能性のある鍵を入れ替えたり、出金先をスマートコントラクトに移したりするために、以前から変更を求めてきました。\n\nPectra 以降、これはいっそう重要になっています。実行レイヤーのリクエスト（[EIP-7685](/eip-7685/)）により、出金クレデンシャルのアドレスは、退出や部分出金（[EIP-7002](/eip-7002/)）、統合（[EIP-7251](/eip-7251/)）を起動できます。このとき、リクエストはシステムコントラクトを呼び出したアドレスによって認可されます。クレデンシャルが通常の EOA であるバリデーターは、退出して再度デポジットしない限り、その制御をスマートコントラクト（マルチシグ、DAO、プロトコル管理のため）に引き渡すことができません。EIP-7804 は、欠けていた「出金アドレスを変更する」リクエストを追加します。\n\n## 仕組み\n\nPectra の他のリクエストコントラクトと同じパターンに従います。\n\n- **リクエストコントラクト。** あらかじめデプロイされたシステムコントラクトが、68 バイトの呼び出しを受け付けます。バリデーターの 48 バイトの BLS `pubkey` と、20 バイトの `new_address` です。呼び出し元（`msg.sender`）は `old_address` として記録されます。リクエストはキューに入り、需要に応じて上がる手数料（EIP-7002 と同じ超過量ベースの設計）がスパムを抑制します。空の呼び出しは、現在の超過カウントを返します。\n- **ブロック処理。** 各ブロックの終わりに、クライアントはシステムアドレスからコントラクトを呼び出して最大 `MAX_..._PER_BLOCK`（4）件のリクエストをキューから取り出し、ブロックのリクエストリストにタイプ `0x03` として含めます。\n- **コンセンサスレイヤー。** 各リクエストについて、ビーコンチェーンは、バリデーターが存在すること、実行クレデンシャルを持つこと、`old_address` が現在の出金アドレスと一致することを確認します。条件を満たせば、クレデンシャルを `prefix ‖ 11 zero bytes ‖ new_address` に書き換えます。prefix は `0x01`（通常）または `0x02`（コンパウンディング）です。\n\n`0x01` から `0x02` への移行では、チャーンのルールを含め、既存のコンパウンディングへの切り替えロジックを再利用する予定です。仕様ではこれを TODO としています。\n\n認可は「現在の出金アドレスがコントラクトを呼び出したこと」なので、そのアドレスを制御する人（その秘密鍵、またはそのアドレスにあるコントラクト）だけが変更できます。\n\n## サンプルコード\n\n現在の出金アドレスからリクエストを送信する（ethers v6）。コントラクトアドレスと手数料の問い合わせはドラフトから取ったもので、変更される可能性があります。\n\n```ts\nimport { Wallet, JsonRpcProvider, concat, getBytes } from \"ethers\";\n\nconst REQUEST_CONTRACT = \"0x09Fc772D0857550724b07B850a4323f39112aAaA\"; // per current draft\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst withdrawalKey = new Wallet(process.env.WITHDRAWAL_KEY!, provider); // must be the CURRENT credential address\n\nconst pubkey = \"0x\" + \"ab\".repeat(48);                         // validator BLS pubkey (48 bytes)\nconst newAddress = \"0x1111111111111111111111111111111111111111\"; // e.g. a Safe\n\nconst data = concat([pubkey, newAddress]);\nif (getBytes(data).length !== 68) throw new Error(\"bad input\");\n\nconst tx = await withdrawalKey.sendTransaction({\n  to: REQUEST_CONTRACT,\n  data,\n  value: fee, // request fee; exact fee rules are not finalized in the draft\n});\nawait tx.wait();\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** で、大きな TODO が残っています。コントラクトのバイトコード、コンセンサス仕様の全体、根拠（rationale）、後方互換性、テストが不足しています。`FORK_TIMESTAMP` は TBD で、どのアップグレードにもスケジュールされていません。\n- ドラフトは完全には整合していません。リクエストには新しいクレデンシャルの prefix（`0x01`/`0x02`）のフィールドがありませんが、コンセンサスの擬似コードはそれを読み取っています。フォーマットは変わると考えてください。\n- 出金アドレスを制御する人は、将来の出金先を変更できてしまいます。そのため、出金鍵の漏えいは現在より危険になります。現在は、最悪でも同じアドレスへの退出と出金を起動できるだけです。\n- BLS（`0x00`）クレデンシャルは対象外です。これらは引き続き既存の BLS から実行レイヤーへの変更を使います。\n"},"ko":{"lang":"ko","tldr":"검증자가 퇴출했다가 다시 스테이킹하지 않고도 출금 주소를 바꾸거나 0x01과 0x02 자격 증명 사이를 전환할 수 있게 하는 새로운 실행 계층 요청(타입 0x03).","tags":["staking","validators","withdrawals","execution-requests","core"],"related":[7685,7002,7251,7600],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7804/","markdown":"## 어떤 문제를 해결하나요?\n\nCapella 이후 검증자의 출금 자격 증명은 실행 계층 주소를 가리키며, (원래의 BLS 자격 증명에서) 한 번만 설정할 수 있습니다. 그 뒤에는 영원히 고정됩니다. 스테이커들은 예를 들어 유출되었을 수 있는 키를 교체하거나 출금을 스마트 컨트랙트로 옮기기 위해 오래전부터 변경을 요구해 왔습니다.\n\nPectra 이후에는 이것이 더 중요해졌습니다. 실행 계층 요청([EIP-7685](/eip-7685/))을 통해 출금 자격 증명 주소가 퇴출과 부분 출금([EIP-7002](/eip-7002/)), 통합([EIP-7251](/eip-7251/))을 트리거할 수 있고, 요청은 시스템 컨트랙트를 호출한 주소가 승인합니다. 자격 증명이 일반 EOA인 검증자는 퇴출하고 다시 예치하지 않는 한 이 통제권을 스마트 컨트랙트(멀티시그, DAO, 프로토콜 관리용)에 넘길 수 없습니다. EIP-7804는 빠져 있던 \"내 출금 주소 변경\" 요청을 추가합니다.\n\n## 어떻게 동작하나요?\n\nPectra의 다른 요청 컨트랙트와 같은 패턴을 따릅니다.\n\n- **요청 컨트랙트.** 미리 배포된 시스템 컨트랙트가 68바이트 호출을 받습니다. 검증자의 48바이트 BLS `pubkey`와 20바이트 `new_address`입니다. 호출자(`msg.sender`)는 `old_address`로 기록됩니다. 요청은 대기열에 들어가며, 수요에 따라 오르는 수수료(EIP-7002와 같은 초과량 기반 설계)가 스팸을 억제합니다. 빈 호출은 현재 초과 카운트를 반환합니다.\n- **블록 처리.** 각 블록이 끝날 때 클라이언트가 시스템 주소에서 컨트랙트를 호출해 최대 `MAX_..._PER_BLOCK`(4)개의 요청을 대기열에서 꺼내고, 블록의 요청 목록에 타입 `0x03`으로 포함시킵니다.\n- **합의 계층.** 각 요청에 대해 비콘 체인은 검증자가 존재하는지, 실행 자격 증명이 있는지, `old_address`가 현재 출금 주소와 일치하는지 확인합니다. 그렇다면 자격 증명을 `prefix ‖ 11 zero bytes ‖ new_address`로 다시 씁니다. prefix는 `0x01`(일반) 또는 `0x02`(복리)입니다.\n\n`0x01`에서 `0x02`로의 전환은 churn 규칙을 포함해 기존의 복리 전환 로직을 재사용할 예정입니다. 스펙은 이를 TODO로 표시하고 있습니다.\n\n승인 기준이 \"현재 출금 주소가 컨트랙트를 호출했다\"는 것이므로, 그 주소를 통제하는 사람(그 개인 키 또는 그 주소에 있는 컨트랙트)만 변경할 수 있습니다.\n\n## 샘플 코드\n\n현재 출금 주소에서 요청 제출하기(ethers v6). 컨트랙트 주소와 수수료 조회는 초안에서 가져온 것으로 바뀔 수 있습니다.\n\n```ts\nimport { Wallet, JsonRpcProvider, concat, getBytes } from \"ethers\";\n\nconst REQUEST_CONTRACT = \"0x09Fc772D0857550724b07B850a4323f39112aAaA\"; // per current draft\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst withdrawalKey = new Wallet(process.env.WITHDRAWAL_KEY!, provider); // must be the CURRENT credential address\n\nconst pubkey = \"0x\" + \"ab\".repeat(48);                         // validator BLS pubkey (48 bytes)\nconst newAddress = \"0x1111111111111111111111111111111111111111\"; // e.g. a Safe\n\nconst data = concat([pubkey, newAddress]);\nif (getBytes(data).length !== 68) throw new Error(\"bad input\");\n\nconst tx = await withdrawalKey.sendTransaction({\n  to: REQUEST_CONTRACT,\n  data,\n  value: fee, // request fee; exact fee rules are not finalized in the draft\n});\nawait tx.wait();\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**이며 큰 TODO가 남아 있습니다. 컨트랙트 바이트코드, 전체 합의 스펙, 근거(rationale), 하위 호환성, 테스트가 빠져 있습니다. `FORK_TIMESTAMP`는 TBD이며 어떤 업그레이드에도 예정되어 있지 않습니다.\n- 초안은 완전히 일관되지 않습니다. 요청에는 새 자격 증명 prefix(`0x01`/`0x02`)를 위한 필드가 없는데, 합의 의사 코드는 그것을 읽습니다. 형식이 바뀔 것으로 예상하세요.\n- 출금 주소를 통제하는 사람은 앞으로의 출금을 다른 곳으로 돌릴 수 있으므로, 출금 키 유출은 지금보다 더 위험해집니다. 지금은 최악의 경우에도 같은 주소로의 퇴출과 출금만 트리거할 수 있습니다.\n- BLS(`0x00`) 자격 증명은 범위 밖입니다. 이들은 기존의 BLS-실행 계층 변경을 계속 사용합니다.\n"},"zh":{"lang":"zh","tldr":"一种新的执行层请求（类型 0x03），让验证者无需退出再重新质押，就能更改提款地址，或在 0x01 与 0x02 凭证之间切换。","tags":["staking","validators","withdrawals","execution-requests","core"],"related":[7685,7002,7251,7600],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7804/","markdown":"## 它解决什么问题？\n\n自 Capella 起，验证者的提款凭证指向一个执行层地址，并且只能设置一次（从最初的 BLS 凭证改为执行层凭证）。此后便永远固定。质押者长期以来一直希望能更改它，例如更换可能已泄露的密钥，或将提款转移到智能合约。\n\n自 Pectra 以来，这一点更加重要。执行层请求（[EIP-7685](/eip-7685/)）让提款凭证地址可以触发退出和部分提款（[EIP-7002](/eip-7002/)）以及合并（[EIP-7251](/eip-7251/)），请求由调用系统合约的地址授权。凭证是普通 EOA 的验证者，如果不退出并重新存入，就永远无法把这种控制权交给智能合约（用于多签、DAO 或协议管理）。EIP-7804 补上了缺失的\"更改我的提款地址\"请求。\n\n## 它如何运作\n\n它遵循与 Pectra 其他请求合约相同的模式：\n\n- **请求合约。** 一个预部署的系统合约接受 68 字节的调用：验证者 48 字节的 BLS `pubkey` 加上 20 字节的 `new_address`。调用者（`msg.sender`）被记录为 `old_address`。请求进入队列，并且有一笔随需求上升的费用（与 EIP-7002 相同的基于超额量的设计）来限制垃圾请求。空调用会返回当前的超额计数。\n- **区块处理。** 在每个区块结束时，客户端从系统地址调用该合约，取出最多 `MAX_..._PER_BLOCK`（4）个请求，并以类型 `0x03` 加入区块的请求列表。\n- **共识层。** 对每个请求，信标链检查该验证者是否存在、是否有执行层凭证，以及 `old_address` 是否与其当前提款地址一致。若满足，则把凭证改写为 `prefix ‖ 11 zero bytes ‖ new_address`，其中 prefix 为 `0x01`（普通）或 `0x02`（复利）。\n\n从 `0x01` 切换到 `0x02` 将复用现有的切换到复利的逻辑，包括 churn 规则。规范将此标记为 TODO。\n\n由于授权的依据是\"当前提款地址调用了该合约\"，只有控制该地址的人（其私钥，或该地址上的合约）才能更改它。\n\n## 示例代码\n\n从当前提款地址提交请求（ethers v6）。合约地址和费用查询取自草案，可能会变化：\n\n```ts\nimport { Wallet, JsonRpcProvider, concat, getBytes } from \"ethers\";\n\nconst REQUEST_CONTRACT = \"0x09Fc772D0857550724b07B850a4323f39112aAaA\"; // per current draft\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst withdrawalKey = new Wallet(process.env.WITHDRAWAL_KEY!, provider); // must be the CURRENT credential address\n\nconst pubkey = \"0x\" + \"ab\".repeat(48);                         // validator BLS pubkey (48 bytes)\nconst newAddress = \"0x1111111111111111111111111111111111111111\"; // e.g. a Safe\n\nconst data = concat([pubkey, newAddress]);\nif (getBytes(data).length !== 68) throw new Error(\"bad input\");\n\nconst tx = await withdrawalKey.sendTransaction({\n  to: REQUEST_CONTRACT,\n  data,\n  value: fee, // request fee; exact fee rules are not finalized in the draft\n});\nawait tx.wait();\n```\n\n## 需要注意\n\n- 状态为 **Draft**，仍有大量 TODO：合约字节码、完整的共识规范、理由（rationale）、向后兼容性和测试都缺失。`FORK_TIMESTAMP` 为 TBD，也没有被安排进任何升级。\n- 草案并不完全一致：请求中没有新凭证前缀（`0x01`/`0x02`）的字段，但共识伪代码却读取了一个。预计格式会有变化。\n- 任何控制你提款地址的人都可以重定向未来的提款，因此泄露的提款密钥会比现在更危险；在现在的机制下，它最坏只能触发退出以及向同一个地址提款。\n- BLS（`0x00`）凭证不在范围内，它们仍使用现有的 BLS 到执行层的更改方式。\n"}}}
