The State of Cross-Chain Messaging: Squid Router x Axelar Core

18 Oct 2023 · 19:47

In this Rollup explainer, Robbie Rollup breaks down how cross-chain messaging and routing work under the hood of Axelar's core network and Squid Router. The conversation covers how the two pieces combine to abstract away the complexity of moving assets and data between chains, aiming to make cross-chain swaps feel like a single transaction. It's a beginner-friendly walkthrough of interoperability infrastructure for anyone trying to understand how chain abstraction gets built in practice.

Speakers

Topics

Transcript

[Music] what is going on Jack welcome to the channel uh this is the rollup bro how you feeling feeling great Rob how about you I'm feeling good too bro we're gonna talk about some uh cross chain liquidity messaging today so maybe we could start off what what do you know now about cross chain liquidity uh I believe it's the future okay why is that uh just you know basically you can think of uh you know crypto as kind of like these different cities all over the place and you know one day there's going to be train routes to each and every one of them is kind of how I view it yeah I think that that's

an analogy that vitalic has has spoke about too where like even even when we had like the the like before all of like the layer ones layer twos and layer 3es and the rollups uh there was like this thing about sharding where it was like going to break ethereum up into a bunch of different pieces and then the main piece where was the most uh competition for gas and liquidity was like Manhattan like the Wall Street of crypto and then you all you had like all of these like exterior cities and infrastructure that connected all of them so 100% uh the cross chain messaging is how you it's like you can think of it like the trains you can think of it like the roads the

infrastructure that connect the like the post office that connects and sends messages and really anything like you can send a letter through the post office you can send a package you can send someone a check so like that's kind of what we're going to be talking about today is cross chain liquidity which is like sending money from City to City totally money uh yeah every form of money as well yes exactly onchain money offchain money uh eth Bitcoin various tokens and then when you get these tokens to the other side uh ultimately you could can then do a whole bunch of cool stuff with them um totally so I want to I want to show you this article because we're

gonna be talking about squid today and Squid is a partner of ours and they do some really cool things in Cross chain liquidity and they use a cross-chain messaging protocol called Axel so from like you know you you've been on on chain you have been making transactions so like what do you what's your understanding of uh like kind of the bridge ecosystem and and how these messages are sent back and forth between chains I mean as far as the bridges go there's you know there's uh a lot of bridges that I feel like we're all using you know pretty pretty commonly more so than we were in the past so bridges are definitely a lot more apparent I would

say um yeah that's about that's about it on that one cool that's okay we're going to we're going to dive a little bit deeper uh into the relationship between squid and axel and then hopefully that highlights how some of these cross-chain messaging protocols and some of these Bridges work together to ultimately get your tokens to where you you want them to go totally let's do it cool so this is the the traditional Bridge setup we have a source chain in this case we're looking at polygon here on the left and maybe we have some LP tokens on quick swap so we've got a polygon which is madx die wrap Bitcoin and let's say we want to go over to this destination

chain let's say we want to go over to Moonbeam and we want to deposit into one of the popular decentralized exchanges over on moon beam so this is how squid and axar work together squid is able to take your decentralized exchange tokens run them through a stable swap so let's say you start with a you can go from a into usdc and then that part is handled by squid because squid handles the liquidity and then we'll we'll kind of like continue to unpack what squid does and what axar does because when you think about bridges cross chain messaging and cross chain liquidity are almost like wrapped

up in that same like Bridge buzzword so we're gonna unpack that we're going to dive a little bit deeper so that we can separate the liquidity part and the message part and hopefully understand what squid and axar do a little bit more Clos ly and clearly so squid is going to handle the liquidity they're going to take it from The decentralized Exchange pass it through a stable swap so that you go from a into a token that is able to go from City a to City B and then Axel axar is the the messaging protocol that is going to send that message from City a to City B in this case City a is polygon City B is moon beam so you can see in this in this diagram here we have

squid on the left and we've actually got squid on the right and axel is handling this piece in the Middle where you go from yellow to purple so squid is going to take our a pass it through usdc and then pass it into a liquidity token that is compatible with Axel in this case that is Axl usdc Axel is going to handle the balance from the account on polygon to the account on Moonbeam and then squid is going to pick up on the other side they're going to take that liquidity in the form of Axl usdc now on Moonbeam and they're going to transfer that into the destination exchange on the destination chain in this case that's a or one of these other tokens on

the exchange on moon beam Rob is that how most of these bridges are kind of working like other Bridges like Orbiter and things like that yeah yeah so this is this is Common Place throughout the industry where you have a messaging protocol that almost serves as like the backend Communications between these cities and then you have a layer on top that serves as the liquidity part that's handling like the money and the packaging up making sure that the tokens that end up going from one chain to another are compatible with the messaging protocol underneath is that Axel's technology right Axel is the technology underneath squid is the technology that handles the

liquidity on top other other uh formats of this like uh compatible technology bundles that that you'll see in bridges um you might see uh other examples of cross-chain messaging uh uh protocols examples are um layer zero they're another they're another form of this Axel technology that handles cross-chain messaging connect uh connect with an x connect is another form of cross chain messaging protocol and then Bridges use this messaging technology to send liquidity between chains so let's let's get a little bit deeper so that we can

understand kind kind of like the nuance and the difference between squid and axar so you see here squid uses Axel's General message pass passing capabilities to enable Smart contract calls across multiple chains so Axel has this General like cross chain messaging protocol squid uses that for liquidity squid uses this multi call feature so that applications can call multiple contracts in sequence and that's what that's what we see up in this diagram here squid is is putting together contract calls which are transactions Squid's putting together these transactions in sequence so that

if you use squid you can go from The Exchange to the stable swap axar uses that piece in the middle and then squid builds another sequence of transactions on the other side to go from the stable swap to The decentralized Exchange and that is the multi call feature of Squid got it um use cases of this m multi call feature might be uh swapping tokens using a DEX it might be uh using the acquired tokens on the other side in another decentralized exchange um and these we we've seen like other examples of these protocols like squid uh that route transactions through multiple applications in sequence there's a really uh popular uh

application on mainnet it's called defi saver and they're friends of ours and what they do is create these recipes where again it's like sequences of transactions they don't do any cross-chain stuff but they'll do uh like automatic repayment of an a loan where if uh they notice that your a loan is getting under collateral ized they will sell some of your tokens in one app they will then take those tokens in sequence and deposit them into your a collateral so that it brings your health Factor up a little bit so you avoid getting liquidated and and that's what squid does by routing these transactions across applications they're able to put

together these transactions in sequence for a specific use case or Reason um once you build in Axel or connect or lay Zer that's when you incorporate the cross chain piece of these sequential transactions um so what what you see here what this means for users is oneclick transactions same uh similar to defi saver or like these transaction recipes you click one button all of a sudden there's going to be three or four dominoes that fall and all of those are transactions that take place on chain to accomplish a specific uh use case or application that you're that

you're looking to accomplish um that might be uh signing transactions across different chains if you're using the the cross chain messaging uh it might mean buying nfts from any Marketplace it might be playing a game with those nfts on another chain or transactions with multiple defi apps without any extra steps so with these sequential transactions squid enables daps to Source cross-chain liquidity and deliver this kind of experience because they use the axillar network to go cross chain and send those messages um there's one more diagram I want to show you Jack if you're up for

it yes sir let's see it cool so this one goes a little bit deeper and hopefully uh if we kind of like unpack what's going on in this flowchart we'll see even even closer the relationship between squid and the AAR Network again you can see squid here is on the left in yellow squid is also here on the right in purple and the middle piece where you go from yellow to purple that that yellow to purple is showing it one chain to another that cross chain piece is handled by axillar Network um so what what you'll see here on the left you start on ethereum you input your swap details that might be

that might be usdc to hether it might be eth to bitcoin it might be you know token a to token B you input those details on the front end of uh uh squid application um those input uh those swap details hit your wallet you approve them and then the approval and your transaction hits the squid router when your transaction hits the squid router there's all these magical levers and pulleys that end up getting triggered in the back end so that your transaction ends up where you want it to go any questions um isn't skd or SDK isn't that

just like their uh their code basically for this process yeah so SDK right here stands for software development kit uh for any application on any chain supported by squid applications on these chains can integrate Squid's router using this SDK I read about this I believe yeah so so essentially squids Squid's endgame is to integrate their router into all of these applications on all of these chains and that way we abstract away all of this cross chain routing and messaging transactions so

that all of that happens underneath the hood and what what you see on on top is a really easy use case to go from point A to point B whether that's an nft into a game and then use that nft for you know battling some other character on this game all of the you might be getting that nft from openc on arbitrum I don't even know if open sees on arbitrum but you might be getting that nft on some random chain and then have to bridge that over to the chain that you're playing this game on and if I'm a gamer I don't really want to be switching networks and and figuring out like how to get this nft this maybe it's a sword

or maybe it's a gun I don't want to be figuring out how to bring that that game asset into the game on on the network that I'm playing on I just want to be able to click buy and then my character levels up so that it now has this weapon that I can use in the game the squid router is going to handle bring that that asset bringing that weapon into the game world that I'm playing on and that's because of the squid router and and the SDK makes it really really easy for any applications to integrate this this sequential transaction this router form uh and because squid uses Axel's Network you also get this cross chain uh messaging

protocol underneath the hood when you integrate Squid's router got it pretty sweet stuff yeah yeah man I I think this is part of like the world I'm gonna I'm G to stop sharing because I think I think we kind of like understand the the relationship between squid and axel now so I think this is part of the world where like we get thousands of rollups thousands of chains like we kind of saw a little bit of a of like this like explosion of like new chains when it came to like layer ones we saw all of a sudden it wasn't just ethereum anymore it was ethereum and polygon Avalanche Phantom so like all of these evm

chains we only I mean it was a lot to deal with at the time because we were going from one to like 25 but now that we kind of have our like our like mind like rewired to understand multiple chains multiple execution environments entail like thousands of these chains all for like a specific use case maybe it's a little bit more gas or it's a little bit more decentralization or it's a little bit more liquidity we're now going into this world where all of these apps have their own chain they call them app chains there's thousands of rollups that are on the horizon and to connect all of these rollups and all of these networks together we have to have this like cross chain really flexible router

technology that is able to provide the infrastructure like the the roads and the train rails between these cities now that we're going from 25 cities to a thousand cities in the ethereum world Rob do you think it could get two out of hand one day so I I I think so I think like if we take like we we can think of out of hand in so many different ways think about it like in terms of liquidity like if we have a million bucks on one chain we're going to get like a pretty liquid exchanges not too much slippage when we're going between tokens but if we only have the same of liquidity and now it's spread across

thousands of chains that could get into a really illiquid environment and then slippage starts to get really high and we get some price inefficiencies in these markets I hope that the infrastructure and the technology catches up to that so that yeah maybe we do have the same amount of liquidity across all of these these rollups and all these networks but if we're going to do a swap on one of these networks and it doesn't have much liquidity rather than like eating that slippage we bring the liquidity from another chain put it into the chain that we we want to make the transaction on so that we end up in a more liquid environment before we make that Swap and we don't deal with all of that

slippage so I think there's a real possibility for it to get out of hand um there's so many moving parts and so many like Legos that are fitting together where if one of those pieces cracks the whole Foundation could could crumble so it's really important and it it's really important to use like these standard code bases if something is already built like we don't really need to build it again uh and kind of like introduce like minor changes in codes that's when it's like trust what what is don't just trust but verify right like verify that the technology that you're using has been audited uh it's gone through like so many Security checks um because if we're going to repurpose one of these

Technologies let's just repurpose one that's already built that's already gone through these audits so that we don't risk putting in these like little uh little bugs or little cracks in the framework and then the entire infrastructure crumbles I think we're like at the point where we're starting to we're starting to use these pieces for Creative use cases and they're starting to fit together in Secure uh like a secure compatible relationship with one another and I think that's part of like squid building on top of ax not trying to like rebuild the wheel uh of what axar is already built that allows squid to specialize on the liquidity piece and it allows Axel art

to specialize on the cross chain piece and by working together you get some really cool use cases totally yeah red that axar is pretty uh safe and secure net you know systems and processes as well that you know are pretty up there with technology so yeah axar is legit they've gone through you know tons of security Audits and there are other options out there um Beyond axar you got connect you got layer zero there's some cool relayer networks out there too and all of these have you know really really subtle differences in their use cases so it's important to kind of do your due diligence if you're building on top of one of these Solutions you know check out all of them they're each going to

have a little bit of a of a tweak in their parameters and then you can optimize that tweak for the use case that that you want to specialize in understood sounds about right yeah man well Jack thank you for coming on today and uh allowing me to uh speak to you about uh cross chain messaging and and sequential transactions bro yes sir we learned a ton thank you rob it was a pleasure buddy let's build yes sir cheers