Cross-Chain Token Standard - Tokens (EVM)
Before enabling an ERC20-compatible token in CCIP, it's important to understand the requirements it must fulfill to integrate with CCIP.
Registration functions
A token administrator can use any of the following supported function signatures for enabling their tokens in CCIP:
owner()
: This function returns the token contract owner's address.getCCIPAdmin()
: This function returns the token administrator's address and is recommended for new tokens, as it allows for abstraction of the CCIP Token Administrator role from other common roles, likeowner()
.
Transfer functions
The token's smart contract must meet minimum requirements to integrate with CCIP.
BurnMint Requirements
This section describes the requirements for tokens that are used with the BurnMint token pools.
-
The token smart contract must have the following functions:
mint(address account, uint256 amount)
: This function is used to mint theamount
of tokens to a givenaccount
on the destination blockchain.burn(uint256 amount)
: This function is used to burn theamount
of tokens on the source blockchain.decimals()
: Returns the token's number of decimals.balanceOf(address account)
: Returns the current token balance of the specifiedaccount
.burnFrom(address account, uint256 amount)
: This function burns a specified number of tokens from the provided account on the source blockchain. Note: This is an optional function. We generally recommend using theburn
function, but if you use a tokenPool that callsburnFrom
, your token contract will need to implement this function.
-
The token contract must support granting mint and burn permissions. The token developers or another role (such as the token administrator) will grant these permissions to the token pool.
LockRelease Requirements
This section describes the requirements for tokens that are used with the LockRelease token pools.
-
The token smart contract must have the following functions:
decimals()
: Returns the token's number of decimals.balanceOf(address account)
: Returns the current token balance of the specifiedaccount
.
-
On the destination blockchain, the token contract must support granting mint and burn permissions. The token developers or another role (such as the token administrator) will grant these permissions to the token pool.
Token Handling Mechanisms
To facilitate cross-chain token transfers, you need to choose the appropriate token handling mechanism and deploy the correct combination of token pools for the source and destination blockchains. The table below summarizes the different token handling mechanisms and the recommended token pools to deploy for each scenario, ensuring a seamless token transfer process.
Token Handling Mechanism | Source Blockchain Token Pool | Destination Blockchain Token Pool | Notes |
---|---|---|---|
Burn and Mint | BurnMintTokenPool | BurnMintTokenPool | - Standard burn and mint mechanism for cross-chain token transfers. |
Lock and Mint | LockReleaseTokenPool | BurnMintTokenPool | - The source blockchain is the issuing blockchain. - LockReleaseTokenPool must be deployed on the issuing blockchain. |
Burn and Unlock | BurnMintTokenPool | LockReleaseTokenPool | - The destination blockchain is the issuing blockchain. - BurnMintTokenPool is used to burn tokens on the source blockchain, and LockReleaseTokenPool is used to unlock tokens on the issuing blockchain. |
Lock and Unlock | LockReleaseTokenPool | LockReleaseTokenPool | - Tokens are locked on the source blockchain and unlocked on the destination blockchain. - Not recommended due to fragmented liquidity and requires careful management of liquidity across multiple blockchains. |