Skip to content

Contracts and canisters enabling ERC20 ICP on Ethereum

License

Notifications You must be signed in to change notification settings

dfinity/erc20-icp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERC20 ICP on Ethereum

This repository contains two parts enabling the ERC20 version of the ICP on Ethereum:

  • the ethereum ERC20 contract and
  • the escrow canister holding native ICP backing the ERC20 twins on Ethereum.

How it works

The escrow canister holds at least as many native ICPs as currently exist in form of minted supply on Ethereum. Whenever users want to mint new ERC20 tokens, they have to deposit native ICP into the minter canister. Whenever ERC20 ICP gets burned, the escrow canister releases the corresponding amount of native ICP to the eligible recipient.

Setup

The ERC20 ICP contract is deployed on the Ethereum mainnet and is controlled by the ICP escrow canister deployed to the IC mainnet.

Minting

In order to mint new ERC20 ICP tokens on Ethereum, a user needs to:

  • deposit native ICP to the escrow canister,
  • receive a ECDSA signature back from canister allowing to mint new ERC20 tokens,
  • call into the ERC20 ICP contract with the received signature.

Burning

In order to unwrap ERC20 tokens on Ethereum and get native ICP on IC, a user needs to:

  • have some ETH20 ICP tokens on their balance,
  • call the burn function of the ERC20 ICP contract with specifying an ICP address,
  • wait until the escrow canister on IC registers the burning event and transfers the burned amount of ICP to the provided ICP address.

See this document for more details about both flows.

ERC20 ICP working name

In the presented source code, we refer to the ERC20 ICP by its working name ckICP. This might change later.

About

Contracts and canisters enabling ERC20 ICP on Ethereum

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published