UMA & Across 🛠Building Optimistic DAOs with oSnap - John Shutt
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Join John Shutt from Uma for a talk titled "UMA & Across Building Optimistic DAOs with oSnap". We will walk you through creating a truly decentralized optimistic DAO using Safe, Snapshot, and UMA's oSnap module. With oSnap, your DAO members are in control, with human-readable rules, Snapshot enforcement, and no need to rely on a multi-sig. As new users flock to web3, critical infrastructure advancements are needed to scale. Scaling Ethereum is your chance to shape the future of Ethereum. Join us March 10th-29th for three weeks of hacking and summits featuring teams like Gnosis Chain, Scroll, Hyperlane, UMA, IPFS/Filecoin, and more.
Transcript
foreign [Applause] [Music] hello everybody Welcome uh to Uma Workshop Uma and across building optimistic dials with ostap we have joining us today John ashut who will be taking us through the session and with that we'll pass it over to John to introduce himself and get this session started hey everybody thanks for joining uh so I'm gonna Focus today on a new product that came out from Uma that we're pretty excited about uh called osnap and we'll just run through some slides that kind of explain how Uma Works how osnap works then we'll go through the process of actually deploying oh snap with a safe and a snapshot space and show how you can do easy optimistic execution without having a multi-sig in the loop and we'll have some time for questions at the end too all right so using osnap to actually decentralize your Dao a lot of dowels are not particularly decentralized they are reliant on a multi-sig to actually execute the will of the voters on snapshot they also aren't particularly autonomous or organized so we're working on that uh Uma is an optimistic Oracle so if you're familiar with optimistic Roll-Ups it's kind of a similar idea the way that Uma works is that you assert some truth about the world like uh the temperature was below 70 as a high in Las Vegas today and anybody can dispute that within a challenge window and it basically works as a decentralized truth machine following a shelling Point mechanism that has pretty strong Economic Security and it's really flexible too it can handle any kind of real world cross chain off chain uh kind of calculation type question so a common misconception based on how oracles are used in Defy is that oracles are just for relaying price data onto a blockchain which is really limited I think most Oracle protocols would disagree with this characterization of like what oracles are about but that's what most people think about but really in Oracle is a truth machine you can record any kind of truth about the world we talked about um you know weather but it could be about like real world events it could be it could be a price or it could be did this governance proposal pass and that's what this is going to be about so optimistic oracles are about enforcing correctness after a dispute so normally proposals are correct if you make a proposal of this is the truth you have to post a bond with that which you're going to lose if you're disputed and you turn out to be incorrect um so 99.9 of proposals are correct right out of the gate and you just have to wait for that challenge window so that's different from a price feed style Oracle that you might be more familiar with where you have a network of nodes that are paid to try to determine in advance what the answer is and then push that answer on Shane and then you can use that it gives you recourse dispute functions are kind of an undo it has a computable cost to actually manipulate it and it's really flexible because Uma doesn't have to anticipate in advance what your questions are going to be as long as they're human readable as long as they're comprehensible as long as there is a clear correct answer you can ask that question to the oracle foreign so what goes into it uh you have a requester asking for some data or asserting some data in some cases a proposer that's saying here's what the data is and you have a disputer network that's watching and wants to try to take bonds from people that are making bad proposals so they have a financial incentive to watch closely you have a dispute resolution process which is basically a vote from the Uma token holders which we'll get into in a bit a documented methodology of Truth so that those token holders when they're trying to determine what the correct answer is they have some guidelines that you might have said in advance of like here's how you calculate this if it's some kind of complex calculation and you have economic guarantees that uh give you a upper bound of the cost to manipulate the system so we're pretty flexible we've done a whole lot of Integrations you can ask stuff like did the sports team win for prediction markets that's live uh you can build defy Insurance things asking if a protocol was hacked there's no data source you could go to that you need to have something like an optimistic Oracle Nexus actually works in a similar way uh too you could build an entire protocol like across this cross Chain Bridge that's kind of our sister protocol which is also hiring by the way we have the hiring slide at the end and they're asking like was this bundle of relayer refunds calculated correctly did they do like all the relays correctly do they do fees correctly so it's this very bot driven kind of machine driven system there you could do success tokens shapeshift did some on-chain VC fundraising in an incentive aligned way where the VCS get paid out if the token price goes above a certain point at the expiration date of March 1st 2024 and it's not like they're getting a discount in advance that they still make a profit if the token doesn't do too well and then another example is just sort of like tvl kpi options you could reward very specific things for your Dow which is kind of cool so yeah just kind of like an outline of things highlighted optimistic governance because this is what this is going to be about so this is kind of a typical flow you have a forum discussion you have a snapshot vote uh snapshot votes are not actually binding in most cases you can't really execute them you do a snapshot vote and then the multi-sig that is actually running things uh decides whether or not they want to enforce that snapshot vote and even if they do want to enforce it they have to go around and collect signatures even though the Dow has theoretically made its decision you have to like Chase down a bunch of signers they have to make sure the transactions are correct and then it runs through the multi-sig so it's not very efficient sometimes the multi-sig signers decide they don't want to enforce the governance vote if it goes against their personal interests that's happened a few times but even in like the normal case where they do want to do what the Dow says it's really inefficient and annoying it's not fun to be a multi-sig designer so osnap in this your Dow is basically replacing the multi-sig anyone can initiate a transaction everyone can dispute the transaction the truth is economically incentivized like all the other things running through Uma and you can set it up really quickly just in an afternoon basically and we'll walk through a setup process which is not an afternoon it's going to be like a couple of minutes uh this is the basic flow you deploy this module you're going to attach it to your safe you set some basic parameters which we'll show and you create a snapshot Proposal with some transactions attached if it passes you can execute them if it doesn't pass it gets disputed there's going to be a vote to settle the bonds between the proposer and the disputer but if it was a valid proposal you don't have to wait for the result of that vote you can just repurpose again so it doesn't slow you down right and it's kind of built for tools that a lot of people are already using you're using safes you're using snapshot this cool symbol in the middle this is the Zodiac framework for adding modules to a safe there's a lot of other cool zodiac modules you should definitely check that out if you're building a dow because the Dow toolkit is getting way more sophisticated now it's not just about multi-cigs and safes are not just about multi-sigs safes are a whole like operating system for building organizations is the way I think about them all right so getting it set up um let's actually jump out of the slide deck and we'll set one up yeah how do I escape this okay all right so we got a safe uh so test safe it's a one of one multi-sig uh not super secure but good for demo purposes um so you just want to go to apps here uh and I do see questions coming in in the chat I'll answer them at the end um and you want to go and search for zodiac if it lets me type it there we go so you want to add this app if you don't have it already in this case it's a demo space that we use a lot so it's already added in there you see a whole bunch of modules and modifiers here the one that we're interested in is the Uma ostap module and this is designed to allow you to execute successful snapshot proposals on chain and we'll set some Basics here we'll say like 0.1 width as a demo space you get some warnings if you set parameters that look kind of unsafe so it's saying a minimum Bond of one is recommended uh liveness if you set this low it's going to warn you about that liveness is the challenge window so if you get a bad proposal that comes through and you set this to 48 Hours you basically have two days that anybody can come in and dispute that bad proposal and that might be somebody from your Dow it might be somebody that would be a multi-sig designer traditionally and is paying attention to these things it could be uh third parties because we have a really robust kind of 24 7 third-party disputer Network that's watching for proposals primarily from prediction markets because they're very high volume we settle a lot of markets every day so people are watching the check and they are actively disputing and these are very very very easy ones to dispute you just go and see if a snapshot vote passed or not did the transactions match or not if not dispute so I would actually expect these to get disputed within 10 minutes or less but it's good to set a long liveness just for security purposes which is why we have These Warnings um you would enter your snapshot space URL you would set some Quorum and voting period rules and these are basically getting added to your written rules this string here is your rules that are going on chain that Uma is going to use to interpret whether or not something passed you might set a quorum of like 100 and a voting period uh on snapshot of um you know let's say it's like three days and then if you have a snapshot admin that goes Rogue and they create a vote and the voting period is one minute and the Quorum is one and they both give themselves all the money that will contradict this rules parameter on chain so then they'll propose that and that'll still get disputed it doesn't matter that it technically passed on Snapshot a human can look at these rules they can clearly see that the standard meet the minimum Quorum minimum voting period and dispute that it's invalid even though it passed on Snapshot which kind of shows the flexibility of an optimistic Oracle type system that you're able to you know apply that human reasonableness to it so at this point we would go and try to move this Zoom stuff out of the way and add the module got all these Zoom little thumbnail things um so we would go and just like attach this to our Savior and because gas fees are kind of high we're probably not going to actually do this yeah we'll just reject that because we already have one um that we can use so we'll just kind of cancel and exit out of that and we'll just use one of our existing things um so going over to our snapshot space if we did deploy it adding it to your space is really simple you just go to settings and then if you scroll all the way down to the bottom of your snapshot space settings you can add a plug-in you would look for gnosis safe snap which is already added here and then you just add your network address and where it says Uma address you would add the address of the module that you just deployed or in this case we have a module that's already deployed and added to this snapshot space and this is going to be tied to our safe back here so that is this one here I think actually which is going to execute the result of this proposal that we're about to create so that's all set up um you can see it actually only takes a couple of minutes once it is set up nobody else has to really think about it it's really easy to create a proposal and just start using this as a user and it's all like point and click what you see is what you get type interfaces you don't have to know how to code and we'll just kind of walk through creating a basic transaction create a basic transaction do some stuff we use both yes and you can use any kind of voting scheme again because what you're checking on uma's side is just did this vote pass it doesn't matter how potentially complex your snapshot Space strategy is or what kind of voting system you're using you're able to just look and see as a human being did this pass or not but we'll do basic voting for against abstain and we will do something once I get zoom out of the way again okay so we're going to set this to settle and sorry Zoom is like the bane of my existence how do I get this thing out of the way okay I hid the floating meeting controls so this should go more smoothly now all right so we're gonna um have a really short voting period because we basically want to like vote on this and then pass it and uh execute it within the confines of this demo so let's add a transaction we're just going to transfer some eth um it's really easy to do like kind of common transactions you can do contract interactions uh you can do any transaction just like raw transactions that you composed in some way um but we'll just transfer some funds to ourselves here do a small amount of eth on Gurley and then we could add more transactions if we want to and it'll execute this whole uh bundle as a batch but we'll just do one as an example sign to create that gonna vote for it I like this proposal that sends some money to myself great photos in and we just have to wait a minute until we are able to execute this we have one minute left for the voting period do all right uh I think that we might be able to execute this now let's see or propose it all right so this little thing here is where osnap is doing its thing everything else is normal um if you have your snapshot and space setup it's all going to look the same except now there's going to be a little button here you can click to request proposal execution uh and this is just where you like double check did this actually pass because you might have some complex kind of voting system to determine whether or not something passed you might have different Quorum rules you might have you know yada yada yada so just to double check sanity check it and then you can request execution and this is going to actually make The on-chain Proposal with that transaction and say hey like this is a valid proposal um please execute this on chain and you'll have a challenge window where anybody can come in and dispute that for instance if people voted no uh this would not be a valid proposal and the person would lose their bond which because this is a demo the bond is zero but in real life it would probably be like it might be like 1500 usdc it might be one with something like that something that's going to hurt a little bit if you get it wrong because that's your incentive as a disputer to go and dispute bad proposals and so this is uma's Oracle interface all of our Oracle requests go to the same interface they kind of go to the same alerting system uh so you kind of have a network effect there where this is going in with you know a dozen prediction Market settlement requests um like all the insurance protocol things like the people that have Bots that are monitoring for bad requests they are going to see every proposal that comes through from your Dow and it'll be very very easy for them to spot a bad one you have a liveness period here about a minute left to dispute this if this is wrong we're not going to dispute it but if we wanted to we could do it from here you could even potentially have uh you know Bots that do this if you have like a bot that's smart enough to know whether or not a snapshot vote passed then you can race and beat all of the other disputers uh and collect that disputer reward which is basically half the proposer's bond no just wait around for 40 seconds uh some more stuff in the Oracle interface which is nice you can see in the explanation this is kind of cool this is like an ipfs CID for the specific snapshot vote that this is tied to so this vote right here has a specific uh kind of ipfs identifier which includes all the details about it and that's going to be the same one that is referenced here and there's like some slow load times to pull it up but it's basically going to be like a Json file with all the details it'll show the transactions it'll show the description Etc and that's how you can tie what's being proposed here to a specific snapshot vote and if you don't see one I mean that's an easy rejection that means it's not tied to a vote it's a bad proposal it probably didn't come through the snapshot interface at all and that's just ipfs loading yeah if you have a better ibfs node that would load faster so this is done now so what this means is this is not disputed this was a good proposal the Dow did vote Yes on it so we can go back here this time has passed let's refresh and we can execute you can see most of the time is actually just waiting for Gurley to do stuff going to execute here there's another on-chain thing anybody can execute um you could have a bot that automatically executes uh once you see that this has passed um so you might not even be manually doing this but at this point it's not up to a multi-sig designer like anybody can do it because the Dow did approve it it's been verified through Uma nobody disputed it and by the way if it does get disputed and it was a valid proposal you can just repurpose you don't have to wait for the Uma voting period to determine what the outcome was that voting is basically just going to settle the bonds between the proposer and the disputer it's not going to affect this flow and it's not going to slow you down because that voting period does take a couple of days so that is executing it's going to transfer a tiny bit of eth all transactions have been executed anybody coming back to this vote can see that we're done here we did what we wanted to do and if we go back here we should be able to see uh in the internal transactions that uh yeah got some eth so that's what we were out here to do so that's pretty much it uh I'll skip ahead to some extras here all right so this is audited uh we audit everything eduma fully integrated with snapshot and zodiac safe um you can set it up on all these different chains really beginner friendly um you don't have to code uh to deploy it or to use it you don't have to use the command line to deploy it or use it I just walk through the whole flow it only takes a couple minutes it's exactly the same when you're setting it up for your own space and the human readable rules means that you actually understand what it's doing you don't have to wonder about this code and just sort of like trust that the coders got this right like you can read the rules of your Dao and it's really easy to participate so moving beyond um you might have thought to yourself if you can write the rules that say oh and four snapshot votes could you write other rules as well like uh you're not allowed to transfer any more than this amount in a given day or like this person is allowed to transfer that amount like over the next month because that's their budget uh yes you can so you can write down any rules the optimistic Oracle can enforce them we're just trying to create something that is really easy to set up that's using tools that people are already using and kind of filling that Niche but once you have this deployed we are really interested in seeing more experimentation that you could add additional rules to your osnap module and enforce them on chain so this is kind of our most advanced and generalized form of like you know Contracting on chain like smart contracts that are written like contracts that are human readable all right talent and culture seriously um this is the recruiting slide we are recruiting at UMO we're also recruiting at a cross uh look at all of these like friendly people look at this neon great place to work um yeah so go here uh also like if you are not looking for a job we do have recruiting bonuses that are paid out on chain using uh like kpi options where depending on how the your referral moves through the process you'll get like a greater lesser payout for your referral fee which is kind of a cool on-chain incentive if you have any referrals so I think that's it uh check out the docs docs.umaproject.org developer osnap you can DM me and I think that is all and we are good for questions let me pull up the chat um does my contract only receive the value after the dispute window is over uh yes um so you have to wait for the challenge window and you probably would want to set that at a reasonably long one to protect um you know that whatever assets your safe has or admin controls that your safe potentially has a lot of people have safes that are um uh basically have governance rights over other smart contracts so you want to set a reasonably long dispute window to make sure that bad proposals do get caught like if somebody's making a proposal on Christmas or something because they think people are going to be offline you might want to have like a few days or like you know at least a full day for people and alerting systems too which we could talk about offline um how does otostop integrate with a smart contract uh it just plugs into a safe it's just a module once you deploy the module that is attached to your safe uh whatever your safe can do you can do through osnap now and you're just proposing transactions that you would ordinarily send to your safe via a multi-sig or whatever else and oh snap will execute it uh there will be no execution uh no if it passed um on Snapshot you're good um so you could have like let's say it's just uh if it gets a majority approval it's valid then you could have 49 vote no and that's okay that passed um there won't be execution you basically would need to repropos if somebody disputed it on chain but if they're disputing on chain what they're saying is it didn't pass on Snapshot and if the disputer is wrong about that they're just kind of like annoyed because they voted no and they don't like this they're going to lose their disputer bond which is going to be the same size as the proposer's bond so that's why you don't get spurious disputes too like the disputer has money at stake that they're going to lose if they're wrong about like the facts here which is that it did pass on Snapshot and we have a few more minutes if anybody wants to ask any live questions or drop questions in the chat hi hi John I I would like to to make a question yes please uh yeah I I already use changing and uh I was seeing if I could integrate Uma my contract uh but I failed to find any example uh how to integrate with my contract you said it's just a sage uh it's a very easy setup so I think that's why I I couldn't find anything in your documentation but maybe if you could uh show me a path uh where I could at least see how it is done uh it would be of great help sure um what are you using uh chain link for right now because it probably depends on your use case how you I'm just I'm just retrieving one volume that's uh the the that's how uh an ID from an API it's just one more value I I also would like to know if we can get like an array of files or a string directly to my contract uh by using Uma that's a good question um so the way that Uma works is you're making an assertion or like a proposal saying like here are the facts um so if you wanted to do an array what you could do is uh get that array of values proposed through your contract store that state and then Uma will verify like yes or no are all of these values correct so it's kind of the integration pattern is based on somebody coming with the data versus like um uh like a chain link kind of thing where chain link is posting specific data over and over again like you have specified data feeds in this case you're saying here's the methodology here is the array of let's say a dozen values I calculated all these values correctly please dispute me if I'm wrong and that's the way that a cross Works basically and with across those values are like a whole bunch of relays on a bunch of different chains that are bundled together and like all the fees that were paid with each relay and collected and like did everything happen correctly so looking at the across integration pattern I think would be useful if you have like a more complex thing but I think that's important to kind of recognize like Uma is there to verify data that is being proposed Uma doesn't really post external data like automatically as like a stream although it's possible to build out that flow too and we've thought about doing sort of like a chain link style flow of like data feeds because that is something that you could build with Uma uh and if anybody's interested in doing like you know um the chain link aggregator interface but Uma flavored we're under the hood it's like Uma is verifying the data before it gets posted there I think that could be useful and we just haven't built that particular flow out even though it's possible but that would be great because then I could use the dispute mechanism uh to dispute what changing gives me yeah exactly um because you could basically dispute it before your contract is using it uh and you know the challenge window could be longer or shorter I know some use cases need data fast so you might have a short challenge window which is fine if you if it's kind of like a thing that Bots are able to determine and dispute faster if it's something that's more human readable like oh snap you might want a longer challenge window just so people can like actually look at it because it's going to kind of take human reasoning and that takes a little bit of time across is very bot driven uh disputes that have happened with the cross those happen like immediately um you know within like a couple minutes and that's just based on how often people kind of run through a bot flow um you know sometimes it's less than a minute uh can I vote with my smart contract um yeah uh I I think this is like if you're voting on a dispute not a snapshot vote um so uh snapshot that's like one thing I'm I'm guessing you're talking about like voting on the outcome of something uh with Uma uh yes you can have like a smart contract that holds you in mind you can vote through that um and we have uh delegated voting contracts that we use um for like vesting and other purposes it also makes it easy to like put your Uma in a cold storage wallet and then vote with your delegated hot wallet that might be a mobile wallet or something easy to use so in that case the Uma is actually sitting in this um uh well I guess it's like sitting in like yeah like a smart contract system um but I might also be misunderstanding maybe you mean voting with snapshot uh which I think that depends on the snapshot Space strategy so it would be up to the person who's setting up the snapshot space all right any other questions I am very uh gratified that this is a 30 minute workshop and I spent like half of it on slides and we still had like an end-to-end deployment and run through demo and had time for questions so it's that easy it takes five minutes no excuses everybody deploy oh snap awesome cheers thanks so much John for joining us today on the great presentation um and yeah if there if you have any other questions feel free to drop them in the most sponsored Discord Channel and John and his colleagues will be able to help you help you out yep oh and also prizes we got prizes uh check out the details but we have like a grand prize a second place prize and a pool prize so hack on Uma and nihil says you are very fast yeah I am a skilled oh snap deployer at this point all right thanks everybody cheers thank y'all thank you
Automatic transcript — names and jargon may be misspelled.