New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Interchain Token Service by Axelar - ETHGlobal Bangkok 2024

ETHGlobalThu, Oct 9, 2025, 12:00 AM

Join us for a workshop with Ben Weinberg titled, "Interchain Token Service by Axelar" This workshops anticipates ETHGlobal Bangkok, a 3-day hackathon happening from November 15 to 17 2024, bringing together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com

Transcript

hi everyone my name is Ben Weinberg I'm a developer Advocate with the interop labs team um here to talk about our interchain token service Bounty as well as the axler protocol uh so let's get right to it um what is axler and it's simplest axler is an interoperability protocol that allows developers uh to send messages and assets between blockchains it is itself a blockchain so I kind of like to think of it as a blockchain for other blockchains um the easiest way to visualize Axel is in my opinion with this diagram it operates as a hub and spoke uh model which means that any of these other chains you can see here are connected to each other via Axel or spokes talking to the Axel Hub and the the main benefit of this is that this uh design really uh Works in terms of scalability if you imagine hopefully in the not too distant future in a world where we have like thousands if not someday hundreds of thousands of blockchains uh that want to communicate with each other if you went more in an approach of like a pairwise solution you'd have to manually wire up each of those 100,000 chains to each of those 100,000 chains whereas the hen spoke model all what you have to do is plug in your blockchain to the Axel Network itself and then right of the BLX it is automatically connected to all the other chains that are also plugged into the Axel ecosystem so it's the quickest and easiest way to connect your chain to many other chains like I said before sorry Axel is a blockchain for blockchains so what does that mean well the Axel chain is itself a chain built on top of the cosmos SDK uh there's currently 75 validators uh running the the proof of stake uh consensus mechanism and anyone here in the cosmos ecosystem that's listening might be familiar with some of these uh validators including like informal systems uh figment pachu these are just a few validators that I um pulled out um to Showcase um but it is at the same time permission list anyone can become a validator if they stake enough uh axl's Axl um also worth calling out this diagram is is of course uh a bit outdated in the sense that axler today connects uh 69 blockchains we're continually adding more chains so it's it's a lot more than just these chains here that you're seeing um largely within the evm and Cosmos ecosystems uh but expanding beyond that very soon um so now we know we have an interoperability Pro protocol that's scalable uh that is decentralized and secure and what can what can we actually do with it uh why does this matter well a lot of what we're seeing today is the use of asset transfer um and what we've seen over the past few years is the use of what we call Gateway tokens uh these Gateway tokens are kind of like wrapped versions of popular assets predominantly these are tokens that are manually added by the interop labs team uh to be compatible with axar and it's it's done a great job of enabling like cross-chain liquidity it allows like more Silo uh apps on different chains to to use tokens like Axl usdc Axl eth Axl BTC and this is great and it works but uh the goal here is to really Empower anyone to be able to build and integrate cross-chain compatible assets beyond the the several dozen Gateway tokens that are in existence today and that brings us to where we are today with interchain token service interchain token service or its as I'll refer to it allows for cross-chain tokens to permissionless be created or integrated by anyone um and I want to unpack this a bit permissionless unlike the Gateway tokens which were onboarded by the interop labs team this can be done by anyone anyone can go and create a new cross chain token or integrate uh an existing cross chain token uh as opposed to just us and then I also want to touch on create or integrate I I kind of uh already mentioned it but its allows you to really do two things here um when push comes to sh it allows you to create a fresh new what we call interchain token these are erc20 compatible tokens uh that are have cross-chain functionality built into it right out the box they are deployed with its so they are naturally integrated with it um and they have the ability to send what we call interchange transfers built into the smart contract itself on the flip side you can integrate custom tokens let me actually flip the slide here uh so what I just talked about is the ability to create new interchain tokens um via its itself the more like simplified uh interchain tokens uh with more limited functionality which is great for many use cases think of like meme coins or something like that uh this is super useful for them on the flip side of creating a new interchain token from itss itself is the ability to integrate or or what we call here upgrading an existing token into an interchain token so what does that mean these are uh tokens that are not actually created through its these are tokens that might exist already with like super Advanced custom functionality and you might have that token uh live on like three chains already and you just want to actually add cross chain functionality for those tokens so you can inte your custom token into its and then that will allow you to actually send those tokens between the different chains that it's deployed on so in short you can create new tokens with it or integrate custom tokens with it it's it's really designed to be uh as flexible as possible to to satisfy as many different use cases as we can so how is this architected and this is my super super simplified way of um thinking about it uh there's three critical contracts which you're going to have to be uh interacting with there's of course the its contract itself here at number one uh this is a single contract deployed on one blockchain um well there's one instance of it deployed on every blockchain that we're all talking to so let's say I want to deploy a new its token on on base and so do you and so does your friend we'll all be talking to that one instance of the its token contract on base and then it also exists on like arbitrum B&B any any of the chains that we can connect um so that's the itps contract then in addition to that there's the erc20 token right that's the token that we are going to be integrating or deploying whichever option you take the final contract is one that I haven't spoken about yet that is the token manager contract the token manager contract you can think of it as like you're a buddy for your interchain token it basically facilitates facilitates your relationship with your erc20 uh and IPS unlike the IPS contract which I said for there's like one instance of that on a blockchain token managers are unique for the token integration so if I integrate my ERC 20 on base and you integrate your erc20 on base we're going to have different token managers there's one for each token and token managers come in different shapes and sizes uh there's I believe five to be exact I'm going to focus on two here these are the two main ones that people typically use are um mint and burn and lock and unlock just going back to Mint and burn here uh it really as the is as the name suggests uh it basically will facilitate your relationship with its by burning your token on the source chain and minting it on the destination chain so in this example let's go through the flow quickly I have an erc20 on ethereum and on Avalanche I will now call The interchain Transfer function on my token this uh basically tells a token manager to burn my token on the source chain on ethereum once that's burnt we send a message across chain message to U the AAR Network um remember the blockchain for blockchain 75 validators these people these validates all come to consensus about the message that was sent once they're happy uh they will basically forward that message over to the Avalanche blockchain where our token manager there uh will mint the token and so simple as that so interchange transfer on ethereum manager Burns it message goes to axler axler forwards it to to IPS on on the destination chain um our manager um then mint the token on its on the other side there's lock unlock um as the name suggests uh instead of uh burning the token on ethereum we actually just lock the token then on Avalanche we mint and then when we want to send it back from Avalanche to ethereum we burn it on Avalanche and now we can unlock the token which we had previously locked when we were bridging it out of avalanche uh when we're bridging it back in um the reason we have lock unlock on ethereum and mint burn on Avalanche is because the way you should think about these different token manager types it's really context dependent so if you're in a scenario where you have like um a token uh with a home chain let's say ethereum is your home chain you don't want any tokens minted on any other chains the only liquidity you want existing on in this case Avalanche is in correspondence to a token that is locked on ethereum um so ethereum is kind of the home chain in this example an avalanche B&B base all these other chains can be thought of as a as a it's not non-home chains um or satellite chains I guess better name um whereas the previous case there is no home chain let's say you're on ethereum you're on Avalanche you don't care which which of these chains is canonical um the the token is is fluid across all these different chains as opposed to the other one where there is a home chain that's kind of the easiest way in my opinion to distinguish between you want to Mint burn manager or lock unlock manager um we also have actually uh a quick recap um of what we talked about because that was a lot we have the interchain token Service uh remember that is one contract which exists on each blockchain uh it can deploy new interchain tokens and it can integrate uh existing custom tokens right into IPS in addition to the its contract we have tokens which should use a unique token manager to fac facilitate that integration remember the Buddy of your token the token manager which is itself a contract uh talking about the manager and managers can take on different types such as mid burn or lock unlock um that's a kind of high level recap of what we just talked about we also have a very easy to use uh front end uh I'm just leaving this QR code here for you guys to to scan if you want to take a look I'll show it off quickly um you can see here it's it's quite self explanatory you have the ability to search for live erc20 tokens just by pasting in your address and then registering your token that way with IPS uh just a word of caution this will take the lock unlock approach so it'll basically say hey BNB in this case which is just what my metamask is pointing to is the home chain so I'll register it there as the token is written on on BNB and then if I want to deploy it on other chains like ethereum it'll deploy like the more simplified interchain token um in correspondence to locked tokens on BNB um we also have the ability to deploy new interchain tokens which I'll step through very quickly right here let's say I want test token TT I want to Mint like what whatever this is 800,000 tokens I can call this register button and then I can select however many chains I wanted to deployed on uh then I can just continue to follow through this flow um to simple as that really a no code solution for anyone who wants to deploy new cross chain tokens or integrate an existing token um to to to go forward here leave this um QR code for another five seconds um the last thing I want to talk about before we get into the more interactive part here is squid router squid router is a service that um it's it's a a separate team but they they build using Axel that I want to call out uh they're they're really an amazing Service uh which allows you as the image suggests here to have like cross-chain swaps uh between uh assets on different chains so in this case we're swapping in one click we on ethereum to BNB on BNB um the reason I'm mentioning this is because what you can see here is is the use of predominantly Gateway tokens um on squid but what we also have now or what squid is allowed is the ability to whitelist um your token um your in your token which is integrated to its on squid as well so if I pop over pop over to the squid front end for example I can look up tokens like any enu these are Tok this is an actual live uh token on squid on we're on mainnet right now that you can see exists on all these different chains um via its so let's say I have Neu on ethereum and I want to swap it to an asset on BNB let's say I don't know say usdt I can swap it uh just like that in one click and I can of course go both ways uh so really an easy way uh to start gaining traction for for users to provide that easy experience of of cross chain functionality for your users uh by Whit listing on squid um and we'll provide some info how to do that um in the notes here it's on our docs of course as well it's a very quick and easy process uh I believe that is it for the slide so let's hop it hop into the uh the more interactive part here uh make this a bit bigger you see here we have um an its uh sorry a a token contract uh which we wrote up it's it's very straightforward we import on the first line here the interchain token standard this is uh made by Axel uh and it basically allows you to your token to inherit from it and it very simply allow you to have like cross chain functionality built into your custom token so for example like the interchain transfer function will now be an external function on your on your token uh we of course have the interchain token service contract being um imported from here not inherited just imported uh we have the open Zeppelin erc20 uh contract uh just a little note here that like yes its contracts can use open Zeppelin and it can be as customized as you want it I really want to drive home that point that it can handle like any of these vast variety of customized tokens and then we have our Mentor contract being imported here it's like a little simple like Access Control uh style uh uh service here um just scrolling down briefly it's it's a very straightforward token we've taken the name the symbol and the Constructor uh the address of its assult which I'll come back to momentarily a couple getter functions for our its address our interchain token ID which I'll also uh come back to uh mint functionality burn functionality the ability to add new minors and then an internal function for an allowance of the token um so very simple token but a custom token none less um which we will now integrate with itps so first things first let's deploy this guy um let's do it on Avalanche I believe I'm on there already so let's pass in um name whoops my demo token MDT um its address is this guy it's the same address on every blockchain it's deployed on so um yeah um and then I'll pass in the salt which again I'll come back to in a bit why that matters uh the salt that is sweet so now we have deployed a token on Avalanche and then let's grab our interchain token service is this it yeah um interface so this is our its interface let me just scroll down here to the top of the interface I added it I'm doing on remix I know again it's a bit primitive to to do it on here um I think it's kind of just the easiest way to to visualize all the different steps so there's a lot going on here in the itss interface um I don't expect you to obviously go through it all the main function we're going to be working with is deploy token manager this as the name suggests deploys a token manager remember what is a token manager it's that buddy which you have with your token which facilitates the the relationship with itss uh it takes several parameters um deploy it and once you have your token manager deployed you're basically integrated with its on that blockchain so let's let's actually do that um do this first cool actually the first thing I'm do I'm going to Mint some tokens for myself because once we integrate we're going to want to send uh some cross chain tokens so it to me Min like 50 tokens confirm and while that's going through let's look at the interface of our its contract and we want to go right to deploy token manager this function that we're looking at here first we're going to need the salt which I promise will actually be explained soon um then we have our destination chain we basically have the ability to send like to if imagine we're on avalanche now imagine I want to deploy this token manager on ethereum from Avalanche like do a cross-chain deployment I have the ability to do that uh with its I'm not going to do it um I'm actually just going to deploy the token manager on Avalanche like on the same chain we are which means there is no destination chain so I can leave a blink token manager type remember there's different types of token managers like mint burn lock unlock uh we're going to go for the mint burn token manager which corresponds to enem number four our prams um is this large um item here this basically corresponds to something like ai. encode operator comma token address is basically what I just passed in there the operator can be thought of as an address with um certain roles for the for the token manager so like an operator for example has the ability to increase or decrease a flow limit so like if I only want five tokens to be bridged in and out of a given blockchain um then the operators who will be allowed is the one who will be allowed to set that address so I'm passing in the address of my operator and of course my token which I just deployed in in these prams gas value will be zero because this is not a cross chain transaction and now the salt I promised I'd come back to that the salt is used you can see in the contract here or the interface on line 267 while generating the interchain token ID uh so we use the salt and the operator basically uh will be the address who's essentially uh deploying the the token to generate the interchain token ID the interchain token ID is how its will register your token across all different chains so recall we're about to deploy let me actually run it right now we're deploying this token on Avalanche I've already deployed it I think it was BNB that I deployed on before and across BNB and Avalanche how does it know who it's bridging between well the token that is deployed even if the address is different will have the same interchange token ID according to it on both of those chains so that's how it that's how it kind of track those tokens and you generate that interchain token ID with assault which we passed in here as well as um with the address of the token that is actually deploying the token man manager that's part of the the logic that will be ran when we call this so it's very important that you don't forget which um address you use to actually integrate your token otherwise your interchain token ID will be different and the tokens won't be connected um now that this is deployed and we have minted the token let's actually see what's going on here uh we called this we got this transaction hash let's go to snowe trace and throw in this hash and hopefully we have some event logs here okay snow Trace is not very happy today um let's see interesting I don't think this is an issue with the transaction I think it's an issue from the Explorer side yeah that seems to have been an issue from the Explorer side um I hope well we we'll find out in a second if it was an issue us or not we you see here this interchange token ID that I have the ZX 5A make this bigger 5 A6 if I go back to remix and I throw this into this contract this um validate valid token address I pass in my interchain token ID if all went correctly its should return the address of our token sweet it did 0x20 which I believe is the address of our token yes it is um so it did work correctly I'm going to throw it in here as well to get the address of our token manager remember the other contract um token manager oh here token manager the other contract which um which matters it's like the Buddy for our token uh which is unique to our integration here so we have that address here 0x0 uh 2D so now what I want to do is basically add a mentor and that minor will be the token manager so I can burn and mint tokens um as we're Bridging the token in and out of the Avalanche blockchain and I believe I already did this on the other side for BNB and that's it our token is now actually integrated with itss so let's actually try send the token so we're going to send it to um binance recipient will be me um the amount let's just send one token here um where is balance I want to make sure I have some tokens sweet I do have some tokens um and then metadata will be zero this is like if I want to send like some extra data along with the token to like uh have it ex be executed on the destination chain some very powerful stuff you can do with it but I'm not going to worry about now let's just send the actual token now we need to send some gas to pay for the cross chain transaction um we could obviously talk a lot more in depth about how to actually calculate how much gas is needed but what matters is and what I'm going to call out here is that even though we're about to send a cross chain transaction and let me actually send it hopefully it works yep even though we've just sent it a cross chain transaction paid for it on the Avalanche blockchain the Axel network will actually handle paying for the for the gas cost on the destination chain as well and on the Axel blockchain itself because remember Axel is also a blockchain uh which is pretty awesome um transaction hash let's check it out hopefully snow Trace isn't weird again Sweet 23 seconds ago transaction was sent um and I can and that's it our token was basically now burnt you can see on the source chain while we wait for it to go through on the destination chain I'm going to show off another cool feature that we have and that is the Axel scan block Explorer the Axel scan block Explorer I I do a whole other talk about that it's it's a real good spot to get like an overview of the entire network um different relevant stats about Axel you can see a much more upto-date graph compared to the one I shared here four of all the different chains which are now actually connected with Axel uh keep in mind this is on test net not main net that we're looking at um but yeah you can see like all this different interesting stats about U about Axel but back to the matter at hand I want to take my transaction house throw it into the search bar here and um we should see Axel scans view much more helpful View of um of the transaction I didn't send enough of a fee so I can actually do that straight from the Axel scan Explorer um on the topic of gas we do have like an SDK to properly estimate how much gas you should send I just kind of sent an arbitrary amount you can also send a very high gas amount because if you send a surplus then you'll automatically be refunded whatever gas you've overpaid which I is probably what I just should have done um but this is good to see as well in the case that you do under under send gas then you can top it up from the Explorer or of course programmatically from our SDK and what's nice about the ax scan Explorer is like unlike no issues with like any individual block Explorer like snow trace or ether scan or anything the ax scan block Explorer is like built to show cross chain transactions so you can see like all the details it's going from Avalanche to the B&B chain um you can see the address of the token uh what service we're interacting with which is interchain token service you can even see the step byep of the transaction being sent so like I can see I was sent on the Avalanche Explorer I can click on this takes me right to the native block Explorer which is pretty neat I can see the gas being paid I can see the transaction being confirmed on the axar network itself remember axler blockchain for blockchains the 75 validators at this Step at step three are coming to consensus about the GMP message uh that was sent um so we click on that we can actually see that on uh axler scans Explorer and then hopefully momentarily we should see step four going through which is basically a transaction this time on the destination chain on bance's chain and it's basically saying like hey this transaction was approved by the axler network and that's what we should see momentarily here on the binance chain and then once the transaction has been marked as approved uh on binance we uh will be able to execute it and I'm in the meantime going to load up our our token here on the Avalanche side hopefully before this all execute cool um where is my balance of function so you can see Zero so the token has not finished sending yet this is on no remember before was 50 because that's we were that's because we were at um on avalanche now we're sorry um we have to be on binets I believe that was the destination chain correct yes binets you could see here that it's executed actually um so now if I flop over my metamask to binance Smart chain I um throw in this address here then I can see if I query the balance of hopefully this should be one and it is we have um now successfully um congratulations bridged our interchain token from Avalanche to binance the reason it was Zero before was because I punched in the address of the Avalanche token or the binance token on Avalanche I believe uh but now you can see that it did work I can go back to the Axel scan Explorer I can see the final two steps here uh including the gas refunded step that I was talking about before because I guess we did end up overpaying so I can click on this takes me right to the binance Explorer I could see my token being minted uh to me so this worked um yeah that that's that's basically it for this um and for the Bounty i' I'd be very very excited to see what kind of uh token Integrations you can do I'd love to see if you guys can uh do things like Whit listed to squid um send data along with your interchain token we have full tutorials on our docs on how to integrate this I'm going to leave this QR code in the meantime uh full tutorials on our docs on how to integrate these tokens you can of course scan this QR code to play around with the front end portal as well um and and of course check out the IPS contract um as well I'll be there for the hack on so happy to answer any questions thanks very much and I'm excited to see what incredible stuff you guys um you guys build at this hackathon thank you

Automatic transcript — names and jargon may be misspelled.