Cross-Chain DAOs | Rafael Solari
Ethereum Denver·Wed, Oct 9, 2024, 12:00 AM
Educate users on the potential of Cross-chain DAOs with Flexible Voting and a message-passing bridge. Vote from any chain, propose from any chain. DAOs can make calls and control assets on any chain, without compromising the trustlessness of an onchain DAO. APPLICATIONS FOR ETHDenver 2024: #YearOfTheSpork ARE OPEN APPLY NOW https://ethdenver.com/apply
Transcript
[Music] good afternoon we're going to get started here thanks for coming wanted to talk to you all today about Dows and where they are and where they're going especially related to multi-chain Dows how all this new uh the scalability road map that is playing out how it affects uh Dows in particular and maybe also some generalizations of about how the multi-chain road map affects all kinds of applications you know not just Dows but what are the general takeaways we can learn from how Dows uh use the New Primitives enabled by multi-chain Tech and also the challenges that they face in um managing all this complexity from multi-chain use cases I can start by uh introducing myself I'm Raph co-founder at tally with which is a application that helps Dows manage all their onchain complexity so especially around proposals uh voting managing voting power launching a DA uh managing all the money often a DA is managing a protocol like uh ens or Unis swap or uh a rollup like arbitrum these Protocols are all run by Dows they the token to uh holders and the token voters directly control the protocol upgrades and and the treasury dispersements uh using smart contracts and frontends like tally and uh I want to maybe start by talking a little bit about the the tech layer of how these smart contracts work just because that'll be relevant for the rest of our uh talk the talk I think will cover both why like why um Dow might want to use multichain Tech and also how it works like what under the hood is happening at the Smart contract layer and at the UI level uh to build these multi-chain applications because they're still fairly new the scalability road map the the rollup Centric um e road map has only just started playing out over the past year or two and then once we have multiple chains we need Bridges and ways to move State and move value between those chains and once you have those Primitives only then can you start building applications like uh for example a DI application on top of the interoperability stuff but before we had many chains uh most apps were just on one chain and that was also true of Dow so these uh Dow this is a a standard uh set of Dow smart contracts that was popularized maybe four years ago starting in 2020 and has since become uh very standard setup for the way that uh onchain Dows work so they they have first a token contract which is a normal erc20 token with one extension which is the voting module so like in any normal token contract it keeps track of uh token balances you know which account has which token balance but also the voting extension keeps track of voting power which is an additional uh parameter on top of the token balance so rather than um Dow's using token balance for voting uh the token balance has to be activated if it wants to participate in the Dow by delegating the tokens voting power to either you know yourself you can delegate to yourself or you can delegate to somebody else who will maybe be more active or more involved or has some expertise and you want them to you trust them with your voting power they're going to vote on proposals they're going to use uh your token's voting power to do stuff in the Dow and the token contract handles both of those two things both um keeping track of everyone's balances and also keeping track of who's delegating to whom and how that affects voting power the second contract here is a governor contract and that is the contract most responsible for the uh the dowo operations so this Governor contract has rules for like what is a valid Dow proposal um it manages the life cycles of these proposals like when they go up for vote uh when the votes actually happen the governor contract counts the votes it determines if a vote passed or failed and um it keeps track of the the actual executable call data that a proposal um will execute if it passes so there a proposal as you as you may know um has two parts there's a human readable description which is logged on chain and also the machine readable part so a proposal generally does stuff it can execute any um call that a normal account on ethereum can execute a proposal can do that too which makes these Dows very generalizable and very powerful and then the last uh contract you see down here is the time lock contract which does two things uh one it's the account of the Dow this is the contract that's going to hold the balances of any assets the Dow has it's going to have all the permissions the Dow has you know if our Dow operates a defi protocol or a uh scalability protocol the the admin of that protocol is very likely to be this time lock contract that's how does like Unis swap or compound work and and um together we have these three contracts that you know each have their own responsibility and they do separate things but they are pretty composable pretty modular pretty standard and there's lots of interfaces such as tally that play nice with a standard like this so you can um launch a standard Dow with contracts like this and then use it on multiple different front ends because of the the widely adopted standard but remember this is only single chain um this was designed this pattern was designed about 4 years ago ago when the interoperability road map had not started sorry the scalability road map had not started to play out um but there were these successful protocols run by big Dows like Unis swap like a like compounds and the protocols needed to start going multi-chain un Unis swap needed to deploy um their their pools and their pool factories on not just ethereum but but polygon and optimism and many other chains and same story for The Landing markets like a and compound um but they already had their Dow anchored in in one place and they had to solve this problem of like who updates the um risk parameters of a on polygon who uh how do we set the fees for the Unos swap pools on optimism especially since they had already promised that there was a token on ethereum and that that token would govern the protocol they had to figure out a way to govern the protocol which now exist existed on many chains from their da which was only on one chain and luckily that wasn't that hard um because we had these very generalizable Primitives that the the governor contract could make proposals that just call any function in ethereum they could call functions like pass a message across a bridge they would so they would governance would make a proposal to pass a message across a bridge to some other chain you know they would send a message to Unis swap on arbitrum and they could change the the fee tiers or change the fees for the unof protocol running on a totally different chain than the Unis swap Dow so this is what I would say is like the first um Step the phase one of multi-chain dows and and this has been happening uh four years A's first cross-chain governance proposal is this headline here from maybe it's too small to read but from February of 2022 so this was already a couple years ago Dows existed as multi-chain organizations and uh Unis swap last year did a lot of work to figure out what Bridges were the right ones for the different types of unisoft deployments they've done a lot of thinking about how to um safely and sustainably scale the the unof protocol across many different chains and luckily they had a pretty clear technical path to implementing that they just needed to start making calls across Bridges it didn't require any big smart contract changes um there was a pretty modular composable way to do that from existing building blocks that worked the the existing Dow contracts the existing Bridge contracts and there were certainly ux challenges the fact that you had a uh uh protocol across many chains and that were making these calls across Bridges there were just a lot more states that a transaction could be in you know it could be not yet sent it could be in Flight it could get lost on the bridge it could be confirmed on the other side of the bridge or it could have failed there could be an error on the other side of the bridge so there's a lot of um uh a lot more cases to worry about but those were fundamentally challenges that were solvable with better ux um better polish better error handling not a huge uh uh change to the security surface or or to the smart contracts uh but that was not fully that system which has been working for years um and this is a kind of a the contract picture of of how the existing St contracts we saw in the first slide just plugged in some bridges on the bottom and now they can govern a protocol on many different chains uh but this doesn't fully take advantage of all of the new stuff that's possible with multi mple chains Each of which have different parameters and uh different trade-offs there's lots more reasons we might want to go multi-chain after we've taken our protocol M multichain we may want to think about how we might take our Dow multichain um we talked about in this uh uh at the beginning about we might be pulled there right we our protocol is moving to different chains we want to govern it wherever it may be and that was the first part of the that went multi chain is is sending these calls but now that um the lots of different networks all over the place have different tradeoffs there are lots of good reasons to pull start pulling apart those three contracts we saw the token the governor the time lock we can start pulling piece of pieces of those to the chain where it makes the most sense to put them you based on whatever tradeoffs that we have here so for example gas is a lot cheaper if you're not on ethereum Main net but you're on a rollup or even a a layer three someplace with very cheap gas and voting on chain does get expensive especially on Main net as main net gets more congested um so we've seen that be a big draw for Dows to start thinking about how they can navigate a kind of security and scalability trade-off these these rollups especially with um uh different avity strategies can have very cheap transactions but we might not want to put the root of our Dow contracts there maybe we want the root of our Dow contracts on someone someplace very secure like layer one ethereum and then the the cheaper things like voting could move somewhere cheap uh somewhere more scalable somewhere much cheaper and then we can Bridge the results back to the rest of our Dow on layer one so this is I think a pretty generalizable pattern for all application Developers now that um we've got a whole menu of different um chains with different security and cost trade-offs are choose from so as our applications get richer and um our use cases expand we're probably going to need to pick and choose between whether we want some actions to live on expensive and secure chains and other actions to live on cheaper chains that maybe make different security trade-offs and then there's also plenty of go to market reasons while you might want to be on many different chains uh for acquiring users it's a lot easier to meet users where they are if they already have a wallet installed on a new network they already have gas in their wallet on that Network they already want to do something composable right there why they want to do some swaps or um buy a name or use a bridge your your protocol and your uh Dow will have an easier time if it meets them there where they already are then trying to convince them to migrate their State uh add a new network to their wallet and go get gas in some new chain so it's just a lot more convenient for users to meet them where they are and the nice thing about having a multi-chain dow is you can do that you can just be in the same chain the same network that a user already is whether that's for ease of use or sometimes it's also for alignment some uh there are lots of very large um ecosystems and communities that are very excited about particular networks or particular rollups or particular um layer 3es and if you're starting a new project or you're a project going to Market on a new chain being able to be aligned with the ecosystem that that you're trying to build on is a very powerful go to market tailwind and um the fact that that that a dow can now be multi-chain makes it a lot easier for these projects to um go figure out the best place for them to grow and not be tied to the chain that they started on and not be tied to one chain right they can expand across lots of different ecosystems with lots of different uh activity and people doing interesting things so that's the reason why we might want to go multi-chain and then I wanted to also talk a little bit about how we do that what is happening under the hood uh what does what do the SMART contracts look like and what do the UI look like to actually get there so to start wanted to talk about how the token contract goes cross chain and then we can break it out and talk through the other parts uh the the governance contracts and eventually we'll tie it all together so the first thing we have to do is if we're going to have a cross chain Dow we have to have uh voting power and tokens on the different networks that we want our Dow to uh to support so the uh The Hub token the way we're going to do that is with a hub and spoke model so we'll have two let's start with two chains and we could generalize it to more than two chains later um but there's two chains in this simple Example The Hub chain is um where the main token lives and then the spoke chain or or in some cases multiple spoke chains are where where users can bridge that token and um tools like Wormhole can make that bridging very easy and very seamless like they have great native um uh tooling for bridge tokens to live on the other chain and seem like uh a a regular erc20 token to the users when they hold it on that chain and the way that works in our Dow example is the Hub token is a normal um Dow governance token it just has one upgrade which we'll talk about in a second that lets us lock the tokens in a bridge and then you know they appear on this spoke chain and uh on this spoke chain lots of people can have balances and they don't have to worry too much about what's happening on the Hub chain and and similarly The Hub chain doesn't have to worry about what's happening on the spok Chain it just knows that there's some tokens locked in a bridge over there there's something happening and it's all good and because there's a governance token we also have to on both chains keep track of the voting power but we don't need a global view of the voting power each Hub or spoke can keep track of its own uh voting power and its own delegations and that that that secret sauce that module that we can use is called flexible voting it's an extension to erc20 uh governance tokens that was built by scop lift a team that's built a lot of the smart contract uh tooling for governance and that lets us uh vote on a Spoke chain and then aggregate those votes maybe every single vote we could send back to the hub chain or it would be a lot cheaper if we didn't send them back one by one but we batched them up and send them all back together as a voting total to the hub chain and that's the um that's that's how we can split up that's the interface boundary between uh voting on a spoke and voting on a hub so the the the the next thing we have to move to our other chain is the the governance itself so the Hub Governor can actually remain the same as long as it has this flexible voting module um all it has to do is know that um some of some of the Hub Governor's tokens are locked in a uh a bridge contract on the Hub Network and that sometimes messages will come across a message passing bridge that say here's some votes you know 10 votes yes and and 100 votes no happened uh with the locked tokens and the Hub Governor just updates its voting tally whenever it gets a new message and uh that's the the version with two networks but it also generalizes we could have many networks so you could have a a single Hub and a bunch of different Bridges and on each at the other end of each Bridge you have a bunch of different spokes rather one spoke on each on the end of each Bridge and we can get a lot of coverage this way we can take these pretty simple Primitives that are that are battle tested and wellknown we add some small extensions and then now we can slowly generalize a small simple working system to a larger and larger more complex working system that lets us solve for the problem of how do we take our da multi chain so to review once we put these pieces together what can we do what what user benefit or di benefit is there to adding some new complexity adding some new tools and bells and whistles well like we could do before we can still govern a protocol on multiple networks um but importantly we can take a dow that's on a single chain that's may be pretty expensive we can give the users the option to move their tokens to a cheaper chain and vote there save a lot of money and importantly we can also uh expand our token to a new network so maybe a DA want to generate tokens for some incentive program on a new network where users are using their protocol they can do that with this setup and they can even do that on day one if you have some protocol that's used um or some application that you want to be used across many different networks you can launch to that launch a token either the Hub token or the bridge token all over the place on many different networks um so that was hopefully a uh a comprehensive overview of at a high level how all these pieces work and how they all fit together but I'm happy to answer any more questions if you have them you could shoot me an email and I also wanted to share some docs uh put together by scop lift about flexible voting and by Wormhole about the token Bridge docks and the relayer um tools that they have built that powered this whole system so I think it's a great example of pulling together different uh different small Primitives that are composable to build an application that both solves users problems and solves business problems um and Hope also in is an example of the kinds of things that we can build with um multi-chain tooling to build multi-chain applications so that's all I had for you today uh thanks for listening and happy to answer any questions after the talk if you have
Automatic transcript — names and jargon may be misspelled.