ERC-8054 Checkpoint-Forked ERC-20 Token (Forkable ERC-20 Token)
Draft · Tokens · created 2025-10-10
A standard that records a checkpoint whenever state changes, allowing holder balances at a specific point in time to be carried over gas-free to a new ERC-20 token exactly as they were.
Why it is needed
There are currently only two ways to distribute a new token to existing ERC-20 holders. One is a manual airdrop that takes a snapshot and sends tokens to each holder directly, where gas costs rise sharply as the holder count grows. The other is building a Merkle root off-chain and having users submit a proof to claim it themselves, paying gas, which reduces the deployer's cost but results in poor user experience and risk of proof errors. Both approaches build the snapshot and Merkle structure off-chain, outside the protocol's trust boundary, so the possibility of data inconsistency or collusion cannot be ruled out. Because of this, even cases like airdrops, governance-derived tokens, or token migrations that simply want to carry over existing balances have had to go through a complex and costly process every time.
What to implement
error ERC20FutureCheckpoint(uint48 checkpoint, uint48 currentCheckpoint);: An error that reverts when attempting to query a future checkpoint that has not yet arrived.function totalSupplyAt(uint48 checkpoint) external view returns (uint256);: Returns the total supply at the specified checkpoint.function balanceOfAt(address account, uint48 checkpoint) external view returns (uint256);: Returns the balance held by the given account at the specified checkpoint.function checkpointNonce() external view returns (uint48);: Returns the checkpoint nonce recorded so far.
In depth
Checkpoint interface
A forkable token implements ERC-20 and metadata (name, symbol, decimals) while additionally implementing IERC20Checkpointed. totalSupplyAt(checkpoint) must return the total supply at that nonce, and balanceOfAt(account, checkpoint) must return the account balance at that point. checkpointNonce() returns the current checkpoint nonce. Every state-changing operation such as transfer, mint, or burn must record the latest checkpoint balance and total supply, and the nonce must only ever increase. Querying a future nonce that has not yet arrived reverts with an ERC20FutureCheckpoint error.
Conditions for creating a fork token
A fork token must also implement ERC-20 and metadata, and its constructor (or initializer function) takes four inputs: name, symbol, checkpointedNonce (uint48), and checkpointedToken (address). decimals must match the source token exactly. The specified checkpointedNonce must be either a past point or equal to the source token's most recent nonce; future nonces are prohibited. The initial totalSupply must equal the source token's totalSupplyAt(checkpointedNonce), and any account A's initial balance must equal the source token's balanceOfAt(A, checkpointedNonce). If the fork token itself implements IERC20Checkpointed, recursive forking of that token is also possible.
Deferred balance lookup
A fork token does not copy every holder's balance at creation time. If a given account has never undergone a state change since the fork, calling balanceOf(account) returns checkpointedToken.balanceOfAt(account, checkpointedNonce) directly. Conversely, if that account has had even one state change after the fork, the balance recorded on the fork token itself is returned. In this case the fork token cannot query the source token at any nonce other than checkpointedNonce. totalSupply() must also reflect only the fork token's own state changes independently of the source token, and no state change on the fork token affects the source token in any way.
Why nonces are used
Using block numbers or timestamps as the fork reference is vulnerable to reorgs and MEV attacks, since reordering transactions in the fork block could allow balances to be manipulated before the fork balance is finalized. Instead, assigning a monotonically increasing nonce on every state change records each state update under a unique number, letting the fork point be identified precisely and unambiguously.
Why checkpoints instead of Merkle trees
Merkle tree based claims are cheap for the deployer, but users must submit a proof and pay gas, which makes for poor UX, and constructing the snapshot and root off-chain lies outside the protocol's trust boundary, creating risk of collusion or inconsistency. It is also inefficient for continual updates. The checkpoint approach only records state when it changes, maintaining a small, queryable, trustlessly verifiable history, at the cost of higher gas per state update. This cost is explained as acceptable for tokens carrying high value from forkability, such as airdrops, governance, and migrations.
Approvals and nonces are not inherited
A fork token does not inherit the source token's allowances or permit nonces. Integrators must treat the fork token as an entirely new ERC-20 and handle approvals and permits anew. If the source token does not implement IERC20Checkpointed, this standard's fork mechanism is out of scope.
A proposal still under discussion
ERC-8054 is currently in Draft status and is still undergoing community discussion and implementation validation. Its interfaces or requirements may change or be discontinued.
Things to watch out for
- Approvals are reset: When a token is forked, all allowances are reset to zero. Users and dApps must re-approve against the fork token.
- Non-standard tokens may be forked incorrectly: For tokens with rebasing, transfer fees, or deflationary mechanisms, changes occurring after the checkpoint may not be reflected in the fork token. Auditors and integrators must carefully verify the source token's behavior before forking.
- decimals must match exactly: If the fork token's decimals differ from the source token's, balance mismatches and precision loss can occur.
- Forking to a future checkpoint must be prevented: Implementations must prohibit forking to a future nonce; if allowed, the fork token's balances would lose consistency and lead to accounting errors.
- Nonce overflow must be considered: If a small-sized uint type is used for the nonce, the possibility of overflow must be considered during implementation.