Skip to main content
Registering ERC20 SuperPositions
Updated over a week ago

This guide helps strategists, protocols, and liquidity providers register ERC20 SuperPositions for use in SuperPools or other DeFi use cases.

Overview

When users deposit into vaults through Superform, the vault shares are locked, and representational ERC-1155 NFTs are issued to them by the Superform Protocol on their source chain. These representational NFTs are called SuperPositions and comply with the ERC-1155 token standard. ERC-1155 is sufficient for regular users looking for good UX, as depositing and withdrawing from vaults is cheap and efficient.

However, ERC-1155 is not enough for many DeFi users, as many DeFi primitives, including lending, staking, and trading, are built around ERC-20s.

Hence, Superform provides innate functionality within the SuperPositions contract to transmute the user’s ERC-1155 yield position into ERC-20 tokens, expanding its use cases.

Registering AERC20

Anyone can register a vault to enable transmutation to ERC20. Registration involves paying cross-chain relaying fees.

aERC-20: The ERC-20 tokens that represent the ERC-1155 SuperPositions are called aERC-20. They’re unavailable to users by default and must be registered by the vault creator/user before minting.

Multichain Registration: AERC-20 registration can always be done on the chain where the vault is deployed. Once registered, an ERC-20 contract representing the vault will be deployed across all the networks that Superform supports through Wormhole’s broadcast functionality.

Step 0: Deposit into your Vault Same-chain

The only prerequisite to register for your aERC-20 is having some SuperPosition supply on the vault chain. The SuperPosition supply for a vault should be greater than 0 to enable aERC-20 registration and avoid DoSing of the relayer.

Once you have made your first same-chain deposit and created a supply for your SuperPosition, you can start registering your aERC-20s. To do so, go to the SuperPosition contract on the network where your vault is deployed.

The SuperPosition addresses are in our docs.

Step 1: Go to the Write Contract tab on Block Explorer

Open the address on any respective block explorer and navigate to the write contract tab, as shown below.

Step 2: Connect Your Wallet

After opening the write contract tab, click the Connect To Web3 button and connect your wallet using metamask / wallet connect / coinbase wallet.

Step 3: Call registerAERC20

After connecting your wallet, navigate to the registerAERC20 function and enter the SuperPosition ID you wish to register.

The payableAmount (ETH) should be 0 for now as Superform Labs is subsidizing the cost.

Once you complete the details, click the Write button below and sign the transaction in your wallet.

Step 4: Grab some snacks and relax

The aERC-20 token contract will be registered instantly on the vault chain, but it depends on the Wormhole Guardian Set and Superform Relayers for it to propagate to other networks.

On average, it’ll take 30 minutes to 1 hour.

You can get the aERC-20 token contract by querying the aERC20TokenId function under the Read Contract Tab.

If you’re curious about the status of the wormhole transaction, use the transaction hash of registerAERC20 to write a call to track its status on wormholescan.

If the status on the explorer is VAA EMITTED, then the cross-chain registration process will be completed shortly. You can also check the registration status using the above-mentioned view functions on the SuperPosition contract using respective block explorers.

Once Wormhole confirms your transaction your SuperPosition is registered.

You can now move on to the transmute + SuperPool creation guide.

Did this answer your question?