UMA 🛠Use of oSnaps
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Join John Shutt for workshop titled "Use of oSnaps for community treasury payments". Some of the most skilled web3 developers, designers and product builders from all around the globe came together for a weekend-long adventure at ETHGlobal New York 2023. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
foreign [Music] so I am John with Uma and I'm here to talk about one of our newer products that we came out with this year called osnap which you can use to actually decentralize your Dow and then also talk about how you can modify it for some really cool hackathon projects that use natural language rules so a problem that a lot of dials have is that they're voting on Snapshot and then they have a multi-sig that actually executes the transactions on chain so you have this point of weird centralization where you had a whole bunch of people come together to vote but then what actually happens is controlled by just a handful of people that have these admin permissions and a lot of dows realize that that's a big problem so osnap's been really popular especially with D5 protocols and I'll go through some examples and explain how it works so first off Uma is an optimistic Oracle and the way that that basically works is you can bring any kind of data on chain you're saying this statement is true and also here is a bond take my money if the statement is wrong and there's a challenge window where anybody can show up and they have that Financial incentive to dispute you if you are wrong so there are people that are watching these proposals 24 7 looking for disputable uh proposals there's also a lot of very bot driven flows for some of the products that are built on top of Uma and it makes it super flexible because you could have things that are human reviewable you could have things that are bot reviewable and you can build all kinds of products with it so what it can actually do a lot of people think about oracles as being this price feed style thing where you have a network of nodes that have to reach consensus on some data before pushing it on chain but what it really is is like a truth machine you're trying to record some truths about the world onto blockchains and the optimistic Oracle mechanism makes it really flexible to record basically any kind of Truth as long as it's publicly verifiable and we kind of like walk through that one thing I didn't mention is it adds some recourse to contracts a lot of the issues that come up with oracles are um if like the data is wrong that a bunch of nodes came to consensus on some data that is wrong in some way that could cause a lot of damage to a protocol with an optimistic Oracle you don't have that kind of issue like if you are dealing with price data for instance it might be that a Market's being manipulated and if that goes on chain you can actually dispute that and say like hey the spot it read the price data from the data source but this is a manipulated Market it's not the true price and that makes it really interesting for those types of use cases so what goes into it you have some kind of contract uh some protocol that's requesting data they've preset a bunch of parameters like here's what the minimum bond is going to be here's what the challenge window is going to be maybe here's a reward for posting the data you have some kind of process for resolving the disputes so disputes are really rare because the bonding mechanism but if it does come up it goes to a vote of all the Uma token holders and it's kind of a shelling point game where you commit a secret vote on chain of what you think the truth is you can't see what other people are voting so you can't just copy answers the most likely selling point is going to be the truth and you get rewarded only if you're actually going with that majority and you need to have some kind of methodology of saying what the truth is like what is this question and it needs to be really explicit because otherwise people aren't going to even come up and make a proposal they're not going to risk a bond on like a wishy-washy ambiguous question because they might lose it and you need to have some economic guarantees that bound the cost of manipulating the system how much would it cost you to try to mount an attack on this Oracle system and there's a lot of different ways to do that I won't go into a ton of detail on that in this talk so I want to get into osnap but come by the Uma Booth this weekend if you're curious about that so it can work for all kinds of questions polymarket uses us so you can do natural language prediction Market stuff you can do insurance protocols you can do on-chain derivatives you can do like different fundraising mechanisms you can verify a whole bundle of cross-chain data which is what across does across is our sister protocol that's built on top of Uma that's done about two billion dollars of bridging volume between different roll-up chains and it uses Uma to verify that all the relayers are getting refunded correctly on those chains yeah kind of going through that all these things are like live in production pretty easy to spin up we have tutorials for all of these so if you're interested in any of these topics you can do it but we'll focus on optimistic governance how low snap works and how it could be modified for cool hackathon projects too So This Is That Flow I was talking about like you talk on the forums and like everybody's involved there and it's free to do uh you have a snapshot vote that's also free so everybody that has a token or like has some voting permissions can participate but then there's just a jump off point where like okay the Dow is actually run by this multi-sig and it's just like three of five people decide what actually happens um so that's a huge huge problem I mean it's like it removes that that decentralization and we've seen a lot of adoption from D5 protocols because they're the most concerned about that centralization risk there's like a lot of negatives associated with that so with osnap you can still vote on Snapshot so you don't have to pay for gas on chain you don't have to do like these delegated voting schemes you can vote gas free transactions that are approved they're validated by the Oracle and then they're automatically executed anyone can dispute the transaction and it's usually like a long challenge window it's like a one to three day challenge window in this case because Dallas aren't in that much of a hurry depending on your Oracle integration you might want to have just a couple of hours if you need something done fast like poly Market it's a two-hour challenge window with osnab it's one to three days um and then the truth is economically incentivized and you can set it up in under a minute actually so if you have this pattern where you have a safe multi-cigon chain and you have a snapshot space I did a speed run you can actually do it in under a minute of adding osnap because it's this really lightweight module you attach to a safe and then a plug-in that you add to your snapshot space and that's it that's the entire thing and now your Dow is like decentralized the multi-sig does not have to get involved in actually executing things um so we're getting a lot of adoption I had to add a bunch of logos to this one today so we've got cow swap connects premium L2 dial across shapeshift uh Barn Bridge lossless plus style and you can kind of see that theme that I was talking about with D5 protocols there's a ton of regulatory and legal scrutiny like people do not want to be multi-six signers on a D5 protocol so it's securing uh I think oh I said over 100 million it's close to 100 million I was exaggerating on that flight a little bit but it's growing really rapidly um and we think it's not a really good fit and this is just kind of the flow you deploy the module just a really small contract it's like 100 lines just a lot of comments mainly you attach it to your safe you're setting the parameters we've got some defaults the defaults are just like a two weth bond that you have to post as a proposal Bond but we'll get into how that's kind of automated and some Services we run around that you create a snapshot proposal like normal but you can attach transactions to it so when you have our osnap plugin there you can actually Define specifically what transactions you're approving you're not counting on the multi-sig signers to read what you voted through and then like figure out what the transactions are and execute them you see what they are and you build them and then if it passes uh either the transactions are going to be proposed on chain and after a day or two or three they'll be executed or they'll be proposed and there's a dispute because maybe it didn't pass on Snapshot and it's actually somebody trying to like do something they're not allowed to do in which case it gets disputed and it's basically like thrown away you don't have to rely on the Uma token holders here exactly because Uma token holders cannot execute transactions against your Dow any disputed proposal is tossed yeah and it's using tools that are really familiar just using a gnosis safe cool little logo for the Zodiac framework for adding stuff to a gnosis safe there's all kinds of other cool zodiac things that you should check out for the hackathon snapshot and Uma and this is kind of like the walkthrough um you know it's pretty straightforward if you go to uma.xyz slash osnap it'll have links to more docs for this so I won't walk through all these steps uh links to like the videos showing how to set this up but one thing I would add is once you deploy if you're doing custom rules and I'll get into that uh just modify the rules that are in your contract so instead of the rules saying like here are the rules around snapshot you could say like here are the rules um for how I want this safe to behave maybe I'm putting my personal funds into this safe I want to automated investing strategy or I want some safeguards like I got a board ape in there I would never transfer it if it's being transferred it's being stolen so like block that transaction you can add any custom natural language written rules that you want for your hackathon projects and definitely contact us if you're like doing a deployment for an actual Dow that you're involved into or something else kind of just showing what it looks like circle on the osnap module in zodiac this is um in like the safe interface you like add the zodiac app to your safe and then click the button for the osnap module it'll deploy with the defaults and you're pretty much ready to go there yeah you're like some defaults you enter your snapshot space URL this rules parameter like this natural language written thing that's what's going to be enforceable with the Oracle and it'll just plug in the values that you put in there and there's a bunch of boilerplate too like you know what if your snapshot admin went rogue and they set like a quorum of one and a voting period of one minute and they passed it like it's not going to be valid because it's not meeting the minimum voting period in Quorum that you set here like the Oracle will check that it'll get disputed if snapshot itself became evil and they're like censoring your votes and like this is a notorious thing that snapshot is now doing uh that also can't just transfer tokens from your Dao or something all those extra rules are there for that and this is actually automated now so we have like a V2 it is basically a bot that risk Labs runs because we know that it's a hassle to post a two-weth bond to make a proposal and like a hassle to go back and execute it after the proposal challenge window is over so we just have a bot that we run that does this on your behalf it watches your snapshot space we know all the oh snap deployments that are out there so we can monitor them and we'll make the proposal and after a couple of days we'll execute the proposal for you too and we actually cover the gas like unless your Dow is doing a ton of contract deployments or something and it's starting to get expensive we're happy to cover the gas for whatever token transfers we just want to make this as easy as possible to use and the bot doesn't have any special permissions like if the bot is offline you can click the buttons yourself in the snapshot interface to do it and anybody can dispute it too if the bot got something wrong go in and dispute it and take risk Labs money enjoy um yeah and these are just like extras it's all audited you can set it up on a ton of different Chains It's really beginner friendly you don't need to write any code for it you don't have to go to the command line for any of this like if you're just setting up a Dao as just a person who's interested in Dows you can deploy your snapshot space and you're safe and your osnap module and everything else and understand how the module Works without writing any code you can deploy a token too I mean you can do like the whole um like uh open Zeppelin Governor module and like deploy a token do the whole like end-to-end process without ever writing any code which is kind of cool and we got some new stuff coming out soon too we're gonna have a native Safe app just for hostnap and a snapshot plugin that is going to improve the transaction Builder and make the whole experience nicer and then this is kind of more of the hackathon thing so you can think of osnap as a specific product a specific use case for this optimistic Governor contract what makes it osnap are the wrap around things like the snapshot integration and this set of rules specific to snapshot but you could write all kinds of rules that do all kinds of things instead of writing a smart contract where it's enforcing in code all of the things that the safe or this contract can do you can write something that just is human readable and makes sense and say this is the way this safe behaves here's the incentives around it something simple like if you said I want to sell eth if it like goes above two thousand dollars and like stays there for at least an hour and if you go and sell this eth for me you can take like you know two bucks worth of eth out of my safe write that out literally just how I said it that seems reasonable enough that's interpretable by the Oracle attach that as your new set of rules for your snap module you've now created a different product it's like not a snapshot thing anymore you've created this product around like automated ethanvesting you could add like any kind of set of rules you want and that's kind of where the creativity comes in because again you did this like one minute kind of deploy thing you've got the safe you just got to figure out what the rules are and like why would this be a product people would actually want to use um I think that that makes it really cool and open-ended and it's nice for like a weekend hackathon because it's quick to deploy and if you come up with the idea and you can write down the idea clearly you kind of have half of the product already you save yourself writing a lot of code like the sentences are being enforced rather than coming up with code that does everything and you can maybe focus on the front end stuff and like other aspects of it so it's really our most advanced form of generalized Contracting you can like write these contractual agreements and human readable language and you can enforce them on chain with the Oracle checking that everything is being done correctly so you can get maximum flexibility with minimal trusts and here's like a link uh DM me on Twitter or come by the boosts um we'll be there pretty much all weekend and there's a lot of other stuff too I mean like we've got prediction Market tutorials Insurance tutorials just like General data assertions you can build derivatives with us you can like do a lot of cool stuff with a cross our cross Chain Bridge um so it's not just about osnap it's just like a newer thing that we're very excited about and think raises a lot of possibilities for new products you can build at the hackathon but that is all for me
Automatic transcript — names and jargon may be misspelled.