EIPs Explained

ERC-8054 · Draft · ERC · 2025-10-10

ERC-8054: Forkable ERC-20 Token

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.

What problem does it solve?

Distributing a new token to the holders of an existing ERC-20 is clumsy today:

  • Airdrops by transfer: the deployer takes an off-chain snapshot and pays gas to send tokens to every holder.
  • 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.

ERC-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.

How it works

Forkable (source) token. An ERC-20 with metadata that also implements IERC20Checkpointed:

  • Every state change (transfer, mint, burn) pushes a new checkpoint of the affected balances and total supply.
  • 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.
  • balanceOfAt(account, nonce), totalSupplyAt(nonce) and checkpointNonce() read history; querying a future nonce reverts with ERC20FutureCheckpoint.

Forked token. A fresh ERC-20 created with name, symbol, checkpointedNonce and checkpointedToken:

  • decimals must equal the source token's.
  • Initial totalSupply equals totalSupplyAt(nonce), and each account's initial balance equals balanceOfAt(account, nonce).
  • 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.
  • Allowances and permit nonces are not inherited. The forked token may itself be checkpointed, enabling forks of forks.

Sample code

Simplified forked token showing lazy balance inheritance:

// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.20;

interface IERC20Checkpointed {
    function totalSupplyAt(uint48 checkpoint) external view returns (uint256);
    function balanceOfAt(address account, uint48 checkpoint) external view returns (uint256);
    function checkpointNonce() external view returns (uint48);
    function decimals() external view returns (uint8);
}

contract ForkedToken {
    event Transfer(address indexed from, address indexed to, uint256 value);

    IERC20Checkpointed public immutable source;
    uint48 public immutable forkNonce;
    string public name;
    string public symbol;
    uint8 public immutable decimals;
    uint256 public totalSupply;

    mapping(address => uint256) private _balance;
    mapping(address => bool) private _touched;

    constructor(string memory n, string memory s, uint48 nonce, IERC20Checkpointed src) {
        require(nonce <= src.checkpointNonce(), "future checkpoint");
        (name, symbol, forkNonce, source) = (n, s, nonce, src);
        decimals = src.decimals();
        totalSupply = src.totalSupplyAt(nonce);
    }

    function balanceOf(address a) public view returns (uint256) {
        return _touched[a] ? _balance[a] : source.balanceOfAt(a, forkNonce);
    }

    function _load(address a) internal {
        if (!_touched[a]) { _balance[a] = source.balanceOfAt(a, forkNonce); _touched[a] = true; }
    }

    function transfer(address to, uint256 v) external returns (bool) {
        _load(msg.sender); _load(to);
        require(_balance[msg.sender] >= v, "balance");
        _balance[msg.sender] -= v;
        _balance[to] += v;
        emit Transfer(msg.sender, to, v);
        return true;
    }
    // approve / transferFrom omitted for brevity
}

Things to know

  • Status: Draft.
  • Only tokens that implement checkpointing from the start can be forked under this standard; forking an ordinary ERC-20 is out of scope.
  • Checkpointing every change makes transfers on the source token more expensive. The authors consider that acceptable when forkability is valuable.
  • Rebasing and fee-on-transfer tokens may not fork correctly; review the source token's mechanics first.
  • 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.
  • Compare with the checkpoint-based voting tokens of ERC-5805, which record historical voting power by clock rather than a per-change nonce.

#token #erc-20 #airdrop #checkpoints #migration

Details

Authors
Kevin (@kevzzsk), Fuxing (@fuxingloh)
Status
Draft
Type
Standards Track / ERC
Created
2025-10-10
Requires

Machine-readable: Markdown · JSON