{"eip":7708,"title":"ETH transfers emit a log","description":"All ETH transfers emit a log","authors":["Vitalik Buterin (@vbuterin)","Peter Davies (@petertdavies)","Etan Kissling (@etan-status)","Gajinder Singh (@g11tech)","Carson (@carsons-eels)","Jared Wasinger (@jwasinger)"],"status":"Last Call","type":"Standards Track","category":"Core","created":"2024-05-17","requires":[1559,4788,6780,8246],"discussionsTo":"https://ethereum-magicians.org/t/eip-7708-eth-transfers-emit-a-log/20034","repo":"EIPs","label":"EIP-7708","officialUrl":"https://eips.ethereum.org/EIPS/eip-7708","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7708.md","url":"https://eips.huatuo.xyz/eip-7708/","tldr":{"en":"Makes every non-zero ETH transfer, including those from contracts, emit an ERC-20-style Transfer log, so ETH movements can be tracked the same way as token transfers.","ja":"0 でないすべての ETH 送金（コントラクトからのものを含む）が ERC-20 形式の Transfer ログを発行するようにし、ETH の移動をトークン送金と同じ方法で追跡できるようにする。","ko":"0이 아닌 모든 ETH 전송(컨트랙트에서 보내는 것 포함)이 ERC-20 방식의 Transfer 로그를 발생시키게 해, ETH 이동을 토큰 전송과 같은 방식으로 추적할 수 있게 한다.","zh":"让每一笔非零的 ETH 转账（包括来自合约的转账）都发出 ERC-20 风格的 Transfer 日志，这样 ETH 的流动就能像代币转账一样被追踪。"},"tags":["eth","logs","indexing","core","transfers"],"explainers":{"en":{"lang":"en","tldr":"Makes every non-zero ETH transfer, including those from contracts, emit an ERC-20-style Transfer log, so ETH movements can be tracked the same way as token transfers.","tags":["eth","logs","indexing","core","transfers"],"related":[20,4788,8246,1559],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7708/","markdown":"## What problem does it solve?\n\nWallets, exchanges and indexers track [ERC-20](/eip-20/) tokens by watching `Transfer` logs. ETH has no such log. A transfer from an EOA is visible in the block's transaction list, but ETH sent by a smart contract (a `CALL` with value, a `SELFDESTRUCT`, a contract creation with endowment) leaves no log at all. Finding it requires tracing every transaction.\n\nThis has caused real problems: early exchanges often failed to credit deposits from smart contract wallets, or credited them only after long delays. EIP-7708 gives ETH one uniform, cheap-to-query record.\n\n## How it works\n\nThe protocol automatically emits a log identical to a `LOG3` for:\n\n- a transaction that sends non-zero value to a different account (emitted before any other logs in that transaction);\n- a `CALL` with non-zero value to a different account;\n- a `SELFDESTRUCT` sending non-zero value to a different account;\n- a `CREATE` / `CREATE2` with non-zero value to the new account.\n\n| Field | Value |\n| --- | --- |\n| emitting `address` | `0xfffffffffffffffffffffffffffffffffffffffe` (the `SYSTEM_ADDRESS` from [EIP-4788](/eip-4788/)) |\n| `topics[0]` | `keccak256(\"Transfer(address,address,uint256)\")` |\n| `topics[1]` | `from`, left-padded to 32 bytes |\n| `topics[2]` | `to`, left-padded to 32 bytes |\n| `data` | amount in wei, big-endian `uint256` |\n\nThis matches the ERC-20 `Transfer` event, so existing tooling can decode it. The special emitter address separates protocol-generated logs from logs emitted by user contracts.\n\nNot logged: zero-value transfers, reverted calls, priority-fee payments to the block producer, the base fee burn, and withdrawals. Those are already derivable from headers, receipts or block data.\n\n## Sample code\n\nWatching ETH transfers to an address with ethers v6:\n\n```ts\nimport { JsonRpcProvider, id, zeroPadValue, getAddress, formatEther, AbiCoder } from \"ethers\";\n\nconst SYSTEM_ADDRESS = \"0xfffffffffffffffffffffffffffffffffffffffe\";\nconst TRANSFER = id(\"Transfer(address,address,uint256)\");\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst me = getAddress(process.env.MY_ADDRESS!);\n\nconst logs = await provider.getLogs({\n  address: SYSTEM_ADDRESS,\n  topics: [TRANSFER, null, zeroPadValue(me, 32)],\n  fromBlock: -100,\n});\n\nfor (const log of logs) {\n  const from = getAddress(\"0x\" + log.topics[1].slice(26));\n  const [amount] = AbiCoder.defaultAbiCoder().decode([\"uint256\"], log.data);\n  console.log(`${formatEther(amount)} ETH from ${from} in tx ${log.transactionHash}`);\n}\n```\n\n## Things to know\n\n- **Status: Last Call** (deadline 2026-11-01). Logs appear only on chains that have activated the EIP; do not rely on them before then.\n- Ordering: the transaction-level transfer log comes first, and logs from nested calls appear in the order the calls happen.\n- It requires [EIP-8246](/eip-8246/), which removes ETH burning via `SELFDESTRUCT`, so that edge case no longer needs special handling.\n- The spec argues there is no DoS risk: a value transfer already costs at least 6,700 gas, far more than a `LOG3` (1,500 gas). It does raise the average number of logs per block.\n- Indexers that sum both ERC-20 logs and these logs must filter by emitter address so ETH is not confused with a token.\n"},"ja":{"lang":"ja","tldr":"0 でないすべての ETH 送金（コントラクトからのものを含む）が ERC-20 形式の Transfer ログを発行するようにし、ETH の移動をトークン送金と同じ方法で追跡できるようにする。","tags":["eth","logs","indexing","core","transfers"],"related":[20,4788,8246,1559],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7708/","markdown":"## 何を解決するのか\n\nウォレット、取引所、インデクサーは `Transfer` ログを監視して [ERC-20](/eip-20/) トークンを追跡します。ETH にはそのようなログがありません。EOA からの送金はブロックのトランザクション一覧に表示されますが、スマートコントラクトが送る ETH（value 付きの `CALL`、`SELFDESTRUCT`、資金付きのコントラクト作成）にはログがまったく残りません。見つけるにはすべてのトランザクションをトレースする必要があります。\n\nこれは実際に問題を起こしてきました。初期の取引所は、スマートコントラクトウォレットからの入金を反映できなかったり、長い遅延の後でしか反映できなかったりすることがよくありました。EIP-7708 は ETH に、均一で低コストでクエリできる記録を与えます。\n\n## 仕組み\n\nプロトコルは、次の場合に `LOG3` と同一のログを自動的に発行します。\n\n- 別のアカウントに 0 でない value を送るトランザクション（そのトランザクション内の他のログより前に発行）\n- 別のアカウントに 0 でない value を送る `CALL`\n- 別のアカウントに 0 でない value を送る `SELFDESTRUCT`\n- 新しいアカウントに 0 でない value を送る `CREATE` / `CREATE2`\n\n| フィールド | 値 |\n| --- | --- |\n| 発行元 `address` | `0xfffffffffffffffffffffffffffffffffffffffe`（[EIP-4788](/eip-4788/) の `SYSTEM_ADDRESS`） |\n| `topics[0]` | `keccak256(\"Transfer(address,address,uint256)\")` |\n| `topics[1]` | `from`（32 バイトに左パディング） |\n| `topics[2]` | `to`（32 バイトに左パディング） |\n| `data` | wei 単位の金額（ビッグエンディアンの `uint256`） |\n\nこれは ERC-20 の `Transfer` イベントと一致するため、既存のツールでデコードできます。特別な発行元アドレスにより、プロトコルが生成したログと、ユーザーのコントラクトが発行したログが区別されます。\n\nログに記録されないもの: value が 0 の送金、revert した呼び出し、ブロック生成者へのプライオリティ手数料の支払い、base fee のバーン、ウィズドローアル。これらはヘッダー、レシート、ブロックデータからすでに導出できます。\n\n## サンプルコード\n\nethers v6 でアドレス宛ての ETH 送金を監視する例:\n\n```ts\nimport { JsonRpcProvider, id, zeroPadValue, getAddress, formatEther, AbiCoder } from \"ethers\";\n\nconst SYSTEM_ADDRESS = \"0xfffffffffffffffffffffffffffffffffffffffe\";\nconst TRANSFER = id(\"Transfer(address,address,uint256)\");\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst me = getAddress(process.env.MY_ADDRESS!);\n\nconst logs = await provider.getLogs({\n  address: SYSTEM_ADDRESS,\n  topics: [TRANSFER, null, zeroPadValue(me, 32)],\n  fromBlock: -100,\n});\n\nfor (const log of logs) {\n  const from = getAddress(\"0x\" + log.topics[1].slice(26));\n  const [amount] = AbiCoder.defaultAbiCoder().decode([\"uint256\"], log.data);\n  console.log(`${formatEther(amount)} ETH from ${from} in tx ${log.transactionHash}`);\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Last Call**（期限 2026-11-01）。ログはこの EIP を有効化したチェーンにのみ現れます。それ以前は当てにしないでください。\n- 順序: トランザクションレベルの送金ログが最初に来て、ネストした呼び出しのログは呼び出しが行われた順に現れます。\n- [EIP-8246](/eip-8246/) が必要です。これは `SELFDESTRUCT` による ETH のバーンを廃止するもので、そのエッジケースに特別な処理が不要になります。\n- 仕様は DoS リスクはないと主張しています。value 付きの送金はすでに少なくとも 6,700 gas かかり、`LOG3`（1,500 gas）よりはるかに高いためです。ただし、ブロックあたりの平均ログ数は増えます。\n- ERC-20 のログとこのログの両方を合算するインデクサーは、ETH がトークンと混同されないよう、発行元アドレスでフィルタする必要があります。\n"},"ko":{"lang":"ko","tldr":"0이 아닌 모든 ETH 전송(컨트랙트에서 보내는 것 포함)이 ERC-20 방식의 Transfer 로그를 발생시키게 해, ETH 이동을 토큰 전송과 같은 방식으로 추적할 수 있게 한다.","tags":["eth","logs","indexing","core","transfers"],"related":[20,4788,8246,1559],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7708/","markdown":"## 어떤 문제를 해결하나요?\n\n지갑, 거래소, 인덱서는 `Transfer` 로그를 지켜보며 [ERC-20](/eip-20/) 토큰을 추적합니다. ETH에는 그런 로그가 없습니다. EOA의 전송은 블록의 트랜잭션 목록에서 보이지만, 스마트 컨트랙트가 보내는 ETH(value가 있는 `CALL`, `SELFDESTRUCT`, 자금이 딸린 컨트랙트 생성)는 로그가 전혀 남지 않습니다. 찾으려면 모든 트랜잭션을 트레이싱해야 합니다.\n\n이는 실제로 문제를 일으켰습니다. 초기 거래소들은 스마트 컨트랙트 지갑의 입금을 반영하지 못하거나 오랜 지연 뒤에야 반영하는 일이 많았습니다. EIP-7708은 ETH에 균일하고 조회 비용이 낮은 기록을 제공합니다.\n\n## 어떻게 동작하나요?\n\n프로토콜은 다음 경우에 `LOG3`과 동일한 로그를 자동으로 발생시킵니다.\n\n- 다른 계정에 0이 아닌 value를 보내는 트랜잭션(해당 트랜잭션의 다른 로그보다 먼저 발생)\n- 다른 계정에 0이 아닌 value를 보내는 `CALL`\n- 다른 계정에 0이 아닌 value를 보내는 `SELFDESTRUCT`\n- 새 계정에 0이 아닌 value를 보내는 `CREATE` / `CREATE2`\n\n| 필드 | 값 |\n| --- | --- |\n| 발생 주체 `address` | `0xfffffffffffffffffffffffffffffffffffffffe` ([EIP-4788](/eip-4788/)의 `SYSTEM_ADDRESS`) |\n| `topics[0]` | `keccak256(\"Transfer(address,address,uint256)\")` |\n| `topics[1]` | `from`, 32바이트로 왼쪽 패딩 |\n| `topics[2]` | `to`, 32바이트로 왼쪽 패딩 |\n| `data` | wei 단위 금액, 빅엔디언 `uint256` |\n\nERC-20 `Transfer` 이벤트와 같으므로 기존 도구로 디코딩할 수 있습니다. 특수한 발생 주체 주소 덕분에 프로토콜이 만든 로그와 사용자 컨트랙트가 발생시킨 로그가 구분됩니다.\n\n기록되지 않는 것: value가 0인 전송, revert된 호출, 블록 생성자에게 지급되는 priority fee, base fee 소각, 출금(withdrawal). 이들은 이미 헤더, 영수증, 블록 데이터에서 알 수 있습니다.\n\n## 샘플 코드\n\nethers v6로 특정 주소로 들어오는 ETH 전송을 지켜보는 예:\n\n```ts\nimport { JsonRpcProvider, id, zeroPadValue, getAddress, formatEther, AbiCoder } from \"ethers\";\n\nconst SYSTEM_ADDRESS = \"0xfffffffffffffffffffffffffffffffffffffffe\";\nconst TRANSFER = id(\"Transfer(address,address,uint256)\");\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst me = getAddress(process.env.MY_ADDRESS!);\n\nconst logs = await provider.getLogs({\n  address: SYSTEM_ADDRESS,\n  topics: [TRANSFER, null, zeroPadValue(me, 32)],\n  fromBlock: -100,\n});\n\nfor (const log of logs) {\n  const from = getAddress(\"0x\" + log.topics[1].slice(26));\n  const [amount] = AbiCoder.defaultAbiCoder().decode([\"uint256\"], log.data);\n  console.log(`${formatEther(amount)} ETH from ${from} in tx ${log.transactionHash}`);\n}\n```\n\n## 알아둘 점\n\n- **상태: Last Call** (마감 2026-11-01). 로그는 이 EIP를 활성화한 체인에서만 나타납니다. 그 전에는 의존하지 마세요.\n- 순서: 트랜잭션 수준의 전송 로그가 가장 먼저 나오고, 중첩 호출의 로그는 호출이 일어난 순서대로 나옵니다.\n- `SELFDESTRUCT`를 통한 ETH 소각을 없애는 [EIP-8246](/eip-8246/)이 필요하며, 덕분에 그 예외 상황을 따로 처리할 필요가 없어집니다.\n- 명세는 DoS 위험이 없다고 주장합니다. value 전송은 이미 최소 6,700 gas가 들어 `LOG3`(1,500 gas)보다 훨씬 비싸기 때문입니다. 다만 블록당 평균 로그 수는 늘어납니다.\n- ERC-20 로그와 이 로그를 함께 합산하는 인덱서는 ETH가 토큰과 혼동되지 않도록 발생 주체 주소로 필터링해야 합니다.\n"},"zh":{"lang":"zh","tldr":"让每一笔非零的 ETH 转账（包括来自合约的转账）都发出 ERC-20 风格的 Transfer 日志，这样 ETH 的流动就能像代币转账一样被追踪。","tags":["eth","logs","indexing","core","transfers"],"related":[20,4788,8246,1559],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7708/","markdown":"## 它解决什么问题？\n\n钱包、交易所和索引器通过监听 `Transfer` 日志来追踪 [ERC-20](/eip-20/) 代币。ETH 没有这样的日志。来自 EOA 的转账可以在区块的交易列表中看到，但智能合约发送的 ETH（带 value 的 `CALL`、`SELFDESTRUCT`、带初始资金的合约创建）完全不会留下日志。要找到这些转账，就必须追踪每一笔交易。\n\n这已经造成了实际问题：早期交易所经常无法为来自智能合约钱包的充值入账，或者要等很久才入账。EIP-7708 为 ETH 提供了一种统一且查询成本低的记录。\n\n## 它如何运作\n\n在以下情况下，协议会自动发出与 `LOG3` 完全相同的日志：\n\n- 向另一个账户发送非零 value 的交易（先于该交易中的其他日志发出）；\n- 向另一个账户发送非零 value 的 `CALL`；\n- 向另一个账户发送非零 value 的 `SELFDESTRUCT`；\n- 向新账户发送非零 value 的 `CREATE` / `CREATE2`。\n\n| 字段 | 值 |\n| --- | --- |\n| 发出者 `address` | `0xfffffffffffffffffffffffffffffffffffffffe`（[EIP-4788](/eip-4788/) 中的 `SYSTEM_ADDRESS`） |\n| `topics[0]` | `keccak256(\"Transfer(address,address,uint256)\")` |\n| `topics[1]` | `from`，左填充至 32 字节 |\n| `topics[2]` | `to`，左填充至 32 字节 |\n| `data` | 以 wei 计的金额，大端 `uint256` |\n\n它与 ERC-20 的 `Transfer` 事件一致，因此现有工具可以直接解码。特殊的发出者地址把协议生成的日志与用户合约发出的日志区分开来。\n\n不会记录的情况：零 value 转账、已 revert 的调用、向区块生产者支付的优先费、base fee 销毁以及提款。这些都可以从区块头、收据或区块数据中推导出来。\n\n## 示例代码\n\n使用 ethers v6 监听发往某地址的 ETH 转账：\n\n```ts\nimport { JsonRpcProvider, id, zeroPadValue, getAddress, formatEther, AbiCoder } from \"ethers\";\n\nconst SYSTEM_ADDRESS = \"0xfffffffffffffffffffffffffffffffffffffffe\";\nconst TRANSFER = id(\"Transfer(address,address,uint256)\");\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst me = getAddress(process.env.MY_ADDRESS!);\n\nconst logs = await provider.getLogs({\n  address: SYSTEM_ADDRESS,\n  topics: [TRANSFER, null, zeroPadValue(me, 32)],\n  fromBlock: -100,\n});\n\nfor (const log of logs) {\n  const from = getAddress(\"0x\" + log.topics[1].slice(26));\n  const [amount] = AbiCoder.defaultAbiCoder().decode([\"uint256\"], log.data);\n  console.log(`${formatEther(amount)} ETH from ${from} in tx ${log.transactionHash}`);\n}\n```\n\n## 需要注意\n\n- **状态：Last Call**（截止日期 2026-11-01）。只有激活了该 EIP 的链上才会出现这些日志，在此之前不要依赖它们。\n- 顺序：交易级的转账日志最先出现，嵌套调用产生的日志按调用发生的顺序出现。\n- 它依赖 [EIP-8246](/eip-8246/)，该提案移除了通过 `SELFDESTRUCT` 销毁 ETH 的行为，因此这种边界情况不再需要特殊处理。\n- 规范认为不存在 DoS 风险：带 value 的转账本身至少已消耗 6,700 gas，远高于一次 `LOG3`（1,500 gas）。不过它确实会提高每个区块的平均日志数量。\n- 同时汇总 ERC-20 日志和这类日志的索引器，必须按发出者地址过滤，以免把 ETH 与代币混淆。\n"}},"requiredBy":[2780,7503,7799,7919,8141,8358]}
