ERC-7802 · Draft · ERC · 2024-10-30
ERC-7802: Token With Mint/Burn Access Across Chains
A minimal token interface, crosschainMint and crosschainBurn plus matching events, that lets authorised bridges mint and burn a token's representations so any bridge can move it without wrapped variants.
What problem does it solve?
Bridges usually do not have mint/burn rights over the original token. They lock it on the home chain and mint their own representation on the destination chain. Each bridge uses a different interface, so the same asset ends up as several incompatible wrapped tokens across chains, and every token issuer has to integrate each bridge separately.
ERC-7802 defines one small interface that a token exposes to bridges. Any bridge the issuer authorises can then burn on the source chain and mint on the destination chain, keeping one fungible token everywhere.
How it works
The token implements IERC7802:
crosschainMint(address _account, uint256 _amount)mints tokens to_accountwhen a transfer arrives.crosschainBurn(address _account, uint256 _amount)burns tokens from_accountwhen a transfer leaves.CrosschainMint(_to, _amount, _sender)andCrosschainBurn(_from, _amount, _sender)must be emitted, with_senderset tomsg.sender(the bridge). Indexers can tell cross-chain supply movements apart from local mints and burns.- ERC-165 support is required, with interface ID
0x33331994(XOR of the two function selectors), so a bridge can confirm both functions exist before burning.
Implementations should also emit the usual ERC-20 Transfer events from/to address(0) so existing tools stay consistent.
The interface is deliberately neutral. It does not say who may call these functions or whether zero amounts are allowed; the issuer decides, typically by allow-listing specific bridge contracts. Rate limits, fees and other features can be layered on top. Cross-chain mint/burn is kept separate from any local mint/burn so permissions and limits can differ.
Sample code
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.25;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
interface IERC7802 is IERC165 {
event CrosschainMint(address indexed to, uint256 amount, address indexed sender);
event CrosschainBurn(address indexed from, uint256 amount, address indexed sender);
function crosschainMint(address _to, uint256 _amount) external;
function crosschainBurn(address _from, uint256 _amount) external;
}
contract SuperToken is ERC20, IERC7802 {
address public immutable bridge;
constructor(address _bridge) ERC20("Super", "SUP") { bridge = _bridge; }
modifier onlyBridge() { require(msg.sender == bridge, "not bridge"); _; }
function crosschainMint(address _to, uint256 _amount) external onlyBridge {
_mint(_to, _amount); // emits Transfer(address(0), _to, _amount)
emit CrosschainMint(_to, _amount, msg.sender);
}
function crosschainBurn(address _from, uint256 _amount) external onlyBridge {
_burn(_from, _amount);
emit CrosschainBurn(_from, _amount, msg.sender);
}
function supportsInterface(bytes4 id) external pure returns (bool) {
return id == type(IERC7802).interfaceId || id == type(IERC165).interfaceId;
}
}
Things to know
- Status: Draft.
- Security rests entirely on access control. Any address allowed to call
crosschainMintcan create unlimited supply, so restrict it tightly and consider per-bridge limits. - ERC-165 can only be checked on the local chain. The bridge must make sure the destination token also supports the interface, or tokens burned here may not be mintable there.
- Non-upgradable tokens cannot add these functions. The spec suggests a lockbox: lock the original and mint a compliant version.