{"eip":6810,"title":"Ex Post Facto Cascading Revert","description":"Allow transactions to be reversed after confirmation","authors":["William Morriss (@wjmelements)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2023-04-01","requires":[2718,2929],"discussionsTo":"https://ethereum-magicians.org/t/eip-6810-ex-post-facto-cascading-revert/13630","repo":"EIPs","label":"EIP-6810","officialUrl":"https://eips.ethereum.org/EIPS/eip-6810","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-6810.md","url":"https://eips.huatuo.xyz/eip-6810/","tldr":{"en":"A tongue-in-cheek April 1 proposal for a transaction type that undoes one of your past transactions plus everything that depended on it, illustrating why settlement finality matters.","ja":"過去のトランザクションと、それに依存していたすべてを取り消すトランザクションタイプを提案する、4 月 1 日のジョーク提案。決済のファイナリティがなぜ重要かを示している。","ko":"과거의 트랜잭션과 그에 의존한 모든 것을 되돌리는 트랜잭션 타입을 제안하는 만우절 농담 제안. 결제 최종성이 왜 중요한지 보여 준다.","zh":"一项愚人节玩笑提案：设计一种交易类型，可以撤销你过去的某笔交易以及所有依赖它的内容，用来说明结算最终性为何重要。"},"tags":["core","transactions","satire","finality"],"explainers":{"en":{"lang":"en","tldr":"A tongue-in-cheek April 1 proposal for a transaction type that undoes one of your past transactions plus everything that depended on it, illustrating why settlement finality matters.","tags":["core","transactions","satire","finality"],"related":[2718,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-6810/","markdown":"## What problem does it solve?\n\nOn Ethereum, once a transaction is confirmed it is settled. If you send funds to the wrong address, approve the wrong contract or get scammed, the protocol will not reverse it. Reversibility can be built into smart contracts (escrows, timelocks), but it is not the default.\n\nEIP-6810 \"solves\" this by letting a sender reverse any of their past transactions after the fact, promising to end \"all regret\". It is dated **1 April 2023**, and its text (for example, the Security Considerations section claims an audit by a US state senator, and the Reference Implementation says \"TODO this later\") makes clear it is a joke. It is still a useful thought experiment about why finality is a core property.\n\n## How it works\n\nAs written:\n\n- A new [EIP-2718](/eip-2718/) transaction type `0x5a` with payload `rlp([chainId, nonce, revertNonce, budget, yParity, r, s])`. `revertNonce` picks which of your earlier transactions to undo.\n- The state is rolled back to the start of that transaction. Every piece of state it touched (balances, code, nonces, storage) goes into an access list, in the spirit of [EIP-2929](/eip-2929/).\n- **Any later transaction that read or used that state is also reverted**, and the process cascades forward to the current block.\n- The sender supplies a `budget` in ether. Fees of all reverted transactions are refunded from it, and the remainder goes to the block producer. If the budget runs out, the revert fails and the whole budget is still paid.\n- The transaction must be the only one in its block. Clients are told to snap sync to catch up with the new state.\n\nThe test cases show the problem: reverting the deployment of a contract reverts **every** transaction that ever interacted with it; reverting a funding transaction reverts all later activity of the funded account.\n\n## Sample code\n\nThe transaction envelope as described (pseudocode):\n\n```python\nTX_TYPE = 0x5a\n\npayload = rlp.encode([chain_id, nonce, revert_nonce, budget])\nsig = secp256k1_sign(keccak256(bytes([TX_TYPE]) + payload), sender_key)\n\ntx = bytes([TX_TYPE]) + rlp.encode([\n    chain_id, nonce, revert_nonce, budget,\n    sig.y_parity, sig.r, sig.s,\n])\n\n# Receipt: rlp([status, budgetUsed, removedLogsBloom, [newReceiptPayloads]])\n```\n\nThe cascade rule, informally:\n\n```python\ntainted = state_touched_by(tx_to_revert)\nfor tx in transactions_after(tx_to_revert):\n    if tx.reads_or_writes(tainted):\n        revert(tx)\n        tainted |= state_touched_by(tx)\n```\n\n## Things to know\n\n- **Status: Stagnant**, and it was never a serious candidate for inclusion. Do not build anything expecting it.\n- The design shows why reversible settlement does not work at the base layer: a single revert can invalidate an unbounded set of other users' transactions, exchanges' deposits and DeFi positions, and no one could rely on any confirmation.\n- If you need recoverability, build it at the application or account level: escrow contracts, delayed withdrawals, guardians or social recovery in smart accounts.\n"},"ja":{"lang":"ja","tldr":"過去のトランザクションと、それに依存していたすべてを取り消すトランザクションタイプを提案する、4 月 1 日のジョーク提案。決済のファイナリティがなぜ重要かを示している。","tags":["core","transactions","satire","finality"],"related":[2718,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-6810/","markdown":"## 何を解決するのか\n\nEthereum では、トランザクションが確定すると決済済みになります。誤ったアドレスに送金したり、誤ったコントラクトを承認したり、詐欺に遭ったりしても、プロトコルがそれを巻き戻すことはありません。取り消し可能性はスマートコントラクト（エスクロー、タイムロック）で組み込めますが、デフォルトではありません。\n\nEIP-6810 は、送信者が過去のトランザクションを後から取り消せるようにすることで、これを「解決」し、「あらゆる後悔」を終わらせると約束します。日付は **2023 年 4 月 1 日** で、本文（たとえば Security Considerations には米国の州上院議員による監査を受けたとあり、Reference Implementation には「TODO this later」とある）からジョークであることは明らかです。それでも、ファイナリティがなぜ中核的な性質なのかを考える思考実験として有用です。\n\n## 仕組み\n\n記述されている内容は次のとおりです。\n\n- 新しい [EIP-2718](/eip-2718/) トランザクションタイプ `0x5a`。ペイロードは `rlp([chainId, nonce, revertNonce, budget, yParity, r, s])` です。`revertNonce` で、過去のどのトランザクションを取り消すかを選びます。\n- 状態は、そのトランザクションの開始時点まで巻き戻されます。そのトランザクションが触れたすべての状態（残高、コード、nonce、ストレージ）は、[EIP-2929](/eip-2929/) の考え方に沿ってアクセスリストに入れられます。\n- **その状態を読んだ、または使った後続のトランザクションもすべて取り消され**、この処理は現在のブロックまで連鎖的に伝播します。\n- 送信者は ether で `budget` を指定します。取り消されたすべてのトランザクションの手数料はそこから返金され、残りはブロック生産者に渡ります。budget が尽きると取り消しは失敗しますが、budget 全額は支払われます。\n- このトランザクションは、そのブロック内で唯一のトランザクションでなければなりません。クライアントは、新しい状態に追いつくために snap sync を行うよう指示されます。\n\nテストケースが問題を示しています。コントラクトのデプロイを取り消すと、そのコントラクトとやり取りしたトランザクションが**すべて**取り消されます。資金提供トランザクションを取り消すと、資金を受け取ったアカウントのその後のすべての活動が取り消されます。\n\n## サンプルコード\n\n記述されているトランザクションエンベロープ（擬似コード）:\n\n```python\nTX_TYPE = 0x5a\n\npayload = rlp.encode([chain_id, nonce, revert_nonce, budget])\nsig = secp256k1_sign(keccak256(bytes([TX_TYPE]) + payload), sender_key)\n\ntx = bytes([TX_TYPE]) + rlp.encode([\n    chain_id, nonce, revert_nonce, budget,\n    sig.y_parity, sig.r, sig.s,\n])\n\n# Receipt: rlp([status, budgetUsed, removedLogsBloom, [newReceiptPayloads]])\n```\n\nカスケードの規則を非公式に書くと次のとおりです。\n\n```python\ntainted = state_touched_by(tx_to_revert)\nfor tx in transactions_after(tx_to_revert):\n    if tx.reads_or_writes(tainted):\n        revert(tx)\n        tainted |= state_touched_by(tx)\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** そもそも採用が真剣に検討された候補ではありませんでした。これを前提に何かを構築しないでください。\n- この設計は、ベースレイヤーで取り消し可能な決済が成り立たない理由を示しています。1 回の取り消しが、他のユーザーのトランザクション、取引所の入金、DeFi ポジションなど、際限のない数のものを無効にしうるため、誰もどの確定も信頼できなくなります。\n- 復旧可能性が必要なら、アプリケーション層やアカウント層で構築してください。エスクローコントラクト、出金の遅延、スマートアカウントにおけるガーディアンやソーシャルリカバリーなどです。\n"},"ko":{"lang":"ko","tldr":"과거의 트랜잭션과 그에 의존한 모든 것을 되돌리는 트랜잭션 타입을 제안하는 만우절 농담 제안. 결제 최종성이 왜 중요한지 보여 준다.","tags":["core","transactions","satire","finality"],"related":[2718,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-6810/","markdown":"## 어떤 문제를 해결하나요?\n\n이더리움에서는 트랜잭션이 확정되면 결제가 끝난 것입니다. 잘못된 주소로 자금을 보내거나, 잘못된 컨트랙트를 승인하거나, 사기를 당해도 프로토콜은 이를 되돌려 주지 않습니다. 되돌릴 수 있는 성질은 스마트 컨트랙트(에스크로, 타임락)로 구현할 수 있지만 기본값은 아닙니다.\n\nEIP-6810은 발신자가 과거의 어떤 트랜잭션이든 나중에 되돌릴 수 있게 함으로써 이 문제를 \"해결\"하며, \"모든 후회\"를 끝내겠다고 약속합니다. 날짜는 **2023년 4월 1일**이고, 본문(예: Security Considerations 절은 미국 주 상원의원의 감사를 받았다고 주장하고, Reference Implementation 절에는 \"TODO this later\"라고 적혀 있습니다)을 보면 농담임이 분명합니다. 그래도 최종성이 왜 핵심 속성인지 생각해 보게 하는 유용한 사고 실험입니다.\n\n## 어떻게 동작하나요?\n\n문서에 적힌 내용은 다음과 같습니다.\n\n- 새로운 [EIP-2718](/eip-2718/) 트랜잭션 타입 `0x5a`. 페이로드는 `rlp([chainId, nonce, revertNonce, budget, yParity, r, s])`입니다. `revertNonce`로 이전 트랜잭션 중 어느 것을 되돌릴지 고릅니다.\n- 상태는 해당 트랜잭션이 시작되기 전으로 롤백됩니다. 그 트랜잭션이 건드린 모든 상태(잔액, 코드, nonce, 스토리지)는 [EIP-2929](/eip-2929/)의 취지에 따라 액세스 리스트에 들어갑니다.\n- **그 상태를 읽거나 사용한 이후의 모든 트랜잭션도 되돌려지며**, 이 과정은 현재 블록까지 연쇄적으로 전파됩니다.\n- 발신자는 ether로 `budget`을 제공합니다. 되돌려진 모든 트랜잭션의 수수료가 여기서 환불되고, 나머지는 블록 생산자에게 갑니다. budget이 바닥나면 되돌리기는 실패하지만 budget 전액은 그대로 지불됩니다.\n- 이 트랜잭션은 해당 블록에서 유일한 트랜잭션이어야 합니다. 클라이언트는 새로운 상태를 따라잡기 위해 snap sync를 하도록 되어 있습니다.\n\n테스트 케이스가 문제를 보여 줍니다. 컨트랙트 배포를 되돌리면 그 컨트랙트와 상호작용한 **모든** 트랜잭션이 되돌려지고, 자금 공급 트랜잭션을 되돌리면 자금을 받은 계정의 이후 모든 활동이 되돌려집니다.\n\n## 샘플 코드\n\n설명된 대로의 트랜잭션 봉투(의사 코드):\n\n```python\nTX_TYPE = 0x5a\n\npayload = rlp.encode([chain_id, nonce, revert_nonce, budget])\nsig = secp256k1_sign(keccak256(bytes([TX_TYPE]) + payload), sender_key)\n\ntx = bytes([TX_TYPE]) + rlp.encode([\n    chain_id, nonce, revert_nonce, budget,\n    sig.y_parity, sig.r, sig.s,\n])\n\n# Receipt: rlp([status, budgetUsed, removedLogsBloom, [newReceiptPayloads]])\n```\n\n연쇄 규칙을 비공식적으로 나타내면 다음과 같습니다.\n\n```python\ntainted = state_touched_by(tx_to_revert)\nfor tx in transactions_after(tx_to_revert):\n    if tx.reads_or_writes(tainted):\n        revert(tx)\n        tainted |= state_touched_by(tx)\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** 처음부터 포함을 진지하게 검토한 후보가 아니었습니다. 이를 전제로 무언가를 만들지 마세요.\n- 이 설계는 되돌릴 수 있는 결제가 베이스 레이어에서 통하지 않는 이유를 보여 줍니다. 한 번의 되돌리기가 다른 사용자의 트랜잭션, 거래소의 입금, DeFi 포지션 등 끝을 알 수 없는 범위를 무효화할 수 있어서 누구도 어떤 확정도 신뢰할 수 없게 됩니다.\n- 복구 가능성이 필요하다면 애플리케이션이나 계정 수준에서 구현하세요. 에스크로 컨트랙트, 지연 출금, 스마트 계정의 가디언이나 소셜 복구 등이 있습니다.\n"},"zh":{"lang":"zh","tldr":"一项愚人节玩笑提案：设计一种交易类型，可以撤销你过去的某笔交易以及所有依赖它的内容，用来说明结算最终性为何重要。","tags":["core","transactions","satire","finality"],"related":[2718,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-6810/","markdown":"## 它解决什么问题？\n\n在以太坊上，交易一旦确认就已结算。如果你把资金发到了错误的地址、授权了错误的合约或遭遇诈骗，协议不会替你撤销。可逆性可以在智能合约中实现（托管、时间锁），但并不是默认行为。\n\nEIP-6810 通过允许发送者事后撤销自己过去的任何交易来\"解决\"这个问题，承诺终结\"一切后悔\"。它的日期是 **2023 年 4 月 1 日**，其文本（例如，Security Considerations 一节声称经过一位美国州参议员的审计，Reference Implementation 一节写着\"TODO this later\"）清楚表明这是个玩笑。不过，作为一个思想实验，它仍然有助于理解最终性为何是核心属性。\n\n## 它如何运作\n\n按其文本所述：\n\n- 新增一种 [EIP-2718](/eip-2718/) 交易类型 `0x5a`，载荷为 `rlp([chainId, nonce, revertNonce, budget, yParity, r, s])`。`revertNonce` 用来选择要撤销你之前的哪一笔交易。\n- 状态会回滚到该交易开始之前。它触及的每一项状态（余额、代码、nonce、存储）都按照 [EIP-2929](/eip-2929/) 的思路放入访问列表。\n- **之后任何读取或使用了该状态的交易也会被撤销**，并且这一过程会逐级向前传播直到当前区块。\n- 发送者以 ether 提供一笔 `budget`。所有被撤销交易的手续费都从中退还，剩余部分归区块生产者。如果 budget 用完，撤销失败，但整个 budget 仍然要支付。\n- 该交易必须是其所在区块中的唯一一笔交易。客户端被要求通过 snap sync 来追上新的状态。\n\n测试用例暴露了问题：撤销一个合约的部署，会撤销**所有**曾与它交互过的交易；撤销一笔转入资金的交易，会撤销被转入资金账户之后的全部活动。\n\n## 示例代码\n\n按描述构造的交易信封（伪代码）：\n\n```python\nTX_TYPE = 0x5a\n\npayload = rlp.encode([chain_id, nonce, revert_nonce, budget])\nsig = secp256k1_sign(keccak256(bytes([TX_TYPE]) + payload), sender_key)\n\ntx = bytes([TX_TYPE]) + rlp.encode([\n    chain_id, nonce, revert_nonce, budget,\n    sig.y_parity, sig.r, sig.s,\n])\n\n# Receipt: rlp([status, budgetUsed, removedLogsBloom, [newReceiptPayloads]])\n```\n\n级联规则，非正式地表示如下：\n\n```python\ntainted = state_touched_by(tx_to_revert)\nfor tx in transactions_after(tx_to_revert):\n    if tx.reads_or_writes(tainted):\n        revert(tx)\n        tainted |= state_touched_by(tx)\n```\n\n## 需要注意\n\n- **状态：Stagnant**，而且它从来不是认真的纳入候选。不要基于它构建任何东西。\n- 这一设计说明了为什么可逆结算无法在基础层成立：一次撤销可能使其他用户的交易、交易所的充值和 DeFi 头寸中不可限量的一大批失效，没有人能再信任任何确认。\n- 如果你需要可恢复性，请在应用层或账户层实现：托管合约、延迟提款、智能账户中的守护者或社交恢复。\n"}}}
