ERC-7802 Cross-chain token mint/burn interface (Token With Mint/Burn Access Across Chains)

Draft · Tokens · created 2024-10-30

A minimal interface that lets approved bridge contracts mint and burn tokens through standardized functions to handle cross-chain transfers.

Why it is needed

Canonical bridges for rollups and major sidechains lack mint and burn permissions on the original token, so they lock the token on one chain and mint and burn a non-equivalent representation on the other. However, the names and structures of mint and burn functions differ from bridge to bridge, which fragments cross-chain communication between third-party bridges and future canonical solutions. There have been attempts to standardize token bridging, but each framework defines its own mint and burn variants alongside features like rate limits and fee switches, making the interfaces overly specialized and inconsistent in naming conventions and structure.

What to implement

In depth

Interface identifier (ERC-165)

IERC7802's interface identifier is 0x33331994, computed as the XOR of the two function selectors for crosschainMint(address,uint256) and crosschainBurn(address,uint256). Implementations MUST have supportsInterface from ERC-165 return true for this identifier. This lets callers verify on-chain whether a token supports both functions, screening out incomplete implementations that only implement one of them in advance. However, this check is only possible on the chain where the token resides, and it does not guarantee that the token on the receiving chain supports the same interface; that responsibility falls on the bridge implementation.

crosschainMint / crosschainBurn

crosschainMint(address _account, uint256 _amount) is the entry point an approved bridge calls to mint _amount of tokens to _account during a cross-chain transfer, and crosschainBurn(address _account, uint256 _amount) burns _account's tokens the same way. To preserve ERC-20 issuance invariants, implementations SHOULD emit Transfer(address(0), _to, _amount) on a crosschainMint call. For crosschainBurn calls, emitting Transfer(_from, address(0), _amount) can be considered to comply with ERC-5679. The specification does not define who may call these functions or whether zero-amount calls are allowed; that is left to the token issuer to decide.

CrosschainMint / CrosschainBurn events

When a crosschainMint call succeeds, CrosschainMint(address indexed _to, uint256 _amount, address indexed _sender) MUST be emitted, and when a crosschainBurn call succeeds, CrosschainBurn(address indexed _from, uint256 _amount, address indexed _sender) MUST be emitted. In both events, _sender must be the msg.sender at the time of the call. Keeping these separate from local mint/burn events makes it easier for indexers, analytics tools, and auditors to track cross-chain activity on its own, detect anomalies, and monitor bridge operations.

Bridge-neutral design

This interface is designed to place cross-chain processing logic in the bridge contract rather than the token. Keeping the token contract simple reduces the attack surface and makes auditing and upgrades easier. Under this structure, lock/unlock bridges can keep working without any modification to the token, and mint/burn bridges can use a single general-purpose token interface instead of creating a bridge-specific representation token, which improves cross-chain fungibility. Conditions such as access control or whether zero-amount calls are allowed are not enforced by the interface and are left to the token issuer to decide.

Separation of local and cross-chain mint/burn

In cross-chain transfers, the total supply across all chains must remain unchanged, and the bridge, as the entity performing cross-chain mint and burn, must hold permissions of a different nature than an ordinary token owner. That is why local mint/burn and cross-chain mint/burn are kept separate as crosschainMint and crosschainBurn rather than merged into the same functions. This means access control or limits can be changed per chain without touching the local mint/burn implementation; for example, granting permissions separately to an Optimism bridge and an Arbitrum bridge is enough to make the same ERC-20 cross-chain compatible with multiple chains.

Backward compatibility and migrating existing tokens

This proposal is fully backward compatible with ERC-20. Upgradeable tokens can be upgraded to add this interface. Tokens that cannot be upgraded cannot add the interface to the token itself, but they can migrate using the lockbox approach proposed by xERC-20. This works by locking the existing, non-mintable token and minting an equivalent amount of a new token that supports the interface, with the bridge contract acting as the lockbox on the native chain. Using this interface also requires upgrading the bridge contract.

Current status

This proposal is in Draft status. It is not yet a finalized standard, and the details may change or discussion may stall.

Things to watch out for

Original ERC · ← ERCs