Moonbeam: Ethereum compatibility and Polkadot interoperability
ETHCC 5 · July 2022 · 24:44
Derek Yoo examines Moonbeam's combination of Ethereum tooling with Polkadot interoperability. Examples include multichain deployments and XC-20 tokens that can be used as ERC-20 assets on Moonbeam and Moonriver.
Speakers
Topics
From ETHCC 5, hosted by Ethereum France.
Transcript
all right why don't we uh why don't we get started here so uh my name is derek yoo i'm the i'm the ceo of a company called pure stake but the main project we work on is called moonbeam and uh wanted to talk to you today uh about uh uh not just about moonbeam but about more broadly cross-chain scenarios right cross-chain uh connected scenarios and what i think are actually some quite interesting developments that are happening right now around teams that are building new kinds of applications that cut across uh different blockchains and so that'll really be the the subject of the of the talk today and
so i would start a little bit with some some background um you know the question is uh why is it that we're moving into this multi-chain world when we started moonbeam as a project back in 2019 we had this idea that you know we're going to move into an environment with more blockchains um make many more blockchains and that's started to happen right since 2019 there's a lot of new blockchains moonbeam being uh one of them but i think we're starting to become clear why it is that that uh that that we're moving into this multi-chain world right uh there's just increasing demand for block space that is driving uh the creation of new of new chains and new development frameworks that are
coming around right so development frameworks like the cosmos sdk or substrate make it a lot easier to build your own blockchain and so you have this opportunity to specialize and um i i just see this trend continuing right so i kind of liken it to i often think about the history of compute and in the early days of compute there was very few computers right and there were people even around at that you know way back then saying things like there's only going to be a small number of computers they're so expensive they're so you know difficult to manage um you know there's only going to be a few of them and people are going to share them well obviously that's not how things turned out right when you have something useful that gets created it tends to specialize over time there's multiple different issues that the
technology will move into and um i think it'll be something similar with blockchains right albeit with a kind of a consolidation around certain tech stacks or operating systems the evm being one which we'll talk about we've made a big bet on the evm substrate being one cosmos sdk being another one there's a few kind of concentration areas that we're going to see as this plays out but uh let me first give a little context on on on polka dot which is um uh kind of the system uh that we're part of or the network that we're part of and we're using a lot of the technologies that come from the polka dot ecosystem to build moonbeam and given this kind of vision that there's going to be many blockchains you know
the first question that that came to our minds was well how are these chains going to communicate with each other and this is something that led us down the path towards uh towards polka dot even back in 2019 when we started and so the i'll summarize the core idea of polka dot as consisting of two main uh principles you know one is that you can have specialized chains so you can create your own blockchain using substrate the development framework you can specialize that chain to be good at a particular thing and then the idea of polka dot is that you can basically connect these different specialized blockchains together so that they can talk to each other so they can exchange information so that they can use services from each other and so
those two ideas together are really the core ideas of polkadot and i still find them as attractive today as i did back in 2019 when i first learned about them that you know you have this whole is greater than some of its parts concept right where you can have these many specialized chains that are all working in concert together um to deliver you know some some higher level uh effect and so that's that's the syst that's kind of the environment that we're part of and so to talk about what moonbeam is so moonbeam is one of the kind of member chains of polka dot it's called a parachain but the idea of moonbeam is to be a smart contract platform uh that specializes in cross-chain use cases so that is really our focus and specialty we have some unique ways of
addressing those kinds of scenarios by being part of polka dot and leveraging their xcm technology which we'll talk about a little bit later in the talk but the idea is that uh we use this concept of connected contracts the idea is that a smart contract on moonbeam can be used to reach you know any user any asset or any service regardless of what blockchain it's on and we're using some uh some pretty interesting technology to accomplish that xcm being one but also integrations with a number of uh different uh cross-chain messaging systems uh which have just come to market uh this year and so i do think that this is an area that i'm you know i'm quite excited about because i think this is we're at the beginning of a let's call it a big
shift that's going to happen in the next 12 to 24 months where developers are going to start using these cross-chain messaging technologies to deliver apps that really do do different things than kind of the apps that are around today that work in a different way so um when we when we're talking about connected contracts and this ability to create smart contracts on moonbeam that can you know reach out across to different blockchains and access you know services access assets there's really three supporting ideas in moonbeam that help make that happen so one of them is this this cross chain messaging and here i i drill in a little bit and say that within cross-chain messaging you have different approaches that are being tried out now so the market is
still early a lot of these systems have just been shipped including xcm so polka dots xcm went live about two months ago we already have a number of different use cases already live like on moonbeam and many more that are kind of in uh in development right now but there also has been this rise of these what i'd call these overlay networks so different kinds of networks that will allow developers to send messages across blockchains even across different consensus systems and so a couple examples ones that we've been working with early on are the team at axillar and nomad two partners of ours where there's already significant development activity happening by teams or leveraging uh the cross-chain messaging from these
different providers so there's this cross-chain messaging element and i will go through a number of examples to help illustrate like the kinds of things we're seeing but you know that alone doesn't get you what you need so on moonbeam we're also providing a full development environment we've done a full implementation of the ethereum tech stack in substrate so substrate is the rust based development framework that you use to develop things uh to develop blockchains like in uh you know either standalone blockchains or blockchains are going to be part of the polkadot network uh so we've done a full ethereum implementation evm you know web through rpcs the whole the whole thing and also surrounded that with all of the tools that an ethereum developer like expects and needs so those are things like an ether scan deployment uh we just had
a chain link integration go live and you know there's a long long list of integrations of different tools that if you're coming particularly from an ethereum environment you expect to be there uh to build but the and the third pillar is around being able to offer advanced functionality that comes from this like sub being part of polkadot and being based on substrate um so that includes features like on moonbeam itself you know we have a full like on-chain governance system uh we use that for like four-plus upgrades um you know we have a number of different kind of local advanced features that have been created and exposed into the evm on moonbeam but it also means access to all of the other specialized functions that other para chains are providing on polka dot so that includes you know things like
oracle services like uh identity services and there's a number of other power chains under development that would offer different kinds of services that can be made available to the evm environment on moonbeam and probably the thing i'm most excited about there is that there is a for an upcoming feature around called parathreads which allows developers to express logic in substrate without all of the kind of hoops that you normally have to jump through to launch a parachute so developers will be able to extend solidity-based smart contract functionality with like blockchain level substrate functionality and link it to their smart contracts on moonbeam so again these are all kind of supporting pillars of this uh of this idea of connected contracts uh that we that we are uh heavily focused on these
days and so um let me uh i'm gonna walk through some examples but before i walk through the examples i wanna talk a little bit about what the current state is of multi-chain deployments so that it becomes clear why the connected contracts approach you know so is better or solve some of the challenges that are present with the existing approaches and so i think it's it's the case particularly if you look in in d5 right now that almost like every project needs some form of multi-chain strategy right the days are kind of somewhat gone of just saying hey i'm going to just choose one chain and only deploy to that chain you know that you still find it from time to time and the strategy there would be okay i'm only going to have a
main net deployment i expect everyone to bridge like into that chain to just reach the smart my smart contracts i would say that's largely given way to the idea of what i call a multi-instance deployment so a multi-instance deployment is a deployment where you have basically often started on main net right you have some set of contracts there you take those contracts and you just deploy copies of them to each target chain you want to deploy to so you may have let's say a lending and borrowing protocol it's deployed on mainnet and they say you know what i'm going to take make a copy of that deployment on avalanche i'm going to make a copy of that deployment on polygon and so you have these you know new instances of the protocol on you know potentially many chains right i mean there's some protocols that are deploying let's say you know up
to 12 13 14 15 different like chains right especially evm compatible chains and so that's that's i would say kind of the state of the art right now for a strategy to get at assets and users that are being spread now across many chains right it's like this multi-instance approach let's bring the protocol to the users by making copies of it so the problem with this approach or the challenge is i would summarize it as one of fragmentation and so what do i mean by fragmentation what i mean is these deployments are all like independent of one another i mean they share the same branding so don't get me wrong you go to like one website sometimes to access them you'll have a selector right to select like what chain to go to but the actual smart contracts themselves are isolated
you know the the deployment on polygon knows nothing about the deployment on avalanche knows nothing about the deployment on on mainnet right these are all isolated like uh deployments so what that means is you get this fragmentation effect right so your users for one get fragmented uh but the the features get fragmented so often it's the case that the main net deployment is like the first class citizen it has a full feature set and then there's some subset of the features that are getting deployed on the target chains because sometimes there's like clashing or overlapping you know there's questions that come up like and we'll get to some of these later around for example governance right what does it mean to have governance happening on two chains at once well no let's just do that part on main net and then the satellite deployment only has
the minimal feature set but for d5 protocols in particular you have this liquidity fragmentation right so d5 protocols many of them work better when there's more deposits in them but when you're split across chains you know you're going to have deposits going into these different smart contracts on different chains and that creates fragmentation right the deposits on one chain can't necessarily be used like on the protocol instance on another chain so in general you have this fragmentation effect that's happening that's um you know it's definitely limiting in some sense even if you are able to get to the users and assets you know on in all these environments so um i talked before about uh this key unlock of of um general message passing or cross-chain messaging that's just come
to market largely uh this this year there's a couple examples that like came before but really i think a lot of the activities happened this year um you know the polkadot system system specifically uh is called xcm so that's like the the way that messages are natively passed between systems on on polka dot but as i was mentioning there's a number of other systems and we'll go through some examples here to give you a sense of the kinds of things that we're seeing so i'll start first with um an example of a this is deployed today and in production today on moonbeam so moonbeam for context you know we launched in january we're about a six month old chain there's been a lot of deployment activity a lot of bootstrapping activity in that time a lot of infrastructure and tools being deployed lido like is one protocol that has
deployed to moonbeam and so let me use this as an example of what i mean by connected contracts so for those of you that aren't familiar lido is a liquid staking protocol right so this is a protocol that is uh heavily used on ethereum where you can take a stake position represent it as like a liquid asset and then use that asset that represents a stake position in other d5 use cases very popular with users right because they kind of get this optionality of getting staking returns but then also being able to further deposit those assets you know in other places and so the lido team approached it some time ago and and they wanted to do a polkadot deployment
the problem is this right the problem is that within the polkadot ecosystem dot lives on the relay chain the relay chain does not have any smart contract functionality on it it only has staking functionality governance functionality it's a specialized chain that is acting as this kind of central hub within polka dot so the question was how is the lido team going to go about creating this like liquid staking you know this derivative input for dom and so the answer is that they've created a set of smart contracts on moonbeam these are solidity-based smart contracts they're already quite familiar with the implementation of these but we've exposed you know functions for them handlers that allow them to send xcm messages from the smart contracts on moonbeam to
the polkadot relay chain to control staking operations right so now you have this permissionless system where you have smart contracts on moonbeam that are almost you know doing this like remote reach out and performing these actions like on the on the polka dot relay chain and but the user doesn't really know that right so when the user is interacting with the lido deployment on on moonbeam uh for the st product uh they don't realize they're interacting with two different chains and so i you know this is a theme i'll come back to that i think there is like a key interesting thing here is that the app the lido deployment on moonbeam consists of multiple specialized chains working together to deliver a single user experience like back to the user and so this is a you know first example of something that's in production now
that's using a cross chain uh connected approach uh to create you know a better user experience or in this case you know to even create this this product they want to create it all as a decentralized protocol and so let me go to another example so this is an example of a protocol that's under development now to be released later this year but it also illustrates some of the concepts i've been talking about here so the protocol is called prime protocol it is a i think an over collateral over collateralized stable coin so think of something like maker but they're taking this cross chain connected approach so what does that mean so what that means is that on moonbeam they have kind of their their brain or
this kind of hub set of contracts and then on many other chains they have what i call a remote branch or kind of a satellite deployment of contracts on you know avalanche ethereum mainnet uh polygon and so on and the idea is that a user can deposit collateral into their protocol on any of those chains so let's say a user deposits collateral on avalanche they deposit avax on avalanche now here's the trick the asset does not move there's no bridging action there's no movement of the asset it's locked on avalanche but then a message is sent back to the brain saying this user deposited like this amount of asset on avalanche so now what you see is that the the the sent the brain set of contracts now starts to get visibility
of the deposits and credits that are happening across like all of the chains simultaneously it has this kind of cross chain visibility so what that means is that same user can now go to mainnet and they can you know leverage the deposit they made on avalanche so they can mint stable coins on mainnet and so this is like a key like unlock here where you have a multi-chain protocol users can interact with any you know any of the chains locally but like there's cross-chain awareness like in the system so now i can leverage the deposits from one chain to do something else in another chain i contrast it again with the current state of things right now if you had like uh you know something like make or like those deployed on each chain you would not be able to do this right you have an
isolated market on each chain and so this is a big like unlock and the theme from this is that you know i really believe that there's going to be more efficient protocols that are created that are going to be highly competitive with these older single chain style protocols using this connected contracts approach or using this ability to connect smart contracts between chains um so that i think this is a great example let me give another example that illustrates a different point so we have a collaboration with a number of people but like specifically let's talk about collaborations in the works with the team at osmosis so what they want to accomplish is you know and for those who aren't aware that's an app chain in the cosmos ecosystem
heavily focused on providing great user experiences the idea is that they want to offer users the ability to deposit dot into this protocol how would you do that you know if you didn't have some you know some special system well users would have to you know perform a bunch of bridging actions to get you know that asset over uh to osmosis to be able to deposit it so their goal is to create kind of a one-click deposit experience so how do they do that so the way it will work is that they'll be the user will be presented with a native dot deposit address they'll be able to send doc to that address and then what happens behind the scenes uh we'll detect that dot deposit it'll get forwarded to moonbeam as xc dot so that's using xcm to move the dot like
onto moonbeam where we have what we call xc assets you know then we'll forward that exe asset to uh axelr the axler is one of these new overlay like uh networks you know axillar will route that asset like across axillar to osmosis and then on the osmosis side it'll get lp like into the into the pool and so the point here is that to the user they're just getting what they kind of know and expect a native.deposit address behind the scenes there's like you know this seven eight different steps that are happening but the user doesn't need to know about those things so this is the thing this is like the second like big unlock in my mind around this connected contracts approach is you can hide like infrastructural complexity away from the user you know think about what the user would have to go through if they had to
go through all those steps you know manually there'd be like you know six or seven complicated like bridging or other infrastructure steps so now you've hidden all that away and the user gets like this very simple user experience so to me that's like a huge win and that's another kind of pattern of why this connected contracts approach is going to be adopted right it's people kind of trying to deliver superior user experiences um i'll give another example of a team we're working with at centrifuge so this is a another polka dot like parachain so this is an xcm example they have a very specialized system that's specialized around creating real-world assets tokenized versions of real-world assets uh there's a lot of things that you know that they're quite expert in in
managing that process you end up with an asset at the end but it carries with it like special requirements so there's certain like white lists and there's certain people that are allowed to interact with that asset and so the idea is you know in this polka dot spirit where if they're specializing creating this asset and they want to access then like markets and other opportunities exist on moonbeam so xcm will be used to transfer that asset but along with that will also come this idea of maintaining a set of a white list around this asset right so there's a set of like parties that are allowed to interact with this asset so those will be honored and maintained uh by moonbeam and they'll be like a constant updating of this list of the xcm but then you know users who are on that approved list will be able to you know
for example deposit like into uh something like moonwell which is one of the main lending and borrowing protocols on moonbeam so this is a kind of a polkadot native like example of the power of specializing into different functions and being able to uh being able to um you know get a whole is greater than some of its parts effect i'll give a fourth example here of uniswap so there is a uniswap v3 deployment that is in flight to moonbeam uh right now one of the main motivations uh for this is to use a kind of a connected contracts approach to help solve some challenges that they're they're having or that they're trying to address the challenge is that as they move multi-chain it goes back to this governance idea so as they move
multi-chain um the question is like how is the the multi-chain like like kind of multiverse of uniswap like managed from a governance perspective they have a long-standing tradition on mainnet of um you know of governing you know the mainnet deployment but what does that mean for the movie deployment or the polygon deployment or these other deployments and so the idea is that they plan to use uh nomads cross-chain messaging technology to basically consolidate all governance for the mult their multiverse like into the mainnet like system but then be able to effect change on any of the remote systems so let me play an example let's say that there's a governance decision to change the trading fee from 0.3 to 0.25 like
the swapping fee so in order to enact that they can enact it locally on mainnet but they can send like a cross chain message now out to all of their remote deployments to also affect that change and then there's no reliance on anyone in the middle to kind of do the will of the people right it's just built into the system itself that it will propagate these changes out and so this is like a big win right where there's not any confusion then around like where you go to govern the thing or if there's multiple domains it's very clear and simple that yes they're deployed on many chains but there's a single governance domain that manages the whole thing so that's a great example i think of a cross-chain connected use cases helping solve a real problem and so um yeah in general i think that i've spoken
about some of the themes that are coming out now i mean we're still early on in this there's still a lot of teams are developing applications but kind of the patterns and themes are starting to become clear to us and you know we at moonbeam are really trying to make a place that's optimized for these use cases we are looking at you know multiple other you know multiple features we can build into the blockchain layer itself to help support these kinds of use cases and so i think we have a you know a lot of exciting things are in the in the pipeline and i think i'll just end on this idea that i see i do see a lot of parallels between the evolution of how compute like um changed over time and blockchains and you know they say that thing that you know things rhyme with history they
don't like they don't mirror it but they rhyme with it and so in the compute you know you had initially this kind of vision of having shared computers so they were very expensive so you had like a single computer you had many people sharing a time sharing against it or like you know splitting the resources but then it moved to kind of dedicated machines right so maybe you had like your own in the context this would be your own chain right but longer term it's more of this cloud idea right where you have multiple different specialized services and then as a developer for example you can pick and choose between these different specialized services combine them into a single application and so that's the long game that that we see and we're playing for is to be a kind of connection point to kind of be something
that can help power this let's call it something that looks like aws that consists of all decentralized services instead and you know to be able to power this let's call it this kind of cloud-like blockchain environment that makes it easy for developers to build but also create scalability uh through the use of multiple specialized blockchains and so um yeah i think that's that's kind of what i wanted to share with you guys today um you know if anyone is definitely certainly if anyone's interested in building a cross-chain connected use case we're very interested in speaking with you um you know if you visit our website uh there's a lot of great developer documentation uh and other other things uh to help you get started we have a number of you know we have a few folks from our developer relations team are here in the audience um and uh
yeah we'd love to hear from hear from you and uh yeah i guess i'll see if there's any questions here at the end all right thanks everyone thanks [Applause]