Native Transfers
Last updated
Last updated
Spot assets can be sent between the L1 and the EVM. Spot assets on the L1 are called native spot
while ones on the EVM are called EVM spot
. The spot deployer can link their native spot asset to any ERC20 contract deployed to the EVM. The native spot asset and ERC20 token can be deployed in either order. The only native transfer currently enabled on mainnet is for HYPE.
In order for transfers between the two to work the system address (0x2222222222222222222222222222222222222222
) must have the total non-system balance on the other side. For example, to deploy an ERC20 contract for an existing native spot asset, the system contract should have the entirety of the EVM spot supply equal to the max native spot supply.
Once this is done the spot deployer needs to send a spot deploy action to link the token to the EVM:
Once a token is linked, it can be converted between native and EVM spot by sending the token to the system address (0x2222222222222222222222222222222222222222
). This can be done on the L1 using a spotSend action (or via the frontend) and on the EVM by using an ERC transfer.
There are currently no checks that the system address has sufficient supply or that the contract is a valid ERC20, so be careful when sending funds.
EVM PURR has been deployed as 0xa9056c15938f9aff34CD497c722Ce33dB0C2fD57
HYPE is a special case as the native gas token on the EVM. HYPE is received on the EVM side of a transfer as the native gas token instead of an ERC20 token. To transfer back to the L1, HYPE can be sent as a transaction value. The EVM transfer address 0x222..2
is a system contract that emits event Received(address indexed user, uint256 amount)
as its payable receive()
function. Here user
is msg.sender
, so this implementation enables both smart contracts and EOAs to transfer HYPE back to the L1. Note that there is a small gas cost to emitting this log on the EVM side.
Attached is a sample script for deploying an ERC20 token to the EVM and linking it to a native spot token.