Intro to Zodiac
ETHGlobal·Sat, Oct 9, 2021, 12:00 AM
Join Auryn Macmillan for a talk on Zodiac, at the Governance & DAOs Summit, part of ETHOnline 2021, a month-long virtual hackathon with over 1,000 engineers, designers, and creators building new protocols, learning at summits and workshops, and gaining valuable feedback from ecosystem professionals along the way. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal Check us out: https://ethglobal.com Email us at: hello@ethglobal.com
Transcript
[Music] [Applause] [Music] um and for this next talk i want to welcome oren who is going to be talking about zodiac zodiac is a project that just came out a couple weeks ago and i'm super excited for him to share everything at zodiac so without further ado let's welcome lauren and uh feel free to get started [Music] looks like we're not getting audio we'll blame the bluetooth in the meantime for this but uh all right testing here we go two three oh nothing loud and clear no where were you good i should be coming through it looks like it is on my head you are you are this is good testing testing yeah we can hear you okay so it looks like this is a zoom issue because uh we both can hear each other but there might be a lag so warren um we can hear you the audio is coming in if this message reaches you all right i can hear you now sorry about the the issues we got it started in the green room but evidently whatever happened in the green room didn't carry over so anyway hey guys i'm lauren uh i've been working and playing in the ethereum and kind of downspace since ethereum genesis i'm a validity developer and product manager and currently lead uh kind of dow related efforts over hypnosis um nosotros has been a key contributor to the exam space since 2017 providing a range of kind of critical infrastructure pieces pieces to the ecosystem and perhaps the most notable of these is their notice safe secure multi-signature smart contract wallet and it's a company of sweeteners applications and integrations for i guess the uninitiated which is probably not many of you at this particular talk um a multi-stick wallet is essentially an account that requires confirmations from a threshold of keys say three or five before it'll execute a transaction um and the nurse's safe is that the most trusted multi-sig solution in the ethereum ecosystem currently securing uh more than 90 billion in assets uh over the kind of ethereum and these ecosystem but under the hood the noses safe is much more than just a multisig it's a modular extensible programmable account that can kind of grow and adapt with your organization so a little backstory late last year we did kind of a wholesale review of the dow tooling available uh kind of in the ethereum ecosystem in the lead up to launching the gnosis down which will ultimately control a really sizable treasury around 150 000 ether worth roughly 400 million us dollars along with a whole bunch of other tokens um so in choosing a dell solution we had a small handful of really key requirements one is it it must be audited must be proven to secure millions or billions of dollars to participants must not be sort of uh cost prohibitively uh excluded from from participating um number three it must be kind of permissionless and ideally kind of trust minimize and then four it must be flexible and not going to unnecessarily restrict future decision and so after reviewing each of the existing data tools we found that none of them can could reasonably check all of those boxes uh almost none were proven to secure that amount of value those that were were kind of cost prohibitive for most end users because voting was happening on ethereum mainnet and those that were not cost prohibitive introduced some unacceptable long-term trust assumptions and almost all introduced significant switching costs at the dollar for it to migrate or kind of change how it works later on so just another quick back story in response to the kind of escalating gas prices on mainnet in around august last year a whole bunch of kind of aspiring dowels made a compromise on trust for the sake of usability and started adopting this combination of a gnosis safe and a snapshot instance the previous speakers i talked about this a little bit and so snapshot is a tool for gas free off chain loading and basically in the combination of this setup uh you would have a group of multi-sig signers that essentially agree to execute the will of the community or whatever the community kind of decides to be a snapshot proposal but you're obviously trusting this core group and so this uh recognizing this pattern we we realized that there's an opportunity to kind of improve on it improve the trust assumptions on uh on this and essentially try to give the community more autonomy and so we created this uh module called module to the nurses that at the time we were following the dial module we now relabel to the reality module and basically what it does is use an oracle to bring the results of a snapshot uh vote this national proposal on chain and allow you to kind of autonomously uh permissionlessly execute the results of an off-chain proposal on chain um and so this was the the framework that we decided to go for with the gnosis down because it's in our opinion kind of checked all of these boxes that we had previously uh set as our requirements but in designing this we realized that uh this pattern could be generalized and actually created a bunch of really nice uh features or outcomes for uh our dial but also for the dow space as a whole and so this is uh this is essentially how our zodiac was born um let me go and share my screen uh not that there's much in the way of content there but it's uh we can just have a bit of a backdrop for it um so zodiac is uh we're calling the sort of expansion pack for doubts right and basically what zodiac does um is makes us really uh fundamental distinction between the uh accounts and the logic that controls it and tries to decouple those two so in every kind of existing dell framework right now those two things are pretty uh pretty tightly coupled either kind of within the same contract project or uh you know multiple contracts but in a system that that tightly couples them and makes it really difficult to to migrate then to to kind of yeah i guess change things beyond the the kind of initial scope of that uh or change things kind of outside the scope of the framework and so what we have done here is basically decouple those two things use the nurse's safe as again this kind of programmable account standard as an entry that essentially is your organization's avatar and chain then plug in as a module any uh any additional logic that you want to use to control it and so this is essentially what zodiac is there's this kind of design design philosophy and kind of standard for building organizations building building kind of data structures that inherit this nice property of being kind of flexible portable composable and allowing organizations to be uh to kind of leverage those um so essentially zodiac has a handful of components uh avatars which are your the core of your organization uh in this case we're using the gnosis safe and essentially any any contract that exposes this i avatar interface can work basically you need to be able to enable modules and then call an exact module transaction function if uh your kind of account can do that then it can act as an avatar modules are contracts that are enabled by the avatar and then implement some decision decision-making logic and when i say contracts i guess actually it could be anything it could be an aoa as well but it's it's some address that can basically call that function so you could enable uh an era like a there's someone a metamock account as a module and just give them total control of the safe but more than likely you would want to create a scenario where you actually have uh some logic there so this is going to be in most cases a contract and that's going to implement some watching so a module can be literally anything that can uh call the exec module uh transaction function and so that could be one of the modules that we've built but it could also be any of the existing dial frameworks and so this is what we say when we're talking about kind of enabling portability and composability essentially with this uh pattern what you're able to do is set up a nurse's safe and then control it with any of the existing dial frameworks so say you uh say you're an organization and you you want to start out with an error now then you go and deploy well i guess maybe we'll do two kind of hypothetical examples here one way you just deploy your aragon down and you use that account to control all of your assets um control your systems and kind of references externally say then six months down the road you say hey aragon's not working for us for whatever reason let's migrate over to a molecule and our house so now you have this kind of monumental coordination challenge right to move from uh to move all of the assets that the dell controls to all the systems that it controls they update to the owner uh transfer ownership function and any kind of modable systems and then also to move uh any external references to your uh aragondale's account now to your your new molochdale account um and so that kind of monumental coordination effort in the context of adele that probably has to put through proposals where people vote and all that kind of stuff uh is this is that monumental it's a painful coordination challenge um if you imagine the same scenario in adele that has i guess a little bit more foresight and says okay we're going to set up a notice of safest call we're going to enable our uh aragon dao as a module to the nurse's state so aragon dao now has kind of unilateral control over the nose and safe and then same thing six months down the road they say hey we're going to you know we would like to switch over to molok for whatever reason uh it's literally one proposal with one transaction to enable the monitor as a as a much also safe and disable the arizona dial and so that monumental coordination challenge uh now uh is drastically reduced simply because you've decoupled your account and your control so yeah anyway so modules are these uh addresses accounts that uh control the uh the safe modifiers uh uh contracts that you would sit basically between a module and an account a module on an avatar to modify what it does and so simple examples of that would be things like a time delay or potentially something to scope out the functionality that a module can interact with and then guards are another concept here where you can do basically implement pre-checks and post checks on execution so you can do things again like limit the scope of the addresses and functions that that the state is allowed to interact with um or that the modular guest is allowed to to sort of send transactions to the safe to interact with and also prohibit things or kind of limit things like um like whether it can be delegate calls uh what functions it can interact with potentially things like uh pass out and limit what types of parameters it's allowed to pass and also uh in post checks do things like make sure that certain state hasn't changed so really with these kind of four four kind of basic pieces you create a really flexible uh and composable framework and to to build dials on and to leverage all of the existing tools in the space in a really composable way and so for the rest of the talk here i really just want to take a quick dive through one of our modules to kind of show you how it works if you're wanting to build your own modules you'll essentially just add the zodiac library into your module repo and then import the module contract into your contract or the module kind of abstract into your contract and i'm going to jump over and we'll take a look through the exit module so exit is one of the modules that we built and what this does is essentially replicates uh closely rage quit function so this gives you the ability to claim a a portion of the safe erc20 and native token assets in exchange for some token that the dow designates so it has a designated token and you can redeem it for a share of the safe assets so basically to build out this module we've imported our module contracts here and then uh there's a few functions that we basically need to overwrite or kind of write our own implementations of so here we have a setup function this is leveraging the module factory that we created and so this is just really just so that we can um allow anyone to create easily create uh proxy implementations of their um oh sorry deploy proxies pointing to their uh their modules um and so the the reason for that is to reduce the deployment costs for end users um and and it also then gives us a nice quality of making it a bit easier to track in things like a subgraph but here we've got a kind of standard implementation of this you'll override it and and basically just pass in some variables that get then decoded by the setup function um the main piece that you need to essentially do for your module is at some point uh you will call an exact function let's see if we can find it um so here we go an exact function and so this is this uh exact function is essentially what you'll see over in the module contract um let's jump into you know with me all right so we've got our exact function here and this is what uh your um your whatever the kind of logic is in your module that's going to eventually trigger the safety to do something this is what it will cost so you'll pass it a two valve a two a value and uh a uh data parameter as well as an operation and essentially two is just the address obviously that you want safe to call value as your ether value data is your um your api encoded input um so essentially kind of telling the the safe what it should do and then operation is whether it's a call or a delegate call so back over to here where essentially for our exit function um up here we um a few different places they're going to call we're basically going to build this um this uh exact function here for in this case uh transferring a bunch of erc20 tokens so we built out this uh we got this exact function um call to then uh trigger the execution in the safe to give us uh our share of the erc20 token in this case here we we drop in some designated tokens um as a parameter so amount to redeem of your designated tokens and then you pass in an array of tokens that you want to claim and essentially then the exit function is just going to go through check that you have the right amount of tokens check the circulating supply transfer the tokens from you to the uh to the avatar and then it's going to transfer transfer you your share of the safe negative assets and then go through and basically iterate through this uh this loop to transfer you your share of any one of the tokens that you passed in to the array once it's done that it's gonna uh emit a successful exit event and you're good to go um the the point of all this being that um with our uh with this kind of module dot sol that you are importing you get to essentially skim over having to implement a bunch of the the logic for actually kind of creating a module and being able to manage it and focus just on the functionality that you want in your module just on a limited piece of control and the reason i chose to show the the exit module here is just to illustrate that a module doesn't have to be a fully fledged governance framework it can be something that implements a really specific piece of logic so in this case it implements just the equivalent of the kind of range grid function and molec just the ability to to redeem a designated token for a share of um for a share of the safes assets and then you can essentially mix and match all of these little modular pieces to build out uh any combination of functionality and build out essentially the dao framework that that best suits your organization and so that might be uh you know say a compound dominance uh dao in combination with an exit module uh or something like that you know if you wanted to to use an existing very robust governance framework but add this one piece of functionality that it doesn't have uh or it might be that you go and kind of piece together a bunch of individual pieces maybe use a reality module connect it up to uh connect it up to snapshots without with our safe snap plug-in and then maybe go and add things like the uh allowances module to give a few people some spending limits and things like that to really kind of be modular uh and i guess composable so the reason that uh i guess we wanted to talk about this here this week was really just that this is zodiac kind of represents a shift in how we and hopefully how others will start to think about constructing doubt so for anyone that's thinking about spinning up a dow adopting this pattern essentially gives you the the most possible kind of future flexibility without having to go through these again monumental coordination challenges to uh migrate from one framework to another or kind of enable functionality after the fact the other thing that this uh this setup kind of enables fairly uniquely is the idea of kind of cross chain uh dials interdimensional dowels what uh what that's going to do is essentially allow you to have a dow deployed on one execution environment control a safe on another execution environment and potentially control multiple safes across multiple execution environments so you could do something like have a molecule uh deployed to x-di and control that uh or have that that uh molecular control and that's the safer and mainnet and then also potentially control one on polygon and one on other tremendous modern optimism uh essentially creating this this kind of constellation of nurse's sex uh and this is obviously the thing that gave us the idea for calling zodiac was essentially starting to think about doubters these constellations of uh contracts of systems of people or communities uh you know in in a much more i guess again composable way but yeah this idea of this kind of inter-dimensional cross-chain uh dells is one of the really key features that this uh this new pattern of designing dells really enables and it's one of the things that we're really excited to to help facilitate as this uh kind of uh sidechain and layer two ecosystem continues to evolve and flourish so i guess i'll wrap it up there so anyone that wants to to check out zodiac more uh jump onto twitter follow uh nurses at nosy's guild uh jump into the the gnosis discord server at chat.nurses.io you can always find me at warren underscore macmillan on twitter and uh yeah look forward to i guess seeing what people come up with uh what different uh modules people uh start building on this and if you have any questions then yeah feel free to lean on us as a resource uh there's also a link to the nurse's guild discord server on the necessary twitter account so feel free to jump in there and happy to ask answer any questions if there's any that have come through from the audience well that was really awesome and uh thanks for doing that even walking through the code base uh it's always risky to do live demos but uh this worked out um no questions around what the modules or sort of how zodia can set up but i do have a couple questions around uh maybe just at a period of curiosity what are some um things on your wish list as much as they would like to say you obviously talked about the rage quit one but like can you just walk us through a handful of things that are possible or things that you would like to see or just get uniquely enabled with zodiac yeah so i think um probably the earliest thing on the wish list that they would love to see some kind of native integrations into some of the existing dial frameworks so the the dao house guys have jumped in really early to do that for dow house so you can already spin up a safe minion for moloch dials on dow house and that allows uh now your your dao house house to really easily control and those are safe um so i'd love to see the same kind of pattern happen for each of the other dell frameworks you know a an aragon gap uh aragon application a colony uh extension uh a dow stack schema uh and then the same thing for like compound and tally and stuff like that i think that would be a really great first step um some of the other things on the wish list are additional uh kind of voting types proposal types of novel novel ways of of reaching consensus um we are looking into doing things like zero knowledge voting with uh macy's and so um you know anyone that's interested in that then then please jump in and uh come and help us build it help us make it a reality um we we have a really cool uh proposal framework called dealer that was uh built by a community member who is now a part of the the nursing school team and so we're going to be looking to extend that out like make all kinds of different uh adapters for different voting types on that um a couple of these different types like what's your knowledge like one of the examples or what are some other ways yeah so i mean things like um like as of right now is the the adapters have been built i think like a quadratic voting option uh a linear voting option uh like any rc20 balance all type thing um so you can imagine the same kind of flexibility in uh villa as as you have for strategies in something like snapshot where it's really it's up to you to kind of design a strategy or pick one of the existing strategies but there's unlimited flexibility in terms of what uh what the voting types could be for that um another another thing that i'd love to see is uh more uh kind of oracle types than just uh the reality.ed record we have currently so we built that out as our first kind of uh foray into this um into this kind of pattern of designing things and we're going to generalize uh probably using delay uh generalize how the reality module works and so we can imagine also uh similar similar kind of adapters for other oracles you could imagine one for chain link or one uh api three or literally uh any other kind of oracle framework just for bringing kind of uh decision making from uh off chain or from other other chains that you know maybe don't have a reliable bridge or something like that uh so i could see that being really useful uh and then i think the the other thing that i'm really excited to dive further into is more uh a variety of kind of bridging technologies so the the version of our kind of bridge module right now that allows you to do things like controller a safe and mainnet with a dow on x die leverages uh xda's arbitrary message bridge or in the case of polygon leverages that data tunnel but i would really love to see some some exploration into other bridging mechanisms so like cellos uh optics if you need to uh to leverage um i'd love to see things like uh neo's rainbow bridge uh leveraging that um so any chance that we can basically get to uh extend the reach of a data point on onenet network uh one one kind of execution environment out to and out to the stars you know outsource to all the other execution environments so there's other fun stuff happening that makes a lot of sense um but maybe maybe it's just my uh not good uh understanding but how how does the bridging work in this case uh if it's cross chain or or even l2 yes i mean that's dependent obviously on the bridge that you're uh that you're going through let's just use polygon as an example yeah so the the polygon uh bridge i'm actually not as familiar with um i can talk pretty concretely about uh x dives a amp and so that essentially is is a uh it's a multi-stage of spots where you essentially have a set of uh bridge oracles and you call function which is like request pass message on the xsi side uh those bridge oracles then sign that message and then anyone can take that signed message once it passes some threshold of signers and executed on the other side of the bridge um the the contract on the other side of the bridge has logic to basically validate that the signatures that you pass through are valid and if if uh if they're valid then it will it'll reach out to whatever contract it's meant to be reaching out to and then our bridge module essentially is uh is going to receive that message validate that it came from the right address and then from the right bridge contract that the chain id is correct that the uh equivalent of message.sender on the other end is correct uh and if it passes all those checks then it will let the execution pass through to the safe and so i'd like to see that kind of generalized to a whole bunch of different bridge types so that organizations can one kind of extend their reach to other networks and then to kind choose their trust assumptions you know choose which which set of validators in the case of these kind of more trusted bridges they they accept or what kind of uh cost or kind of time trade-offs they they need to accept in order to get this kind of cross-chain execution got it and maybe one other question and i feel like this may be a stupid question from my end but uh could you clarify the difference between a difference like is there a nuance between who can write these modules and and deploy them because does this mean anything that you want to think about or you talked about on your wish list has to be adopted and agreed to by that dao community or does that mean anybody can say hey i'm going to add this attachment but uh i don't necessarily need this to be part of the main dow's decision or progress right so i mean anyone can can write and deploy a module obviously but for it to pass uh past a kind of execution root student safe that safe has to enable it as a module so there's a there's a function call on the safe side that is enable module and once you enable the module the module gets unilateral control of the safe and so adele needs to be really selective about what it's uh what it enables as a module you know if you just enable someone's doa address then they just they now own the dow uh so yeah need to be very careful about that uh one other thing that i wasn't um wasn't very explicit about is that the modules uh they gained kind of unilateral control and so you can once you've kind of enabled that control mechanism you can get rid of all of the multi c cyano and so we see this as kind of a progressive decentralization part though right you start out as a notice safe as a kind of a multi-sig and then you know maybe you add something like snapshot to give you a community kind of a voice but no direct control then you know a step three might be to add something like our reality module and the snap plugin to now give the uh the community more uh permissionless control over the safe they now can execute things without the multi-stick side as having to do anything the multi-six designers are still there they can both kind of control things in parallel um and so now maybe your next step in uh progressive decentralization is to scope what the multi-sig scientists can do maybe you say we only want them to be there as a backstop we only want them to be there to uh to be able to stop malicious transactions so we're going to scope themselves only being able to call the marked is invalid or my proposal is invalid function on on the reality module uh anything else they do is just going to fail but they're allowed to call that and so now if a malicious transaction happens to make its way through the snapshot votes and through the oracle then we've still got them there as a backup and then last step would just be to go no hands uh get rid of the multiseek finance all together and just let the uh let the community kind of totally own things and the thing that we really like about this is that it it is a lot more comfortable for many organizations to take those kind of baby steps towards decentralization than just going from zero to one you know from just going from hey this is our baby this is the thing that we built you guys have it now and do your thing um so that's um yeah it is one of the reasons that we that we really like this uh this kind of framework is that we can uh very much enable you to take the the smallest little increments that you're comfortable with to get your project from from being controlled by a small group of people to now being controlled by your your community into now really being kind of a doubt awesome well i think that's a that's a whole new set of uh possibilities now kind of i i kind of do like the i think the pitch you have for the launch it is an expansion pack and you want to think of it as like a whole big video game and uh you can kind of add in customers all these modules so this is really cool um and a couple of already asked how do we learn more about it i people will send the link to the blog so please check that out is there any other way people can follow what's happening with the project or is that the best way yeah yeah i mean i keep uh keep an eye on the blog obviously if someone's already said a link there uh otherwise uh not so skilled on twitter uh it's just at nurses guild on twitter is another great place to keep in touch and sort of that then yeah jump into the um the nurse's guild discord or the nurses discord and uh and yeah we're we're available most of the time and happy to have you answer questions happy to help people uh through getting set up or if you're trying to build uh your own modules or plug into existing modules yeah helping happy days to help wherever we can amazing well i hope everybody is so satisfied with that answer uh paying foreign in 50 different places until the response yeah yeah it's very strange yourself and then i guess like my uh my ass for anyone listening is just if you are thinking about a dow or about setting one off if if a project that you're working with just think about setting one up then uh explore this pattern uh as a as a way of essentially future proofing your doubt you know allowing your doubts to kind of grow and adapt where it needs to um this is probably the biggest challenge that we have now is just encouraging people to kind of explore and start using this as a pattern because it's it is new and it's uh it's not the prettiest user experience yet we're working on that uh but it will pay dividends in the long run absolutely and i think uh this is also a pretty good segue to what we'll actually cover next in the talk in general because that's exactly the the topic which is how do we manage as a scale and mostly from the point of view of like what are the things that we think are just not good right now and things that we can improve but uh the way zodiac is starting off with like an expansion pack and a more plug-in based model i think this is super cool so thanks so much again and uh really appreciate you uh doing this talk today yeah cheers thanks for having me [Music] [Applause] [Music] you
Automatic transcript — names and jargon may be misspelled.