# Exploiting Inattention & Optimism in DAOs by Isaac Patka | Devcon Bogotá

- Speakers: Isaac Patka
- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2023-10-09
- Duration: 22:09
- Topics: Science & Technology
- Watch: https://streameth.org/watch/yt-MjnmauH4GKI
- YouTube: https://www.youtube.com/watch?v=MjnmauH4GKI

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more.
https://archive.devcon.org/archive/watch/6/exploiting-inattention-and-optimism-in-daos/

Many DAOs have adopted Oracle based tools to make gassless votes executable. I demonstrated an exploit of one such oracle that was possible because the other users on the oracle app were undercapitalized or not paying attention. This type of attack highlights the weaknesses and risks of many assumptions people have about the attention span of DAO members, and execution conditions. I will show common misconfigurations of tools that are the most risky, and show people how they can fix them.

Speaker(s): Isaac Patka
Skill level: Intermediate
Track: Governance & Coordination
Keywords: governance,ux,exploit

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 6 was held in Bogotá, Colombia on Oct 11 - 14, 2022.
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

foreign [Music] I'm Isaac I'm the co-summer of the logo style and I'm also a research fellow at uh at medigov and today I'll be talking about some real world examples of how Dows have been exploited One By Me based on proof of inattention and just generally a lack of monitoring infrastructure so I'll be detailing how I was able to steal some money from a Dao how other people are attacking them even as much as like last night and how you should be protecting your infrastructure from this type of vulnerability so I've been referring to this as like proof of inattention so inattent attention is really the most scarce resource in Dao's and so governance tooling should be designed accordingly there's all sorts of optimistic uh architectures out there that rely on people to actually pay attention and that sounds pretty simple but like people paying attention is not something that you can actually assume is is happening so safesnap is an example I think is one of the most widely used optimistic architecture Tools in Dao's which uses reality.e to bring off-chain gasless votes on chain for execution but molok Dows are also have a lazy or optimistic consensus mechanism where there's no minimum core for proposals to pass thankfully they do require a sponsorship but these are just two cases of things where people could very easily sneak proposals by into Dao's while people are not paying attention so the main thing that I want to highlight today is about reality.east I'm called on to set up many Dows and often people are like well why can't we just have gasless voting and use reality.ether execute our stuff um and I think the assumption is that it's this like magical thing that brings reality and Truth on chain but that's not uh that's not inherent and so the way that reality.eath works is that anybody can ask a question of the Oracle that's like hey did this Dow vote to pay me twenty thousand dollars and then that goes in this really confusing uh format to reality.eve that you can see in the middle which is like almost impossible to decipher and then if you put down yes and nobody says no Then that just happens and so like it's not anything that actually relies on a vote having to take place reality.eath is a general purpose Oracle that you can use when attached to a gnosis safe to uh to take money so this is just a configuration of how that architecture usually works many Dows have a noses safe which has multi-six signers many Dows including things like one inch I think shape shift a lot of dows out there have that use a lot of voting on Snapshot have added this reality on each zodiac module when you add a zodiac module to your gnosa safe you're basically giving it super user privileges it can shortcut all signatures it can do anything with any assets in your safe and so you have to be very confident in how you've configured that so reality.eth is the separate application which brings the uh which brings the decisions on chain which get executed on your safe so anything in your safe the nfts the uh the assets the interaction with other contracts it can all be executed by the reality module and anybody in the world can ask questions of the reality.eath module so when you're setting something like this up there's a bunch of parameters that you can use to configure and it's important to understand the impacts of every single one of these because if you misconfigure one of them then you can make yourself significantly more vulnerable to an attack so when you set up this Oracle you want to set up a timeout this is the duration during which people can answer questions if it's 24 hours then your question is live for 24 hours and then whatever the answer is at the end of that period becomes the truth if it's a week then you have a week to answer the question cooldown is like a grace period after it but after the truth comes on chain but before it can actually be executed expiration is how long until it can how long it maintains stays valid and bond is how much you have to put down to put to make an answer and there's other configurations but I have some nice timelines that make this a little easier to understand so the way that we intend for this to work that a lot of dows intend for this to work is that they host a uh they host a vote on Snapshot um and then once that voting period is done there's a little button on Snapshot which says ask like uh bring like execute this and so that brings the that asks reality.ether question and then it goes to the pool of uh people that sit on reality.e and answer questions unfortunately there's like three people that sit on reality.eth and answer questions so usually it's the main person asked a question that also answers the Oracle and they tend to answer honestly and then execute so this is the intended scenario where you've got you've had your gasless vote you've minimized your on-chain transactions and then everything executed um according to plan so there's also the dishonest Oracle scenario where any attacker can pose a non-existent proposal to reality.eth and submit their own fraudulent answer so you don't even have to go to snapshot you don't even have to make the vote you can craft the transaction that's like hey did this snapshot vote which didn't really exist pass and then you put down a bond and say yes it did and then you wait the grace the vote the then you wait for that cooldown period hoping that nobody's paying attention and then congratulations you've been able to steal money from the Dow the there's a few different ways that Dao's can protect against this there's of course overriding the malicious answer so reality.eth Works in a way where you put down a bond to answer a question you can put down double the previous person's bond to correct their answer and that can kind of continue Forever Until It becomes not profitable to put down those bonds so the best way to do the the easiest way to do it that reality.eth wants you to do is just correct malicious answers because you'll take the bond if your answer becomes the truth on chain um you can also request arbitration so if a dishonest question is posed anybody could trigger arbitration but what I've found in surveying a lot of dows on uh on reality.eath and snapshot most of them kind of skipped electing an arbitrator or they set the arbitrator to themselves and so like these very simple misconfigurations can make it so it's like uh well now we don't have an arbitrator so if we're not paying attention for a week all of our money is at risk there's also the opportunity to veto if there's a cool down period surprisingly also I've found that a lot of the Dows that I looked at in doing this research just skipped cooldown they were like now like let's just execute this as fast as possible so these are all things which may seem like logical when you're setting up Dao assuming like we're all going to be paying attention for our nft investing Dow all the time um but then uh people go on vacation your multi-6 signers go to Devcon they leave their ledgers at home and now you're pretty vulnerable so each one of these can be misconfigured and is often misconfigured so if your timeout is too short then it makes it too hard to catch a malicious transaction if your cooldown is too short you have no opportunity to veto if you have a low Bond it's trivially inexpensive somebody could put down a ten dollar bond for a fraudulent answer if you have no arbitrator then you have no final safeguards against that and and a absent or negligent multi-six signer removes The veto or opportunity all of these are actively being exploited even like yesterday as I was saying like this is a on a very much ongoing issue so first I'll detail how in the springtime I noticed a vulnerable Honeypot uh actually called like the images like Honeypot Dow dot ether something where I wanted to figure out how easy it was to actually exploit this so a little over a year ago notice put up this bounty they're like reality.eth is this great new module let's put fifty thousand dollars in here and see if anybody steals it if no one steals it then we can feel confident that this is uh safe but like so many things in in crypto it just kind of went under the radar no one really noticed so this thing's at dormant I have the address here and I'll share this after is that dormant for a little over a year no activity and so I I decided to try to exploit it but I was doing it for research purposes so I live tweeted the exploit to make it good and not um illegal so uh so what I figured out is like how to craft the exploit using the ad proposal feature on etherscan where you craft a transaction and in this case I was like okay I want this Dow to send me like 19 420 die and so I crafted the transaction locally and then hashed it and included it on the either scan link now a quirk of this is that you could looking at this proposal you actually don't know what my transaction is because it's only a hash of the transactions that gets asked to the Oracle so this is another of another scenario where like if you see a malicious proposal you don't even know what the attacker is trying to do they could be trying to take one dollar they could be trying to drain the whole treasury but all transactions are hashed so that you you have absolutely no idea how what's going on so in this case I submitted a fraudulent proposal and then I went on to reality.eth and I paid 0.1 eth as a bond to say yes this is true it was fine for about 24 hours and then I saw a tweet from Oren I I uh cheekily called my proposal ID nothing to see here because I kind of wanted it to get detected I could have put a proposal ID which Blended in even better but I put like you know nothing to see here or found that funny I guess and so Oren and uh some of the other folks from gnosis were like hey it looks like somebody's actually trying to drain our our Nosa safe we should veto this um but much like the nearest safe table earlier this morning nobody was present to veto the transaction so this is just and being a Honeypot Dao they set this up as like 24-hour periods whatever it'll be fine um I'll go back to my funny slides for pictures thank you uh but it was too late so uh at this point I was like on another call with another thing and people were like asking me questions I can't I can't talk right now I need to finish stealing this money um so I went on I executed it and I tweeted about that as well that I successfully drained 19 420 die from this Nosa safe um on uh nicely offered to give it back they said don't worry about it um so it was too late because arbitration could not be requested because their arbitrator was set to the zero address the cooldown was too short and I think one person was on vacation and nobody else on reality.eth was paying attention to refute my answer like Oren refuted me once but then I refuted him and put a higher Bond so I actually got his honest bond in addition to the exploit and so like this system yeah it's not perfect but then uh it was like quiet again for a while until like two weeks ago when people actually started using this to try to steal money so some folks from the Opium Network thankfully had some monitoring infrastructure set up on one of their safes and noticed that somebody was submitting um fraudulent proposals to try to drain their entire treasury um but being nice people that they are they were like is this attacker doing this to anybody else and what they actually discovered was the attacker first went over went after this like really easy target it's this Dao called like Lolly Dao it's never been used it's like one person but there was seven and a half Ethan of the treasury and they had reality.eath configured 24-hour voting periods no arbitrator no minimum Bond and so the attacker snuck some money into a fresh wallet I think they withdrew from like Aztec and do a fresh wallet put down a bond and within 24 hours had stolen seven and a half eth so now they had seven and a half like uh stolen eat that they could then use to put down Bonds on other things and so there's this like nft collecting GAO called there's this nft collecting framework called Seasons which uses Dows that set this up and some of them have like you know hundreds of me bits or like a bunch of stuff uh in their Dows and so the attackers started going after those so they used their e to place Bonds on all of these other Dows saying did this pass did this pass did this pass and at this point like you could very easily flood the reality.ethui because it's like web3 UI and takes 10 minutes to load when you go to the page and it's really frustrating to use so they put these like six proposals down they put down uh thankfully the seasons folks have done some really good configurations where they had a minimum one eth Bond a seven-day voting period And so that gave us enough time to defend um and so I was uh just like some of this was going on in the East security telegram Channel and chatting with like the seasons folks um I was able to actually go in and put down like eight Ethan bonds to overcome the four eat that they put uh for theirs if they then came back and like put down 16 being like no I really want to steal all these me bits then I would have had to start like calling up some friends and be like can you guys please donate some e so that I can like defend these these safes from this attack thankfully they got scared and ran away and took their three Ethan profit and the attacker went away but this is continually continuously happening for the next week I basically had this screen open on my computer refreshing like every hour to make sure that the attacker wasn't coming back so uh it's uh it was a bit of a stressful time until they finally really gave up and I was able to claim their eth and put the and make sure that the honest answer made its way Unchained so there's hundreds of millions of Dow treasuries that are at risk of what I would say are inattention attacks and in fact like reality.eth is like the one that I've been highlighting but there's molec dials that are vulnerable to the same thing and I want to include some links to uh so Skye sent me from like a metacartel sent me a proof that he did of a molecdo and attention attack where you know if you're in some molecules maybe you're in one maybe you're 10 maybe you're in like 60 of them and oftentimes like uh they go dormant for a while there's no monitoring infrastructure in place and so any member could be like um like sneakily submit a proposal while everyone's at a conference uh and I'm saying this to try to scare you to like look at your Dows and make sure no one's trying to take things from you while you're sitting here um I think that attacks like this are only going to start happening more and more frequently so beyond smart contract audits we need configuration audits it's not just enough to have the core logic right it's a matter of how you stitch together all of these composable pieces into something that is also audited and safe and so configuration audits are something that I really want to see become more prevalent in Dao's like whether it's uh the gnosis safe the no the safe app where it's like hey if you add these modules you might be vulnerable here or like hey you have like a green check mark this this configuration seems pretty safe for you um and I know it's early but like these are things we should be adding before we have some sort of like trauma of like a bunch of safes getting drained so I have some tips on how you can protect you and your Dows from people like me and other and people that are worse this is a bunch of texts but I made this to like kind of uh take pictures and I'll post this out later um I think it's as somebody that has went through like a sock 2 audit with a startup before crypto stuff there's actually a lot of stuff from those processes that I think Dallas could adopt they make you think about what's your resiliency plan what's your continuity plan who has control over this administrative thing um who like is there some random multi-sig somewhere that actually holds veto power to the Dow that we're just too lazy to get rid of there's a critical need for more monitoring infrastructure so I know a lot of people are working on dashboards for individuals like track their portfolios and stuff but we really critically need more info like monitoring infrastructure for Dow tooling that can like you know woof style I don't know ping you everywhere every time there's like some some sort of big transaction going on there's cool automation tools that I think are underused as well open Zeppelin has a tool called Defender which I really like for identifying dangerous scenarios setting up alerts and then actually submitting triggers to like pause contracts you can create these like Defender bots on that tool that look for like a malicious proposal or like maybe your dad was going into sleep mode and you want to set up something where it's like okay if anyone tries interacting with a smart contract this pause transaction is going to go out and you can like pre-sign a transaction pre-load it and like have all these defense mechanisms ready to go for your communities uh I think it's also really cool to see that simulation tools are getting more used because I don't think I've seen an attack like this but I wouldn't be surprised if somebody submitted a proposal at some point that was like hey we should submit my monthly payroll but then they just add a zero to their paycheck uh that would be pretty hard to detect and most people that are like on a bunch of multi-sigs or like a proof approved approve approved but thankfully safe has added like tenderly simulations where you can just say like okay what would happen if I actually approve this and you can choose to say okay is that person getting paid one thousand dollars a month or a hundred thousand dollars this month simulation tools and Dows are are critically needed as well we need to conduct regular configuration Audits and detect when configurations change all the things that in like Legacy companies are really boring and they have entire Departments of people for things like change management are actually needed uh in like composable governance settings we should always minimize cross-chain communication anytime you're using a bridge you're probably just waiting to get exploited we need to implement spending limits and transaction guards everybody should use Hardware wallets not back up their stuff in and this is just like general purpose like house housekeeping stuff but like uh but a last one that I think would be cool is if we could set up some sort of like on-call ships and rotations for people that are on like 60 multi-cigs to make sure that they know that hey this person's on vacation these six people are in Bogota we need to like keep track of what's going on so I mean in conclusion composable governance tooling is why Dows are going to be great and powerful and transformative but we also need to be very careful about how we configure things or else we are just going to start seeing like uh floods of militia proposals coming in and people are just going to get overwhelmed so take care of your Dows and protect them thank you thank you thank you Isaac for that inspiring talk are there any questions from the audience um is it possible to set up prevention rather than monitoring because I just see like if you would have a lot of money monitoring Tools in your Dows then what makes it so different from the traditional Financial system yeah does that make sense it does make sense and I was chatting with some folks earlier about better architectures for this kind of stuff where proposals should actually be minimized in Dows where you can set up different governance architectures that are much more like set it and forget it like the folks at protocol Guild the way that they are and also like the build Guild the way that they have their payroll set up is like it's just streams which are set up until they're not and so like I think that more things like that where governance is a you set it and you only have to do governance when you want to change things versus like constantly having to do proposals makes it so that you could have like much longer voting periods much more safety and I think that like generally architectures that uh prioritize that over um over like active like attention-based governance would be would be better and then we're not just like flooded with notifications which is not necessarily better right so that means that there's a huge opportunity for ux and this designers in the space right for sure like the ux and also like ux of like the ux of the governance itself and like uh thinking about things on time spans and cycles and uh attention and stuff so for sure really interesting thanks uh you mentioned sending out alerts when uh there was a possible attack going on have you thought about um somebody trying to exploit those alerts and creating many many false positives so that people stop paying attention to the alert and then it allows somebody to yeah notification fatigue is like yeah it would not necessarily be better because then we're just like okay which of these alerts is real which is not so uh yeah it would be similarly bad uh you've mentioned earlier about arbitration and that some of the dowels are basically setting themselves as the arbitrator what are the other options and how would that process work if like you get there and you need an arbitrator yeah um so some dials have like Claro's Court set up as arbitrators um hello uh which is cool uh so that would be a great option um or other other systems that have uh or just any other system where somebody can be like here's an independent board that your arbitrator also needs to be responsive and so like that's why it's kind of good to go with a protocol versus an individual because if you have like a one elected individual arbitrator people go on vacation people go away um so yeah I would say like using um like other consensus mechanisms like that would be would be ideal this is what I enjoy uh helping with so Reach Out no more questions sure thanks
