The web3 industry has developed as much of a culture as it has a technology. A large part of that culture has been the rise of memecoins. Originally pioneered by Dogecoin, memecoins have emerged as a fun, lighthearted way for people to grow communities and try to make lucrative earnings in the process.
Memecoins have always been a part of the industry, but have recently been thrust into the spotlight these past few months with what people are calling memecoin-mania. Like any token on the market, the amount these memecoins can grow is limited to the number of holders it can reach. If the token is deployed on a single chain its available demand is limited to the community of that blockchain. With the emergence of Axelar’s Interchain Token Service (ITS), memecoin creators now can create a natively cross-chain memecoin easier and quicker than has ever been done before.
ITS is a permissionless cross-chain token bridging service that allows users to deploy new cross-chain tokens and integrate live tokens to enable cross-chain functionality. It has a smart-contract deployed on nearly two dozen EVM chains that users can interact with to integrate and bridge their token. For a quicker integration, there is also a no-code solution (testnet portal) that users can integrate with as well. The rest of this blog will show you how to deploy and use your cross-chain memecoin both via the no-code portal and the programmatic solutions.
Memecoin With ITS Portal
The most simple way to get your cross-chain memecoin deployed on multiple chains with built-in cross-chain functionality is through the portal. The portal is a free permissionless UI that interacts with the ITS contract. It gives you the option to deploy a fresh new token or integrate an existing token. Let’s go with the new token option. You can now fill out the token registration form.
This requires the token’s name, symbol, decimal points, and total supply. While these parameters are relatively self-explanatory the mintable
toggle is less so. The mintable
toggle will allow you to set a “minter” address that can mint the token, since this is a memecoin it is best-practice that this token does not have any address that can mint additional tokens beyond the initial supply that is being minted on deployment. The salt is a unique value, which along with the deployer’s address (ITS itself in this case) will be used to generate the interchainTokenId
. This ID is the unique value for your interchain token as far as ITS is concerned on-chain. There can technically be other tokens with the same name and symbol but the ID will need to be unique.
Once the token parameters have been filled in you can select which chains you want to deploy on (in addition to the chain you have your wallet currently connected to).
You have the option to deploy to any of these chains (and many others as well) simultaneously. For now, you can just deploy on Immutable to keep gas costs at a minimum.
Once the token is deployed, you will find yourself on the token detail page where you will see all the relevant info for the token as well as the chains the token is deployed to. On this page, you can also deploy your token to other chains that you did not initially deploy on.
The token detail page shown above also provides a simple UI where you can interact with your token. For each chain your token is on with liquidity, you can send a cross-chain transfer between chains. In our case, the token only has liquidity on BNB. If the token was deployed with the mintable
option toggle on, then you could also mint tokens.
The token that has been deployed from the portal is an Interchain Token. It contains all the standard functionality of an Open Zeppelin ERC20 with the addition of the interchainTransfer()
functionality. Another added benefit is that the token is immediately verified on all the block explorers it is deployed to, which adds to the legitimacy of the memecoin in the eyes of the community.
Minting
In this example, since the token is not mintable
the 1 Billion tokens that were minted upon creation are all that will ever be created. However, the token that is deployed still does have a mint()
function. The reason for this is that when tokens are bridged between chains they are burned on the source chain and minted on the destination chain. If the token has no official minter then the only contract that can mint the token is the ITS contract itself. This does not pose any security threat for your memecoin to mint an infinite new supply of new tokens as the mint() function only exists to bridge the existing supply of tokens between chains, rather than to create fresh new tokens.
Adding Value
Now that your token is deployed successfully, you can create a liquidity pool for it on a Decentralized Exchange (DEX) so that it can receive some actual value. This can be done on any number of exchanges, we will use Pancake Swap.
DEXs allow users to swap tokens. They leverage pools of assets to generate a value for each token. For however many pools are in a given token the DEX uses a formula to calculate what each asset in the pool can be traded for.
For the memecoin all you have to do to give your token a starting value is to create a pool for your token alongside another token that already has an inherit value. Once you have funded that pool with the two tokens your memecoin will be given a value relative to the amount of liquidity supplied to the pool for the two tokens.
The memecoin so far is deployed on BNB and Immutable. Let’s create a liquidity pool on Pancake Swap’s BNB instance for the CCM memecoin with Binance’s native BNB token.
To do this go to the Add Liquidity page on Pancake Swap and ensure that your wallet is pointed to BNB’s testnet. You can then create a new pool for tBNB and your ITS token’s address by importing your ITS token on the Pancake Swap UI
Next, you can deposit funds into the new pool. You can deposit however many of the memecoins and BNB you want to the pool, depending on what you want the price of the memecoin to be. For this demo, we will deposit 75% of all minted memecoins to the pool along with 0.5 BNB. The DEX UI will show you the value of your memecoin relative to BNB before creating the token pair.
You can then submit the transaction to create your pair!
Once the transaction executes you will be able to swap your token on PancakeSwap for other tokens so that it has a real value.
Notice the CCM asset does not have an image being picked up by the DEX. This is beyond the scope of this tutorial but to do so you could add your token metadata to TrustWallet, which many DEX’s pull from to render token metadata.
Cross-Chain Token
Great! At this point, you have deployed an ITS-compatible token, which exists on both BNB and Immutable. The real magic though is the ability to send these tokens seamlessly between the two chains (and more chains as the CCM token is onboarded to new chains).
Stepping back into the ITS Portal you will see the token has been minted on the BNB home chain but there is a supply of 0 on the Immutable chain. The portal offers a simple one-click transaction experience where users can simply input the amount of tokens they want to transfer. Simply click the transfer
button, which will allow you to transfer to any chain your token is deployed to. This will trigger a cross-chain transaction that can be viewed on the Axelarscan block explorer. When the transfer completes, the tokens will be burned on BNB and automatically minted on the Immutable chain. You’ve just migrated your tokens seamlessly!
Now that the token is on Immutable you can create a pool on a DEX there so that the token has a value on that chain as well. This adds more overall liquidity to your token as it will now be exposed to the communities on more than just the BNB chain, thus providing more opportunity for memecoin to increase in value.
Adding Value on Immutable
Similar steps can be taken to give the token value on Immutable as you did on BNB.
For Immutable you will need to use the Quickswap DEX to create a pool for the CMM token’s instance there.
This will follow a very similar flow to the path you used on PancakeSwap.
Go to the pools page
Import your memecoin by pasting in the address
Select your fee tier
Select your token’s price range
Deposit your memecoin as long as an additional collateral (you can simply do IMX for Immutable) into the pool.
When you press the preview button, your pool should look as follows
Great! At this point, you should now have a fully functioning pool on the Immutable blockchain. Your memecoin is now operational and accruing value on both BNB and Immutable.
Why this matters
Now that your users can interact with your tokens on multiple blockchains the amount of users you can reach and liquidity that can be injected into your memecoin significantly increases with each new blockchain you deploy your token to. This can be as strategic as being an early memecoin adopter of a hot new layer two or reaching the large user base of more established blockchain ecosystems.
With your token operating on dexes across multiple blockchains the opportunity for lucrative arbitrage opportunities becomes available for your community. Your community can do the heavy lifting and earn substantial rewards in the process to ensure the price of your memecoin is consistent across chains. More creative teams can try to gamify this process to make their memecoin fun and unique compared to other non-cross-chain memecoins on the market.
Memecoin Programmatically
When going through the ITS Portal the token that will be created is an Interchain Token. For teams that want to have some more customization to the functionality of their token, they will need to integrate with the ITS contract programmatically. To do this you will need to call the deployTokenManager()
function exposed by the ITS contract.
Before integrating with ITS the ERC20 memecoin must be deployed programmatically. This can be done via a foundry-based local repository or through a simple ERC20 deployment on Remix. Once the token is deployed and has an address you can integrate it with the ITS contract by calling the aforementioned deployTokenManager()
function.
To call this function you need to pass in several parameters.
Salt
: A unique identifier for your tokens deployment- This will be used to generate the interchainTokenId.
DestinationChain
: The chain you are integrating your token on- If you’re not making a cross-chain call this can be an empty string.
TokenManagerType
:- The type of token manager to be deployed. There are several types of managers, the recommended one for most integrations is the
mint
/burn
token manager. More on Token Managers can be found here.
- The type of token manager to be deployed. There are several types of managers, the recommended one for most integrations is the
Params
:- This is an encoding of your token’s
operator
andtokenAddress
.
- This is an encoding of your token’s
GasValue
:- This is the amount of gas to pay for your cross-chain deployment. As with
DestinationChain
if you are deploying your token manager on the same chain (i.e. not a cross-chain call), this can be set to 0.
- This is the amount of gas to pay for your cross-chain deployment. As with
Once this function is called you will be returned your interchainTokenId
InterchainTokenId
The interchainTokenId
is the unique identifier for your ITS token across all the different chains it is integrated with. It is how ITS will know which token across all chains your token corresponds to when burning it on one chain and minting on another.
This ID is created by hashing the address of the sender
of the Token Manager deployer with the salt
used in the Token Manager deployment. For this reason, it is critical to use the same deployer address across all ITS integrations so that the interchainTokenId
is consistent across all chains for your token.
Interchain Transfer
Once your token is integrated and you have an interchainTokenId
across several chains you can call the interchainTransfer()
function to send cross-chain transactions for your token. This function is defined on the ITS contract but can also be added to your token if you prefer to send cross-chain transfers from the token itself.
It takes several parameters including;
TokenId
: This is theinterchainTokenId
you received when you deployed the token manager.DestinationChain
: Name of the chain you are sending the token to.DestinationAddress
: Receiving address on the destination chain.Amount
: Amount of the tokens you are sending.Metadata
: (optional) Executable data to be sent alongside your token. Most likely not needed for more basic memecoin initiatives.GasValue
: Amount of gas you are sending to pay for the transaction. It should match themsg.value
you're sending with the token transfer.
Once this function is called you should be able to see the cross-chain transaction be sent on Axelarscan.
For a more detailed example of how to integrate and send a custom cross-chain transfer, you can visit this example.
What’s Next?
Now that your memecoin is successfully deployed and bridgeable between different blockchains you can whitelist your token to Squid Router. Squid provides an easy-to-use cross-chain swapping experience for your token, it also plugs into many popular wallets such as Meta Mask. By whitelisting on Squid your users will have a one-click bridging experience.
In this blog, you went over how to deploy a cross-chain token both with the ITS Portal and programmatically by interacting with the ITS contract directly. You interacted with DEXes on multiple blockchains to assign a value to the token which on mainnet could prevent exciting arbitrage opportunities for users.
What may have once been an ordinary memecoin on one blockchain is now a unique cross-chai compatible memecoin with the ability to access any user in web3.
For more exciting technical tutorials pushing the limits of what can be done cross-chain check out the Axelar Developer Blog and the Axelar Examples repository. For more ITS tutorials check out the developer guides on the Axelar docs.