logoAcademy

Token Home

Learn about the Token Home, the asset origin component of the ICTT

TokenHome

An abstract implementation of ITokenTransferrer for a token transfer contract on the "home" chain with the asset to be transferred. Each TokenHome instance supports transferring exactly one token type (ERC20 or native) on its chain to arbitrarily many "remote" instances on other chains.

It handles locking tokens to be sent to TokenRemote instances, as well as receiving token transfer messages to either redeem tokens it holds as collateral (i.e. unlock) or route them to other TokenRemote instances (i.e. "multi-hop").

In the case of a multi-hop transfer, the TokenHome already has the collateral locked from when the tokens were originally transferred to the first TokenRemote instance, so it simply updates the accounting of the transferred balances to each respective TokenRemote instance.

Remote contracts must first be registered with a TokenHome instance before the home contract will allow for sending tokens to them. This is to prevent tokens from being transferred to invalid remote addresses.

Anyone is able to deploy and register remote contracts, which may have been modified from this repository. It is the responsibility of the users of the home contract to independently evaluate each remote for its security and correctness.

ERC20TokenHome

A concrete implementation of TokenHome and IERC20TokenTransferrer that handles the locking and releasing of an ERC20 token.

NativeTokenHome

A concrete implementation of TokenHome and INativeTokenTransferrer that handles the locking and release of the native EVM asset.

On this page