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

Loading player…

DELV 🛠️ Deploy a DAO in 30 Minutes with Council - Danny Delott, Ryan Goree

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Danny Delott and Ryan Goree from DELV for a workshop titled "Deploy a DAO in 30 Minutes with Council". Welcome to back to ETHGlobal Waterloo, where it all began! Returning to Canada's tech hub, we're thrilled to bring together international enthusiasts and local talent for an unforgettable hackathon experience. This year we had 650+ attendees from 29 different countries and 47% were new to Web3! We concluded the weekend with 168 projects submitted and gave away $250,000+ in prizes ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Music] hey guys let's get started so uh we're really excited to show you our new framework called Council it's for deploying Dows and a complete toolkit on top of that which we'll get into if you're not familiar with Dows that's okay we're going to get into that a little bit but first let me just introduce who's talking to you so I'm Ryan Gorey I'm head of engineering at delve we're research and engineering company who builds D5 protocols and tools and with me I've got Danny who is our front end lead and then I've also got Geo who does Business Development and community at Dell uh so yeah we're going to talk a little bit about what council is what we built and why it's important uh and then we're actually going to deploy contracts configure and run the UI and create proposals this seems like a lot to do in 30 minutes but we have tools that are going to make this really streamlined and really easy so uh we're pretty excited to show it off after that of course we've got prizes we hope that you all will build on us and we'd love to work with you all on that uh so to get started I'm going to hand it off to Danny and he's going to tell you a little bit about Council thanks Ryan um so decentralized governance uh just out of curiosity how many of you have ever participated in a Dao or voted on a proposal or any of the type thing awesome so um as you know this is a this is a big topic um and we don't have time to discuss everything about decentralized governance but I do want to point out sort of two ideas maybe plant two seeds to your head on white Council uh is maybe a little bit different than what you're used to the first one is uh is that first bullet point you see see there it's the flexible definition of voting power so many of us have probably seen like a one token one vote type of model maybe if you're in a smaller group you've got you know a snapshot poll and then a multi-sig that actually executes the proposal for Council we want to build this kind of for the future so maybe one token one vote doesn't make it to you know be the actual perfect way to uh to to structure a Dao so we want to build that into uh into our protocol so we'll see this in a minute but the the the component I want to like put into your brain right now is that voting vaults is the way we accomplish this it's a very flexible way to define boating power on your own terms so that could be you know nft ownership it could be one token one vote uh if you're a fan of another Dao that does things similar to you you could even adopt their token as your voting token uh it's entirely up to you so your creativity is uh and Imagination is kind of the the limit there and then the other big piece I want to just point out is the trustless execution so if you're in a small group maybe you have a snapshot poll which is like a sentiment on chain pull but then you're trusting a multi-sig like a three of five or a five of seven to actually Implement and execute that and that can be you know hard to do at scale so with Council you'll goal you'll be able to vote on proposals but it's also the execution of those proposals that can happen trustlessly so anyone can be the one to actually hit the button to execute that proposal so that's that's kind of the the two big differentiators I wanted to mention um definitely come by our booth and and nerd out with us about governance we got a lot of uh really really interesting thoughts about it so the next thing I want to just point out real quick before I hand it back to Ryan to get back into the meat of the the workshop here is we've got sort of two main components we've got the core voting contract and this is where your proposal is going to be created this where you're going to vote and then the other piece which I just mentioned uh is going to be the voting vaults and simply put these are just smart contracts that have a single query vote power method on it and you can Define the body of that method however you want again it could be based on your balance of tokens it could be based on your nft ownership you know any any any any way you want to structure that so you would call query vote power pass it the address that you want to you know how much vote voting power does this wallet have does this contract have um and you get back that number and that's that's the extent of it um Council has a bunch of other plug-and-play features that we invite you to read our docs and today we're going to go into that last one more specifically which is the Locking Vault so that kind of represents that one token one excuse me one token one vote uh concept so we'll get into that today and as Ryan mentioned uh we do kind of consider the council protocol as sort of a full stack solution for governance so that's not just the contracts but a reference UI a typescript SDK if you want to get scripty and then we have this CLI that you'll uh you'll see today where we can deploy contracts and even interact with them uh on the command line so um with that said I'm going to hand it back to you Ryan uh so yeah let's get into demos so the council kit today is just a mono repo basically and if you haven't worked in a monorepo before uh it's just a single repo that has multiple packages and apps within it uh and so you can find that on our GitHub or delftec Council kits and then you can Fork that like any other GitHub repo and start using any of those tools that we talked about the CLI SDK and the UI which you'll find in the app there so I've got that cloned down already and what I'm going to do is the first thing I'm going to do is deploy some contracts we need a place to deploy that so we need to spin up a localhost network so that we can just test around um if you want to spin up a node we can we can do that with the CLI as well and then within a work a mono repo you're going to start with yarn workspace for every command that you're going to call so then at that point you're going to say the name of the package or app that you're gonna call a script on so in this case it's going to be at Council CLI and then the CLI is meant to be [Music] um really easy to use like you don't know how you don't have to know the commands the options or anything you can stop at any point in your command and what it's going to do is fall back to this prompting interface so if I just leave it at Council which is like the entry point of the CLI uh we'll see that we're going to get prompted and it's going to help us walk through the rest of this CLI yeah definitely how's that good okay um awesome so now we've got our prompt UI which is going to kind of walk us through the rest of the command that we want to run uh so you don't again you don't have to know how to use this just call Council and then walk through multiple choice here so I'm gonna go ahead and start this local server I'll accept the the default port number and there we go now we've got our node running and a bunch of accounts similar to hard hat and Anvil all these counts all of these accounts are going to be the same as the accounts that'll get spit out in those networks as well so if you have these added to your account or to your wallet uh you can start using it right away so now that we have that running let's go ahead and start deploying so I'm going to say yarn workspace oh at Council CLI and I'm going to stop again at the entry command of just cancel so I've got my prompt now and this time I'm going to go down to deploy so with the CLI you can deploy any of the contracts within the council protocol if you want to do like a piecemeal deployment or some kind of custom deployment but then there's also two commands in here that are kind of like template deploys so we have a default one which we won't go into today but I encourage you to go and look into that if you're interested uh but what we will be deploying is this simple deployment here and so this is just going to be one core voting contract that Danny mentioned earlier uh One locking vaults so that I can deposit tokens and get voting power and then also if I don't already have a treasure or a voting token deployed it's going to deploy those for me as well so I'm going to choose simple I'm going to pick the host the chain I want to deploy to which is localhost I'll accept the RPC URL that's the default one and that's what my uh server is running on and then I need a wallet key here so I'm going to grab one of the wallet keys that I had over here on these initial counts just to pay for this transaction awesome so like I said I don't have a this is a new local network there's no voting token deployed on this thing so I'm just going to go ahead and hit blank here where it's asking for my voting token address I'm going to just gonna hit enter and at that point it's going to ask me for a mock voting token name so it's going to deploy something called a mock erc20 it's just an erc20 with some extra methods that you can call to set balances of certain accounts or mint and anybody can call those so it's really good for testing so I'm going to accept the default mock voting token and MBT there for the symbol and there we go now we got a mock erc20 that's been deployed and we have our address here so the next thing that's going to get deployed is our core voting contract uh and the first thing you have to decide for this is how much voting powers are going to take to meet Quorum for this core voting contract this doesn't mean so for example right here the default I've got a million this doesn't mean that there needs to be a million votes towards yes to make the proposal pass it just means it just means that there has to be a million votes towards the proposal and then if the yeses have it then the yeses win and the proposal can be executed so I'm going to leave this as a default as a million and then I need to choose how much proposal or how much voting power someone has to has have to create a proposal so this is really a mitigation for spam you don't want a bunch of people just coming in and creating proposals if they're not engaged with your Dow so setting this kind of minimum proposal power just make or voting power makes it so these people have to be kind of engaged right they have to have some some stake in the game so I'm going to accept the default there for 25 000. and there we go we deployed our core voting contract so the next thing that we're about to deploy is our locking Vault this is the one that you put tokens in and it's going to give you voting power back and the first parameter that you're going to have to choose is a stale block lag I don't want to go too much into detail on this it's a kind of complex parameter usually you can just accept the default and the idea here is that it should expand the entire length of your proposals you don't want this to be shorter than your proposals but for local test sets probably just do something like 100 keep it kind of low there we go so we got our locking Vault deployed and we got the address but then you also see that we deployed a locking Vault uh simple proxy so a simple proxy if you're not familiar or proc uh if you're not familiar with like upgradable proxies this is a pretty typical pattern for upgradable contracts basically we can use the proxy address as kind of a fixed address and we can change out the contract behind it in this case the Locking Vault without having to change what address is approved inside of our core voting contract um so now that that's deployed the last thing I'm going to deploy here is the treasury we're probably not going to be using the treasury today but it's going to deploy it anyway just in case um okay so now I've deployed all my contracts and I'm just choosing a name for this deployment this is arbitrary it doesn't do anything to your deployment but it's a name for a file that's going to spit out with all of your information about your deployment and then also a path for where that's going to go perfect so I've deployed all my contracts I get all my addresses here and if I go inside of packages the council CLI I can see at the path that I chose here deployments I'll have a new Json that's going to be all of the addresses and information about my deployment and this is what I can use as a reference moving forward so it's going to have my address the name of the the contract that the got deployed a hash and then the deployment RX awesome so now that we have this uh deployed how are we going to interact with it let's get the UI deployed and so we can actually look at our our deployment so I've got my reference over here on the right and over here on the left I'm going to jump over to apps and this Council UI here is the reference UI that we mentioned earlier so inside of the council UI if I go to source and config this is basically where you're going to tell your UI what address all your contracts are deployed to and then also there's some metadata that you can add in here that isn't available on chain and that'll help inform your users on their on their voting for their proposals we have all of that information in the readme you can definitely check that out I won't go into all the fields that you can fill out in there but we have references here for mainnet gorily and then of course like I said it's in the readme So today we're just going to be looking at localhost so I'm going to copy some addresses over there I need my core voting address here and then I just need my locking ball we can ignore the time lock for now we didn't deploy one of those and for the Locking Vault again remember you want the proxy because that's the one that's going to be fixed and then one more field I do want to talk about in here is this type so this type tells the UI what to show for these vaults because you're going to have multiple volts and they're all going to have different functionality different ways of measuring voting power so you might have to have different uis for all of these vaults and so we out of the box kind of support the vaults that we've already developed so if you're interested to see what those are capital c Council config has them listed down here which vaults have pre-built uis ready to go if you add in anything else you can add an arbitrary string but it's incumbent on you to build out the UI for that Bolt it will have a fallback UI by the way it'll just show you what your voting power is but you won't be able to actually do anything with it okay so I've got my addresses in there once you've got your configs ready to go you'll come over here to council.config.ts and map those to your chain IDs today we're just going to be messing with localhost so I'm going to accommodate it out mainnet and Gurley uh and now we're good to go so from here I'm going to do yarn workspace again and this time we're going to call something on the council UI and we're just going to say Dev to run the dev server awesome so now we have this Dev server running m43000. and there we go so the UI is built to be uh redesigned basically for your brand it's it's not we didn't go crazy with the design we tried to keep it kind of functional and simple and the idea here is that we we used a UI Library that's very teamable we use Tailwind for anybody who's familiar with that it's it's going to be really easy for you all to Rebrand and turn into your own but we do have a landing page that's kind of a placeholder if you want to build off of this and then the rest of this is going to be a full-blown governance app so you can see all of the proposals you can manage your voting power within the voting vaults so right now we just have the Locking vaults you can see a list of all of the voters that have voting power in this so you're just curious to see like how much voting power or how much someone's been delegated to maybe you're looking for someone to delegate to you can do that here and then you can also see some details about yourself in your profile which is also what you'll see if you click on one of the voters in the voters list so you can see some stats about them as well as their voting history which is kind of fun to go back and see how people have been voting so there's not a lot going on in this UI right now so we talked about doing two things we or three things we've already deployed contracts and we've got a UI running on top of it that was pretty quick uh so now let's go ahead and create a proposal if you remember to create a proposal there is a minimum voting power required so let's go get some voting power real quick and to do that we're gonna have to have some of those mvt tokens those voting tokens that we deployed um so getting some of that we can uh actually use the CLI to do that as well so if I say yarn workspace at Council CLI um and then I'm just going to stop here at the entry command of council again awesome so you can see we have this mock token down here this is really just for testing purposes but I can say mock token and I can say set balance and then enter in my mock voting token address over here and then the account that I want to set the balance for I'm going to set it for that first initial account that got funded with my local test net just because I already have that one in my wallet so I'm going to grab it up here it's the same as the first hard hat wallet that comes out so if you already have that it's the same one so I'll put that in as the accounts and then for the balance I'm gonna give myself a million because I want to be a whale and I want to be able to meet Quorum on my own one two three four five six and then I need a wallet key of course to pay for this so I'll grab one of those RPC URL and there we go if we go back to the UI we should see that we have a bunch of uh voting token balance uh waiting to be deposited and turned into voting power so I'm going to go ahead and approve I'll use default just to approve as much as I can for now and then now that I've approved let's go ahead and deposit that there we go you can see my balance went down to zero but my voting power went up to a million so I'm getting one for one on my on my tokens and at this point I have enough voting power to meet the minimum voting power needed to create a proposal so we'll go back to the CLI for that I'm just running the same command again and then this time I'm going to go down to proposal so I enter there and I want to create so for the voting contract address this is the voting uh core voting contract that the proposal is going to be created inside of so I'm going to grab the address of the one I just deployed and then I need a voting Vault this is going to so when I create a proposal I also get the first vote on that proposal so this is the vaults that are going to be queried for voting power for that first vote and then it's also going to be the vaults that it checks to make sure that I have that minimum voting power required so for this I'm going to throw in my locking ball proxy there all right and so now we need a Target address this is the contract that's going to get called if this proposal gets executed so let's pretend that our proposal we felt like 25 000 was too high of a minimum amount to create a proposal so let's say we wanted to set that to 10 000.

we wanted to lower that so that was a parameter on core voting so let's go ahead and Target core voting uh and then we need some call data for this so this is encoded function in Arguments for this proposal that's going to get sent to that Target contract uh creating this call data can be complex sometimes but we've got your back with the CLI again here so if I go back to that entry command again we can go to encode and so inside of code I have every single contract that exists within the protocol and then inside of these I have every method so that you can encode any call data for any contract inside of the protocol so we said we were going to do something with core voting so let's go to core voting and we said we wanted to change the minimum proposal power so let's go ahead and choose that what do we want our new proposal power we said 10 000 so let's put that in two three and then decimal Precision I won't go to into detail of what this is is pretty common with all tokens they'll have a decimal Precision the mock voting token has 18 so we'll accept that as a default and then we get the call data that we need so now I can copy this paste it over here as my call data for my proposal and then like I said you get the first vote so what's the initial ballot going to be I'm going to say yes this is my proposal and then to pay for this I'll choose again one of these private keys our proced URL looks good uh last call block so this is uh the block after which you can no longer execute this if it wasn't executed so if it reaches this block your proposal is a dud you gotta create a new proposal so I'm just going to accept the defaults here hello and we've got a little error let me look we are yeah yeah but I'm happy to sit with you all after too um uninitialized Okay so I believe this is a problem with the deployment uh so we might have to back up and try this again real quick I might have hit too many defaults so let's do this really quickly so I'm going to do it all real fast again I'm just going to run Council start that server uh so we've got four minutes I I think I think it's best probably to go into q a at instead of trying to rush through this and then not leaving any q a time um I'm happy to sit with anybody who runs into this issue and and solve it with you uh we weren't running into it when we were doing demos so I'm sure I just did something on the Fly that I wasn't supposed to uh but that's how you're going to use the CLI to deploy these contracts to get all the information you need to configure the UI and then you saw in there in the um prompting UI or the prompting interface that you can create proposals execute proposals interact with the mock token and encode any call data that you need for these uh for these proposals so with that we've got some awesome prizes that Geo's about to tell you about all right let's hear about some bodies thanks thanks Ryan that was fantastic okay so um our prayers our first Bounty uh is going to be around creating a new body Vault so we just deployed an entire Dao and it was based on uh the lock involved which is basically one token one boat um this first for this first price we really want to hear and to see what you think is important for a dow what do you think um the boarding power in the doubt should be attributed to so the best custom Vault uh bowling ball um and the best Innovative way of defining voting power will go home with a three thousand dollar prize thanks friend um for a second body we have the best UI integration you just saw the whole UI that our team worked very hard on creating um but black was also offered there's always room for improvement and there's always new exciting things to integrate into it you could use some sort of um Universal messaging system push protocol xmtp where you could create some UI for users to be able to easily create proposals in the web UI instead of using the CLI so non-technical users have a better handle of things and for this one we also have a three thousand dollar prize and last but not least we have the best use of the SDK or CLI as you saw the CLI is very complete it's very thorough but if there's any additional functionality you would like to see on it or if there's any scripts that you could think of would be very useful to have um uh to add new functionality to the whole Suite then we'd like to see those two then there's a 1500 price for that one and with that I'll shoot it back to Danny Ryan if you have any questions or you can find us in our booth right outside I think it's right on the other side of the venue

Automatic transcript — names and jargon may be misspelled.