{"eip":8054,"title":"Forkable ERC-20 Token","description":"Checkpoint-based ERC-20 tokens that can be efficiently forked to distribute new tokens to existing holders.","authors":["Kevin (@kevzzsk)","Fuxing (@fuxingloh)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2025-10-10","requires":[20],"discussionsTo":"https://ethereum-magicians.org/t/erc-8054-forkable-erc-20-token/25853","repo":"ERCs","label":"ERC-8054","officialUrl":"https://eips.ethereum.org/EIPS/eip-8054","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8054.md","url":"https://eips.huatuo.xyz/eip-8054/","tldr":{"en":"A draft ERC-20 extension that checkpoints every balance change so a new token can be forked from any past checkpoint, giving every holder their inherited balance instantly with no airdrop transfers and no Merkle claims.","ja":"ERC-20 のドラフト段階の拡張。残高の変化をすべてチェックポイントとして記録し、過去の任意のチェックポイントから新しいトークンをフォークできる。エアドロップの送金も Merkle クレームも不要で、すべてのホルダーが引き継いだ残高を即座に得られる。","ko":"모든 잔액 변동을 체크포인트로 기록해 과거의 어떤 체크포인트에서든 새 토큰을 포크할 수 있게 하는 초안 단계의 ERC-20 확장. 에어드롭 전송도 Merkle 청구도 없이 모든 홀더가 상속된 잔액을 즉시 얻는다.","zh":"一种处于草案阶段的 ERC-20 扩展，对每次余额变动设置检查点，使新代币可以从任何过去的检查点分叉，让每位持有者立即获得继承的余额，无需空投转账，也无需 Merkle 领取。"},"tags":["token","erc-20","airdrop","checkpoints","migration"],"explainers":{"en":{"lang":"en","tldr":"A draft ERC-20 extension that checkpoints every balance change so a new token can be forked from any past checkpoint, giving every holder their inherited balance instantly with no airdrop transfers and no Merkle claims.","tags":["token","erc-20","airdrop","checkpoints","migration"],"related":[20,4626,5805],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8054/","markdown":"## What problem does it solve?\n\nDistributing a new token to the holders of an existing [ERC-20](/eip-20/) is clumsy today:\n\n- **Airdrops by transfer**: the deployer takes an off-chain snapshot and pays gas to send tokens to every holder.\n- **Merkle claims**: cheaper for the deployer, but each holder must find a proof and pay gas to claim, and the snapshot is built off-chain where errors or manipulation can creep in.\n\nERC-8054 lets a token record its own history on-chain so a new token can simply *inherit* balances from a chosen point. Use cases include airdrops, token migrations, governance derivatives, reward programs and splitting yield or risk from a vault share.\n\n## How it works\n\n**Forkable (source) token.** An ERC-20 with metadata that also implements `IERC20Checkpointed`:\n\n- Every state change (transfer, mint, burn) pushes a new checkpoint of the affected balances and total supply.\n- Checkpoints are identified by a monotonically increasing `uint48` **nonce**, not by block number or timestamp. This makes the fork point unambiguous even when several transactions land in the same block, avoiding reordering games around a block-based snapshot.\n- `balanceOfAt(account, nonce)`, `totalSupplyAt(nonce)` and `checkpointNonce()` read history; querying a future nonce reverts with `ERC20FutureCheckpoint`.\n\n**Forked token.** A fresh ERC-20 created with `name`, `symbol`, `checkpointedNonce` and `checkpointedToken`:\n\n- `decimals` must equal the source token's.\n- Initial `totalSupply` equals `totalSupplyAt(nonce)`, and each account's initial balance equals `balanceOfAt(account, nonce)`.\n- Balances are loaded **lazily**: until an account touches the forked token, `balanceOf` reads the source token at the fork nonce; after its first state change, the fork's own record is used.\n- Allowances and permit nonces are not inherited. The forked token may itself be checkpointed, enabling forks of forks.\n\n## Sample code\n\nSimplified forked token showing lazy balance inheritance:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IERC20Checkpointed {\n    function totalSupplyAt(uint48 checkpoint) external view returns (uint256);\n    function balanceOfAt(address account, uint48 checkpoint) external view returns (uint256);\n    function checkpointNonce() external view returns (uint48);\n    function decimals() external view returns (uint8);\n}\n\ncontract ForkedToken {\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    IERC20Checkpointed public immutable source;\n    uint48 public immutable forkNonce;\n    string public name;\n    string public symbol;\n    uint8 public immutable decimals;\n    uint256 public totalSupply;\n\n    mapping(address =\u003e uint256) private _balance;\n    mapping(address =\u003e bool) private _touched;\n\n    constructor(string memory n, string memory s, uint48 nonce, IERC20Checkpointed src) {\n        require(nonce \u003c= src.checkpointNonce(), \"future checkpoint\");\n        (name, symbol, forkNonce, source) = (n, s, nonce, src);\n        decimals = src.decimals();\n        totalSupply = src.totalSupplyAt(nonce);\n    }\n\n    function balanceOf(address a) public view returns (uint256) {\n        return _touched[a] ? _balance[a] : source.balanceOfAt(a, forkNonce);\n    }\n\n    function _load(address a) internal {\n        if (!_touched[a]) { _balance[a] = source.balanceOfAt(a, forkNonce); _touched[a] = true; }\n    }\n\n    function transfer(address to, uint256 v) external returns (bool) {\n        _load(msg.sender); _load(to);\n        require(_balance[msg.sender] \u003e= v, \"balance\");\n        _balance[msg.sender] -= v;\n        _balance[to] += v;\n        emit Transfer(msg.sender, to, v);\n        return true;\n    }\n    // approve / transferFrom omitted for brevity\n}\n```\n\n## Things to know\n\n- **Status: Draft.**\n- Only tokens that implement checkpointing from the start can be forked under this standard; forking an ordinary ERC-20 is out of scope.\n- Checkpointing every change makes transfers on the source token more expensive. The authors consider that acceptable when forkability is valuable.\n- Rebasing and fee-on-transfer tokens may not fork correctly; review the source token's mechanics first.\n- Approvals reset to zero on the fork, and wallets or indexers that only follow `Transfer` events will not see inherited balances unless the implementation does something extra; they need to call `balanceOf`.\n- Compare with the checkpoint-based voting tokens of [ERC-5805](/eip-5805/), which record historical voting power by clock rather than a per-change nonce.\n"},"ja":{"lang":"ja","tldr":"ERC-20 のドラフト段階の拡張。残高の変化をすべてチェックポイントとして記録し、過去の任意のチェックポイントから新しいトークンをフォークできる。エアドロップの送金も Merkle クレームも不要で、すべてのホルダーが引き継いだ残高を即座に得られる。","tags":["token","erc-20","airdrop","checkpoints","migration"],"related":[20,4626,5805],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8054/","markdown":"## 何を解決するのか\n\n既存の [ERC-20](/eip-20/) のホルダーに新しいトークンを配布するのは、現状では面倒です。\n\n- **送金によるエアドロップ**: デプロイヤーがオフチェーンでスナップショットを取り、すべてのホルダーにトークンを送るためのガス代を負担します。\n- **Merkle クレーム**: デプロイヤーにとっては安上がりですが、各ホルダーが proof を見つけてガス代を払って請求する必要があり、スナップショットもオフチェーンで作られるため、誤りや操作が入り込む余地があります。\n\nERC-8054 により、トークンが自身の履歴をオンチェーンに記録できるため、新しいトークンは選んだ時点の残高をそのまま*引き継ぐ*だけで済みます。ユースケースには、エアドロップ、トークンの移行、ガバナンスのデリバティブ、報酬プログラム、Vault のシェアからのイールドやリスクの分離などがあります。\n\n## 仕組み\n\n**フォーク可能な（ソース）トークン。** メタデータを持つ ERC-20 で、`IERC20Checkpointed` も実装します。\n\n- 状態が変わるたび（transfer、mint、burn）に、影響を受けた残高と総供給量の新しいチェックポイントを追加します。\n- チェックポイントは、ブロック番号やタイムスタンプではなく、単調増加する `uint48` の **nonce** で識別されます。これにより、同じブロックに複数のトランザクションが入っていてもフォーク地点が曖昧にならず、ブロックベースのスナップショットを巡る並べ替えの駆け引きを避けられます。\n- `balanceOfAt(account, nonce)`、`totalSupplyAt(nonce)`、`checkpointNonce()` で履歴を読み取ります。未来の nonce を問い合わせると `ERC20FutureCheckpoint` でリバートします。\n\n**フォークされたトークン。** `name`、`symbol`、`checkpointedNonce`、`checkpointedToken` を指定して作られる新しい ERC-20 です。\n\n- `decimals` はソーストークンと同じでなければなりません。\n- 初期の `totalSupply` は `totalSupplyAt(nonce)` に等しく、各アカウントの初期残高は `balanceOfAt(account, nonce)` に等しくなります。\n- 残高は**遅延的**に読み込まれます。アカウントがフォークされたトークンに触れるまでは、`balanceOf` はフォーク nonce 時点のソーストークンを読み取り、最初の状態変更の後は、フォーク自身の記録が使われます。\n- allowance と permit の nonce は引き継がれません。フォークされたトークン自体もチェックポイント化でき、フォークのフォークも可能です。\n\n## サンプルコード\n\n遅延的な残高の引き継ぎを示す簡略化したフォークトークン:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IERC20Checkpointed {\n    function totalSupplyAt(uint48 checkpoint) external view returns (uint256);\n    function balanceOfAt(address account, uint48 checkpoint) external view returns (uint256);\n    function checkpointNonce() external view returns (uint48);\n    function decimals() external view returns (uint8);\n}\n\ncontract ForkedToken {\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    IERC20Checkpointed public immutable source;\n    uint48 public immutable forkNonce;\n    string public name;\n    string public symbol;\n    uint8 public immutable decimals;\n    uint256 public totalSupply;\n\n    mapping(address =\u003e uint256) private _balance;\n    mapping(address =\u003e bool) private _touched;\n\n    constructor(string memory n, string memory s, uint48 nonce, IERC20Checkpointed src) {\n        require(nonce \u003c= src.checkpointNonce(), \"future checkpoint\");\n        (name, symbol, forkNonce, source) = (n, s, nonce, src);\n        decimals = src.decimals();\n        totalSupply = src.totalSupplyAt(nonce);\n    }\n\n    function balanceOf(address a) public view returns (uint256) {\n        return _touched[a] ? _balance[a] : source.balanceOfAt(a, forkNonce);\n    }\n\n    function _load(address a) internal {\n        if (!_touched[a]) { _balance[a] = source.balanceOfAt(a, forkNonce); _touched[a] = true; }\n    }\n\n    function transfer(address to, uint256 v) external returns (bool) {\n        _load(msg.sender); _load(to);\n        require(_balance[msg.sender] \u003e= v, \"balance\");\n        _balance[msg.sender] -= v;\n        _balance[to] += v;\n        emit Transfer(msg.sender, to, v);\n        return true;\n    }\n    // approve / transferFrom omitted for brevity\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。**\n- この標準でフォークできるのは、最初からチェックポイントを実装しているトークンだけです。通常の ERC-20 をフォークすることは対象外です。\n- すべての変更をチェックポイント化するため、ソーストークンでの送金はコストが高くなります。著者は、フォーク可能であることに価値がある場合には許容できると考えています。\n- リベース型やトランスファー手数料型のトークンは正しくフォークできない可能性があります。まずソーストークンの仕組みを確認してください。\n- 承認はフォークでゼロにリセットされ、`Transfer` イベントだけを追うウォレットやインデクサーは、実装が追加の対応をしない限り引き継がれた残高を見られません。`balanceOf` を呼ぶ必要があります。\n- 変更ごとの nonce ではなくクロックで過去の投票力を記録する、[ERC-5805](/eip-5805/) のチェックポイントベースの投票トークンと比較してください。\n"},"ko":{"lang":"ko","tldr":"모든 잔액 변동을 체크포인트로 기록해 과거의 어떤 체크포인트에서든 새 토큰을 포크할 수 있게 하는 초안 단계의 ERC-20 확장. 에어드롭 전송도 Merkle 청구도 없이 모든 홀더가 상속된 잔액을 즉시 얻는다.","tags":["token","erc-20","airdrop","checkpoints","migration"],"related":[20,4626,5805],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8054/","markdown":"## 어떤 문제를 해결하나요?\n\n기존 [ERC-20](/eip-20/) 홀더에게 새 토큰을 나눠 주는 일은 현재 번거롭습니다.\n\n- **전송 방식 에어드롭**: 배포자가 오프체인에서 스냅샷을 만들고 모든 홀더에게 토큰을 보내기 위해 가스비를 냅니다.\n- **Merkle 청구**: 배포자에게는 더 저렴하지만, 각 홀더가 증명을 찾아 가스비를 내고 청구해야 하며, 스냅샷도 오프체인에서 만들어지기 때문에 오류나 조작이 끼어들 수 있습니다.\n\nERC-8054는 토큰이 자신의 이력을 온체인에 기록하게 해서, 새 토큰이 선택한 시점의 잔액을 그대로 *상속*할 수 있게 합니다. 사용 사례로는 에어드롭, 토큰 마이그레이션, 거버넌스 파생 상품, 보상 프로그램, 볼트 지분에서 수익이나 위험을 분리하는 것 등이 있습니다.\n\n## 어떻게 동작하나요?\n\n**포크 가능한(소스) 토큰.** 메타데이터를 가진 ERC-20이면서 `IERC20Checkpointed`도 구현합니다.\n\n- 상태가 바뀔 때마다(전송, 민트, 소각) 영향을 받은 잔액과 총 공급량의 새 체크포인트를 추가합니다.\n- 체크포인트는 블록 번호나 타임스탬프가 아니라 단조 증가하는 `uint48` **nonce**로 식별됩니다. 덕분에 한 블록에 여러 트랜잭션이 들어가도 포크 지점이 모호하지 않고, 블록 기반 스냅샷을 둘러싼 순서 조작을 피할 수 있습니다.\n- `balanceOfAt(account, nonce)`, `totalSupplyAt(nonce)`, `checkpointNonce()`로 이력을 읽습니다. 미래의 nonce를 조회하면 `ERC20FutureCheckpoint`로 리버트됩니다.\n\n**포크된 토큰.** `name`, `symbol`, `checkpointedNonce`, `checkpointedToken`으로 만든 새 ERC-20입니다.\n\n- `decimals`는 소스 토큰과 같아야 합니다.\n- 초기 `totalSupply`는 `totalSupplyAt(nonce)`와 같고, 각 계정의 초기 잔액은 `balanceOfAt(account, nonce)`와 같습니다.\n- 잔액은 **지연** 로드됩니다. 계정이 포크된 토큰을 건드리기 전까지 `balanceOf`는 포크 nonce 시점의 소스 토큰을 읽고, 첫 상태 변경 이후에는 포크 자체의 기록을 사용합니다.\n- allowance와 permit nonce는 상속되지 않습니다. 포크된 토큰 자체도 체크포인트를 둘 수 있어, 포크의 포크가 가능합니다.\n\n## 샘플 코드\n\n지연 잔액 상속을 보여 주는 단순화한 포크 토큰:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IERC20Checkpointed {\n    function totalSupplyAt(uint48 checkpoint) external view returns (uint256);\n    function balanceOfAt(address account, uint48 checkpoint) external view returns (uint256);\n    function checkpointNonce() external view returns (uint48);\n    function decimals() external view returns (uint8);\n}\n\ncontract ForkedToken {\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    IERC20Checkpointed public immutable source;\n    uint48 public immutable forkNonce;\n    string public name;\n    string public symbol;\n    uint8 public immutable decimals;\n    uint256 public totalSupply;\n\n    mapping(address =\u003e uint256) private _balance;\n    mapping(address =\u003e bool) private _touched;\n\n    constructor(string memory n, string memory s, uint48 nonce, IERC20Checkpointed src) {\n        require(nonce \u003c= src.checkpointNonce(), \"future checkpoint\");\n        (name, symbol, forkNonce, source) = (n, s, nonce, src);\n        decimals = src.decimals();\n        totalSupply = src.totalSupplyAt(nonce);\n    }\n\n    function balanceOf(address a) public view returns (uint256) {\n        return _touched[a] ? _balance[a] : source.balanceOfAt(a, forkNonce);\n    }\n\n    function _load(address a) internal {\n        if (!_touched[a]) { _balance[a] = source.balanceOfAt(a, forkNonce); _touched[a] = true; }\n    }\n\n    function transfer(address to, uint256 v) external returns (bool) {\n        _load(msg.sender); _load(to);\n        require(_balance[msg.sender] \u003e= v, \"balance\");\n        _balance[msg.sender] -= v;\n        _balance[to] += v;\n        emit Transfer(msg.sender, to, v);\n        return true;\n    }\n    // approve / transferFrom omitted for brevity\n}\n```\n\n## 알아둘 점\n\n- **상태: Draft.**\n- 처음부터 체크포인트를 구현한 토큰만 이 표준으로 포크할 수 있습니다. 일반 ERC-20을 포크하는 것은 범위 밖입니다.\n- 모든 변경을 체크포인트로 남기므로 소스 토큰의 전송 비용이 더 비싸집니다. 저자들은 포크 가능성이 가치 있는 경우 이를 감수할 만하다고 봅니다.\n- 리베이스 토큰과 전송 수수료 토큰은 제대로 포크되지 않을 수 있으니, 먼저 소스 토큰의 동작 방식을 검토하세요.\n- 승인은 포크에서 0으로 초기화되며, `Transfer` 이벤트만 따라가는 지갑이나 인덱서는 구현이 추가 조치를 하지 않는 한 상속된 잔액을 볼 수 없습니다. `balanceOf`를 호출해야 합니다.\n- 변경마다의 nonce가 아니라 시계로 과거 투표권을 기록하는 [ERC-5805](/eip-5805/)의 체크포인트 기반 투표 토큰과 비교해 보세요.\n"},"zh":{"lang":"zh","tldr":"一种处于草案阶段的 ERC-20 扩展，对每次余额变动设置检查点，使新代币可以从任何过去的检查点分叉，让每位持有者立即获得继承的余额，无需空投转账，也无需 Merkle 领取。","tags":["token","erc-20","airdrop","checkpoints","migration"],"related":[20,4626,5805],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8054/","markdown":"## 它解决什么问题？\n\n如今，把新代币分发给现有 [ERC-20](/eip-20/) 的持有者相当麻烦：\n\n- **通过转账空投**：部署者在链下做快照，并支付 gas 向每位持有者发送代币。\n- **Merkle 领取**：对部署者来说更便宜，但每位持有者都必须找到证明并支付 gas 来领取，而且快照是在链下构建的，可能混入错误或被操纵。\n\nERC-8054 让代币在链上记录自己的历史，这样新代币只需从选定的时间点*继承*余额即可。用例包括空投、代币迁移、治理衍生品、奖励计划，以及把收益或风险从金库份额中拆分出来。\n\n## 它如何运作\n\n**可分叉（源）代币。** 带有元数据的 ERC-20，同时实现 `IERC20Checkpointed`：\n\n- 每次状态变化（转账、铸造、销毁）都会为受影响的余额和总供应量新增一个检查点。\n- 检查点由单调递增的 `uint48` **nonce** 标识，而不是区块号或时间戳。这样即使多笔交易落在同一个区块里，分叉点也不会含糊，避免了围绕基于区块的快照做重排序的把戏。\n- `balanceOfAt(account, nonce)`、`totalSupplyAt(nonce)` 和 `checkpointNonce()` 用于读取历史；查询未来的 nonce 会以 `ERC20FutureCheckpoint` 回滚。\n\n**分叉出的代币。** 使用 `name`、`symbol`、`checkpointedNonce` 和 `checkpointedToken` 创建的全新 ERC-20：\n\n- `decimals` 必须与源代币相同。\n- 初始 `totalSupply` 等于 `totalSupplyAt(nonce)`，每个账户的初始余额等于 `balanceOfAt(account, nonce)`。\n- 余额是**惰性**加载的：在某个账户接触分叉代币之前，`balanceOf` 读取的是源代币在分叉 nonce 时的余额；该账户第一次发生状态变更之后，使用分叉自己的记录。\n- 授权额度（allowance）和 permit nonce 不会被继承。分叉出的代币本身也可以设置检查点，从而实现分叉的分叉。\n\n## 示例代码\n\n展示惰性余额继承的简化分叉代币：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface IERC20Checkpointed {\n    function totalSupplyAt(uint48 checkpoint) external view returns (uint256);\n    function balanceOfAt(address account, uint48 checkpoint) external view returns (uint256);\n    function checkpointNonce() external view returns (uint48);\n    function decimals() external view returns (uint8);\n}\n\ncontract ForkedToken {\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    IERC20Checkpointed public immutable source;\n    uint48 public immutable forkNonce;\n    string public name;\n    string public symbol;\n    uint8 public immutable decimals;\n    uint256 public totalSupply;\n\n    mapping(address =\u003e uint256) private _balance;\n    mapping(address =\u003e bool) private _touched;\n\n    constructor(string memory n, string memory s, uint48 nonce, IERC20Checkpointed src) {\n        require(nonce \u003c= src.checkpointNonce(), \"future checkpoint\");\n        (name, symbol, forkNonce, source) = (n, s, nonce, src);\n        decimals = src.decimals();\n        totalSupply = src.totalSupplyAt(nonce);\n    }\n\n    function balanceOf(address a) public view returns (uint256) {\n        return _touched[a] ? _balance[a] : source.balanceOfAt(a, forkNonce);\n    }\n\n    function _load(address a) internal {\n        if (!_touched[a]) { _balance[a] = source.balanceOfAt(a, forkNonce); _touched[a] = true; }\n    }\n\n    function transfer(address to, uint256 v) external returns (bool) {\n        _load(msg.sender); _load(to);\n        require(_balance[msg.sender] \u003e= v, \"balance\");\n        _balance[msg.sender] -= v;\n        _balance[to] += v;\n        emit Transfer(msg.sender, to, v);\n        return true;\n    }\n    // approve / transferFrom omitted for brevity\n}\n```\n\n## 需要注意\n\n- **状态：Draft。**\n- 只有一开始就实现了检查点的代币才能按照此标准分叉；对普通 ERC-20 进行分叉不在范围之内。\n- 对每次变更都设置检查点会让源代币上的转账成本更高。作者认为，当可分叉性有价值时，这是可以接受的。\n- 重基（rebasing）代币和转账收费代币可能无法正确分叉；请先审查源代币的机制。\n- 授权在分叉后会重置为零，并且只跟踪 `Transfer` 事件的钱包或索引器看不到继承的余额，除非实现另有额外处理；它们需要调用 `balanceOf`。\n- 可与 [ERC-5805](/eip-5805/) 基于检查点的投票代币对比，后者按时钟而不是按每次变更的 nonce 记录历史投票权。\n"}}}
