{"eip":3455,"title":"SUDO Opcode","description":"A new opcode is introduced to allow calling from an arbitrary sender address.","authors":["William Morriss (@wjmelements)","Baptiste Vauthey (@thabaptiser)"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2021-04-01","discussionsTo":"https://ethereum-magicians.org/t/eip-3455-sudo-opcode/5860","repo":"EIPs","label":"EIP-3455","officialUrl":"https://eips.ethereum.org/EIPS/eip-3455","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3455.md","url":"https://eips.huatuo.xyz/eip-3455/","tldr":{"en":"A tongue-in-cheek proposal for a SUDO opcode that makes a CALL from any sender address you choose, which would let anyone spend anyone else's funds.","ja":"好きな送信元アドレスから CALL を行う SUDO オペコードの、冗談めかした提案。誰でも他人の資金を使えてしまう。","ko":"원하는 발신자 주소로 CALL을 수행하는 SUDO opcode를 내놓은 농담 섞인 제안으로, 누구나 다른 사람의 자금을 쓸 수 있게 된다.","zh":"一个半开玩笑的提案：新增 SUDO opcode，可以用你选定的任意发送者地址发起 CALL，这会让任何人都能花掉别人的资金。"},"tags":["evm","opcode","core","security"],"explainers":{"en":{"lang":"en","tldr":"A tongue-in-cheek proposal for a SUDO opcode that makes a CALL from any sender address you choose, which would let anyone spend anyone else's funds.","tags":["evm","opcode","core","security"],"related":[20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-3455/","markdown":"## What problem does it solve?\n\nThe proposal lists familiar pain points: tokens sent to the zero address, [ERC-20](/eip-20/) tokens accidentally sent to the token contract itself, funds lost to scams or forgotten private keys, and ether stuck in buggy contracts. Today none of these can be recovered, because only the holder of an account's key (or the contract's own code) can move its assets.\n\nEIP-3455's answer is to let any caller **pick the `msg.sender`** of a call. With that power, recovering stuck funds becomes trivial. So does stealing every other balance on the network, which is the point worth understanding.\n\n## How it works\n\n- A new opcode `SUDO` at `0xf8`.\n- It pops **8** stack items: the 7 parameters of `CALL` with a `sender` address inserted second.\n\n| # | Parameter | Meaning |\n| --- | --- | --- |\n| 1 | gas | Gas allowance for the call |\n| 2 | sender | Becomes `CALLER` inside the called frame |\n| 3 | to | Target address |\n| 4 | value | Wei taken from **sender's** balance |\n| 5–6 | inStart, inSize | Calldata in memory |\n| 7–8 | outStart, outSize | Where return data is written |\n\n- It pushes `1` on success (`STOP`, `RETURN`, `SELFDESTRUCT`) and `0` on failure (`REVERT`, `INVALID`, other exceptional halts), like `CALL`.\n\nIn other words, any contract could impersonate any account, including moving its ether and calling token contracts as that account.\n\n## Sample code\n\nWhat a \"recovery\" would look like in pseudo-assembly. The same few instructions work against any address, not just lost ones:\n\n```\n; SUDO(gas, sender, to, value, inStart, inSize, outStart, outSize)\nPUSH1 0x00          ; outSize\nPUSH1 0x00          ; outStart\nPUSH1 0x44          ; inSize  (transfer(address,uint256) calldata)\nPUSH1 0x00          ; inStart\nPUSH1 0x00          ; value\nPUSH20 \u003ctoken\u003e      ; to\nPUSH20 \u003cvictim\u003e     ; sender  \u003c- arbitrary\nGAS                 ; gas\nSUDO                ; 0xf8, not a real opcode on Ethereum\n```\n\nWhy every authorization check would break (Solidity):\n\n```solidity\nfunction withdraw(uint256 amount) external {\n    // With SUDO, msg.sender can be forged, so this check proves nothing.\n    require(balanceOf[msg.sender] \u003e= amount);\n    // ...\n}\n```\n\n## Things to know\n\n- **Status: Stagnant.** It was never considered for inclusion, and `0xf8` is not a `SUDO` opcode on Ethereum.\n- It was filed on 1 April 2021, and its tone (the entire Security Considerations section reads \"It will be fine.\") suggests it was not intended as a serious proposal. Read it as a thought experiment about why `msg.sender` must be unforgeable.\n- Real approaches to delegated or recoverable control keep the owner's signature in the loop, for example smart-contract wallets with social recovery, or [EIP-7702](/eip-7702/) delegation signed by the account itself.\n- The spec text has small errors worth noting if you read it: it says addresses are \"truncated to lower 40 bytes\", but Ethereum addresses are 20 bytes.\n"},"ja":{"lang":"ja","tldr":"好きな送信元アドレスから CALL を行う SUDO オペコードの、冗談めかした提案。誰でも他人の資金を使えてしまう。","tags":["evm","opcode","core","security"],"related":[20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-3455/","markdown":"## 何を解決するのか\n\nこの提案は、ゼロアドレスへ送ってしまったトークン、トークンコントラクト自身に誤って送られた [ERC-20](/eip-20/) トークン、詐欺や忘れた秘密鍵で失われた資金、バグのあるコントラクトに閉じ込められたイーサなど、おなじみの課題を挙げています。現在はどれも回収できません。アカウントの鍵の持ち主（またはコントラクト自身のコード）だけが、その資産を動かせるからです。\n\nEIP-3455 の答えは、呼び出しの **`msg.sender` を呼び出し元が選べる**ようにすることです。この力があれば、閉じ込められた資金の回収は簡単です。ネットワーク上の他のすべての残高を盗むことも同じく簡単で、理解しておくべき点はそこです。\n\n## 仕組み\n\n- 新しいオペコード `SUDO` を `0xf8` に置きます。\n- スタックから **8** 個の項目をポップします。`CALL` の 7 つのパラメーターに、2 番目として `sender` アドレスを挿入したものです。\n\n| # | パラメーター | 意味 |\n| --- | --- | --- |\n| 1 | gas | 呼び出しのガス許容量 |\n| 2 | sender | 呼び出されたフレーム内で `CALLER` になる |\n| 3 | to | 対象アドレス |\n| 4 | value | **sender の**残高から取られる wei |\n| 5–6 | inStart, inSize | メモリ内の calldata |\n| 7–8 | outStart, outSize | 戻りデータの書き込み先 |\n\n- `CALL` と同様に、成功（`STOP`、`RETURN`、`SELFDESTRUCT`）なら `1`、失敗（`REVERT`、`INVALID`、その他の例外的な停止）なら `0` をプッシュします。\n\nつまり、どのコントラクトでも任意のアカウントになりすませます。そのアカウントのイーサを動かしたり、そのアカウントとしてトークンコントラクトを呼び出したりできます。\n\n## サンプルコード\n\n「回収」が疑似アセンブリでどう見えるかを示します。失われたアドレスに限らず、どのアドレスに対しても同じ数個の命令で動きます。\n\n```\n; SUDO(gas, sender, to, value, inStart, inSize, outStart, outSize)\nPUSH1 0x00          ; outSize\nPUSH1 0x00          ; outStart\nPUSH1 0x44          ; inSize  (transfer(address,uint256) calldata)\nPUSH1 0x00          ; inStart\nPUSH1 0x00          ; value\nPUSH20 \u003ctoken\u003e      ; to\nPUSH20 \u003cvictim\u003e     ; sender  \u003c- arbitrary\nGAS                 ; gas\nSUDO                ; 0xf8, not a real opcode on Ethereum\n```\n\nあらゆる認可チェックが壊れる理由（Solidity）:\n\n```solidity\nfunction withdraw(uint256 amount) external {\n    // With SUDO, msg.sender can be forged, so this check proves nothing.\n    require(balanceOf[msg.sender] \u003e= amount);\n    // ...\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** 採用が検討されたことはなく、`0xf8` は Ethereum では `SUDO` オペコードではありません。\n- 2021 年 4 月 1 日に提出されており、その調子（セキュリティ上の考慮事項の節は全文が「It will be fine.」）から、真面目な提案として意図されたものではないと考えられます。`msg.sender` が偽造不可能でなければならない理由についての思考実験として読んでください。\n- 委任や回復可能な制御の現実的なアプローチは、所有者の署名を関与させたままにします。たとえば、ソーシャルリカバリー付きのスマートコントラクトウォレットや、アカウント自身が署名する [EIP-7702](/eip-7702/) の委任です。\n- 読む際に注意すべき仕様テキストの小さな誤りがあります。アドレスは「下位 40 バイトに切り詰められる」とありますが、Ethereum のアドレスは 20 バイトです。\n"},"ko":{"lang":"ko","tldr":"원하는 발신자 주소로 CALL을 수행하는 SUDO opcode를 내놓은 농담 섞인 제안으로, 누구나 다른 사람의 자금을 쓸 수 있게 된다.","tags":["evm","opcode","core","security"],"related":[20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-3455/","markdown":"## 어떤 문제를 해결하나요?\n\n이 제안은 익숙한 문제들을 나열합니다. 제로 주소로 보낸 토큰, 토큰 컨트랙트 자체로 실수로 보낸 [ERC-20](/eip-20/) 토큰, 사기나 잊어버린 개인 키로 잃은 자금, 버그가 있는 컨트랙트에 갇힌 이더 등입니다. 오늘날 이들은 어느 것도 복구할 수 없습니다. 계정 키를 가진 사람(또는 컨트랙트 자체의 코드)만 그 자산을 옮길 수 있기 때문입니다.\n\nEIP-3455의 해법은 어떤 호출자든 호출의 **`msg.sender`를 직접 고르게** 하는 것입니다. 이 힘이 있으면 갇힌 자금을 되찾는 일은 간단해집니다. 네트워크의 다른 모든 잔액을 훔치는 일도 마찬가지로 간단해지는데, 이해해야 할 핵심이 바로 그 점입니다.\n\n## 어떻게 동작하나요?\n\n- 새 opcode `SUDO`가 `0xf8`에 놓입니다.\n- 스택에서 **8**개 항목을 꺼냅니다. `CALL`의 7개 매개변수에 두 번째 자리로 `sender` 주소를 끼워 넣은 것입니다.\n\n| # | 매개변수 | 의미 |\n| --- | --- | --- |\n| 1 | gas | 호출의 가스 허용량 |\n| 2 | sender | 호출된 프레임 안에서 `CALLER`가 됨 |\n| 3 | to | 대상 주소 |\n| 4 | value | **sender의** 잔액에서 가져오는 wei |\n| 5–6 | inStart, inSize | 메모리 속 calldata |\n| 7–8 | outStart, outSize | 반환 데이터를 쓸 위치 |\n\n- `CALL`처럼 성공(`STOP`, `RETURN`, `SELFDESTRUCT`)하면 `1`을, 실패(`REVERT`, `INVALID`, 그 밖의 예외적 중단)하면 `0`을 푸시합니다.\n\n다시 말해 어떤 컨트랙트든 어떤 계정으로도 행세할 수 있으며, 그 계정의 이더를 옮기고 그 계정으로서 토큰 컨트랙트를 호출할 수도 있습니다.\n\n## 샘플 코드\n\n\"복구\"가 의사 어셈블리에서 어떻게 보일지입니다. 같은 몇 줄의 명령어가 잃어버린 주소뿐 아니라 어떤 주소에도 통합니다.\n\n```\n; SUDO(gas, sender, to, value, inStart, inSize, outStart, outSize)\nPUSH1 0x00          ; outSize\nPUSH1 0x00          ; outStart\nPUSH1 0x44          ; inSize  (transfer(address,uint256) calldata)\nPUSH1 0x00          ; inStart\nPUSH1 0x00          ; value\nPUSH20 \u003ctoken\u003e      ; to\nPUSH20 \u003cvictim\u003e     ; sender  \u003c- arbitrary\nGAS                 ; gas\nSUDO                ; 0xf8, not a real opcode on Ethereum\n```\n\n모든 권한 확인이 깨지는 이유(Solidity):\n\n```solidity\nfunction withdraw(uint256 amount) external {\n    // With SUDO, msg.sender can be forged, so this check proves nothing.\n    require(balanceOf[msg.sender] \u003e= amount);\n    // ...\n}\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** 포함이 검토된 적이 없으며, `0xf8`은 이더리움에서 `SUDO` opcode가 아닙니다.\n- 2021년 4월 1일에 제출되었고, 어조(보안 고려 사항 항목 전체가 \"It will be fine.\"입니다)를 보면 진지한 제안으로 의도된 것이 아닌 듯합니다. `msg.sender`가 왜 위조 불가능해야 하는지에 대한 사고 실험으로 읽으세요.\n- 위임이나 복구 가능한 제어를 위한 실제 접근법은 소유자의 서명을 과정에 남겨 둡니다. 예를 들어 소셜 복구가 있는 스마트 컨트랙트 지갑이나, 계정 스스로 서명하는 [EIP-7702](/eip-7702/) 위임이 있습니다.\n- 사양 본문을 읽을 때 눈여겨볼 작은 오류가 있습니다. 주소가 \"하위 40바이트로 잘린다\"고 하는데, 이더리움 주소는 20바이트입니다.\n"},"zh":{"lang":"zh","tldr":"一个半开玩笑的提案：新增 SUDO opcode，可以用你选定的任意发送者地址发起 CALL，这会让任何人都能花掉别人的资金。","tags":["evm","opcode","core","security"],"related":[20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-3455/","markdown":"## 它解决什么问题？\n\n该提案列出了一些常见的痛点：发送到零地址的代币、不小心发送到代币合约自身的 [ERC-20](/eip-20/) 代币、因诈骗或遗忘私钥而丢失的资金，以及卡在有漏洞合约中的以太币。如今这些都无法找回，因为只有账户密钥的持有者（或合约自身的代码）才能移动其资产。\n\nEIP-3455 给出的办法是让任何调用者都能**选定调用的 `msg.sender`**。有了这种能力，找回卡住的资金就变得轻而易举。偷走网络上其他所有余额也同样轻而易举，这才是值得理解的重点。\n\n## 它如何运作\n\n- 新增 opcode `SUDO`，位于 `0xf8`。\n- 它从栈中弹出 **8** 个项：即 `CALL` 的 7 个参数，并在第二个位置插入一个 `sender` 地址。\n\n| # | 参数 | 含义 |\n| --- | --- | --- |\n| 1 | gas | 本次调用的 gas 额度 |\n| 2 | sender | 在被调用的帧内成为 `CALLER` |\n| 3 | to | 目标地址 |\n| 4 | value | 从 **sender** 的余额中扣除的 wei |\n| 5–6 | inStart, inSize | 内存中的 calldata |\n| 7–8 | outStart, outSize | 返回数据的写入位置 |\n\n- 与 `CALL` 一样，成功（`STOP`、`RETURN`、`SELFDESTRUCT`）时压入 `1`，失败（`REVERT`、`INVALID`、其他异常终止）时压入 `0`。\n\n换句话说，任何合约都可以冒充任何账户，包括转走它的以太币，并以该账户的身份调用代币合约。\n\n## 示例代码\n\n\"找回\"用伪汇编写出来是什么样子。同样的几条指令对任何地址都有效，而不只是针对丢失的地址：\n\n```\n; SUDO(gas, sender, to, value, inStart, inSize, outStart, outSize)\nPUSH1 0x00          ; outSize\nPUSH1 0x00          ; outStart\nPUSH1 0x44          ; inSize  (transfer(address,uint256) calldata)\nPUSH1 0x00          ; inStart\nPUSH1 0x00          ; value\nPUSH20 \u003ctoken\u003e      ; to\nPUSH20 \u003cvictim\u003e     ; sender  \u003c- arbitrary\nGAS                 ; gas\nSUDO                ; 0xf8, not a real opcode on Ethereum\n```\n\n为什么所有授权检查都会失效（Solidity）：\n\n```solidity\nfunction withdraw(uint256 amount) external {\n    // With SUDO, msg.sender can be forged, so this check proves nothing.\n    require(balanceOf[msg.sender] \u003e= amount);\n    // ...\n}\n```\n\n## 需要注意\n\n- **状态：Stagnant。** 它从未被考虑纳入，`0xf8` 在以太坊上并不是 `SUDO` opcode。\n- 它提交于 2021 年 4 月 1 日，其语气（整个“安全考虑”部分只有一句 \"It will be fine.\"）表明它并非认真的提案。请把它当作一个思想实验，用来理解为什么 `msg.sender` 必须不可伪造。\n- 真正可行的委托或可恢复控制方案都会让所有者的签名参与其中，例如带社交恢复的智能合约钱包，或由账户本身签名的 [EIP-7702](/eip-7702/) 委托。\n- 如果你阅读规范文本，值得注意其中有一处小错误：它说地址被\"截断为低 40 字节\"，但以太坊地址是 20 字节。\n"}}}
