Get the Monday email →
Loading player…

Ten Ways DAOs Get Owned: A Governor Maintainer's Threat Model

DevconSun, Nov 8, 2026, 12:00 AM

Transcript

[music]

Can you hear me? Hello. So, hello. Uh Uh I'm I'm an open source developer at OpenZeppelin and today I'm going to talk about that owned a governor maintainer threat model. So, if you if you don't know OpenZeppelin has one of the biggest open source libraries for smart contracts.

If you want to build your own contract and possibly some governance system you use them. We are in version 5.7 now and we are soon going to 5.8. So, basically on chain governance control protocols permission and and treasuries and we have some really big with millions or billions of dollars over governance and we have seen a lot of different attacks over the years and today I'm I'm going to talk about some of them and there's and I'm I'm going to talk over the different stages of the proposals from the voting the proposal the execution itself and some of the emergency emergency powers that we we have.

And basically I I I see them as three times types of issues. Some of them are actually in the code itself. So, we have some fixes in our libraries over the over the years and some of them are mostly configuration issues. Like they the code itself works as it was supposed to do but the the issues is on maybe the environment how people use or don't use the contract and how they configure their governance systems. So, I'm going to start with some voting power issues.

The the first one is a classical one of flash loan attack which which is basically [snorts] you are able to in some protocols borrow a lot of a lot of tokens and basically for free if you pay the loan in the same transaction and doing that, you're able to have a lot of voting power in a single transaction, and possibly you can vote with a lot of tokens and control control a proposal with it. This is a classical one, and in OpenZeppelin, we we have a fix on it, which is in the code itself, which is basically is kind of a a simple solution to basically read at a past checkpoint. So when you do a proposal, we we have a checkpoint for the we with a a snapshot, and we use actually the the voting power at that time and not the voting power at the execution time. So we protect ourselves against flash loan attack. So another issue that we have with voting power is kind of inherited from basically governance, which is voting power can just can be just purchased.

Like when we are in a bear market or we have a lot of volatility in in a token, often the token itself is less valuable than what the DAO holds, and this creates an opportunity for attackers to basically vote and pass whichever proposal they they want. So basically this is an example in Compound in a in a proposal that actually got accepted, but it didn't got executed because there was there was some discussions, and over time the it was canceled, but it could have been sent, and then the attacker would gain a lot a lot a lot of money. Here this is basically an open problem because the purchasing power is what is what what DAOs are basically in inheriting from, but at the same time we we don't want to big whales or people that could could could buy the token at a volatile time to be able to do anything they they want. So there's a bunch of discussions on how to actually do this. In in the contracts we try to, for example, Uh you you you can delegate your your voting power to the the different people, the users are able to override.

So a delegate is not able to basically do anything either other than than in the best interest of the the holders themselves. But it's a open problem. Also related to voting power is basically something that is not we're not able to control is a low turnout on the on the DAO itself. Basically, if we in we are in the environment which there's no a lot of incentives for for users to basically pay attention at what is happening in the DAO. Sometimes they can just pass proposal that are not great.

Like one example that actually happened in Solana this year was that there was a proposal for $20 million to be moved to someone and it was a valid proposal there and nobody saw it for a week and then it just got executed. So this is a a real issue and it's mostly something that like governor deployers they they must be aware or and users should be always like looking at like what's happening in the DAO the proposals. So basically the low turnout is a big issue. This also happened someone basically sending the admin to time lock and no one kind of blocking it in EM Finance as well. Basically the quorum is is working as intended.

This is one of the of the issues in this case because it's really difficult to make people make people go there to vote and the governor should be should think about the the the configuration mostly. So now I'm going to issues in the proposal. There are more some more interesting ones. The first one is is also classical one which basically [snorts] someone wants to legitimate user wants to do some some proposal. They do it on chain and they maybe send it to a public RPC or to public mempool and and and anyone would be able to get the the transaction executed and then after the executed is the transaction executed basically cancels it.

This is what we call a denial of of service attack, which basically is a way to block legitimate users to do what they want. We actually have a solution to that on the code, which is quite quite simple. The it's on the description. If you basically put a proposer hashtag proposer in the in the description of the of the proposer, you are able to block who is allowed to actually do the transaction, only the proposer in this case. So we have a way to have more censorship resistance by simply doing that.

This way we allow for anyone to be able to actually propose and not be blocked in the public mempool. Another issue with descriptions as well is basically that the descriptions themselves, they don't mean anything. You can put anything there, just a string, but what's really important is the execution call and like the call data that that is there. And then if you're not able to verify that and and you don't check that is the the thing that you actually want to happen, then you can get get rigged basically. This is an an example in in BarnBridge.

Basically, we have a description and a title that that says something, and then the signature says something that is totally totally different. Now with AI, we have like both good and bad news. Like I think the the good news is is that it's easier to basically go there and check. You can ask your agent to evaluate if the if the call data and the the the transaction data is actually correct, but at the same time you need to make sure that the agent itself is not being mistakenly confused by the description or anything else. So the idea here is that we need like more more tools to make it more simple.

So even people that are not so technical, they understand uh the the transaction code and that the the the the the description itself doesn't mean anything basically. Uh so this is another case of a code of a code that basically works works as intended like we we cannot do anything on chain. So this is more on the how the maintainers actually check and how people actually verify that the is doing. So it this is basically relies on external tools that are developed. So now I'm going to talk about some issues on the execution itself and how that can be an issue.

Uh the the first issue is the classical one is like by basically not having a time lock. So what the time lock does is that it creates a delay between voting and executing proposal. The idea here is that if you don't have a time lock, you're able to in this case for example of top you you could mint a lot of tokens, you could have a proposal for that and then you vote for it and then you execute at the same time and by doing that you you were able to make a lot of money by selling the tokens and you don't give any time for the actual holders of that of that token to exit before the execution passes. Yeah, so basically this is the example where in a single transaction you are able to cast the vote vote and execute it and then you like they made a lot of money with that. This is an issue.

I I I I say as works as intended because the issue is not in the code because the code has the delay. It's more a configuration when you create it. So basically if you you are deploying a governance system a governance system time lock is a really important thing to think about and how much time you need to have a delay like how you need to how much time is needed so that people can exit safely and not be harmed by a harmful proposal that eventually gets executed. So so think about the the delay. And also uh coming to the because of that issue as well, there's a an underlying issue on that is that the governor has some settings which uh for example is the delayed itself is a uh is a is a setting and then you need uh it's kind of interesting because you need a delay for the setting to be updated as well because in this example for for in in this example you basically you have a proposal which uh has a vote to change uh the the delay.

And if the delay let's say goes to zero, then you're able to execute previous proposals without the delay before. So you have a proposal to basically bypass the what is actually preventing against it. So you this this is also a a an example in in term five term finance where that happens. And basically we have a uh a uh solution in the code for the for that one which basically uh the update the the delay itself is only called by the time lock so you you don't have that issue. But you need to be aware of uh again configure uh the the time lock and enable a delay that makes sense so that you don't harm users by simply executing proposals without a delay.

Uh this is uh in we have the time lock and we have some uh some roles basically the proposer, the canceler, the executor, uh the the default mirror and the the delay which be and this is basically uh some uh recommended way that that that we think it makes sense for these roles to be configured uh and by by doing that you you basically protect try to protect the the governor system against this this kind of attacks. Uh we we have seen issues with with uh protocols that did didn't have time lock time locks in the past months where if you like by not not not not having this kind of of time locks uh some private key got uh lost, got hacked, and they were able to do like anything in uh in a really small amount of time basically. Uh and and another issues is with uh uh upgradable path. This this happens uh last year. The issue was basically in an uh upgradable go governance.

You you have a proxy and then you have an an implementation and if you initialize the proxy in a different transaction, you could deploy the proxy and initialize that later. However, someone can basically front run you and this actually happens. So basically in September, someone deployed the the proxy and send a different transaction for the initialization and then a front runner did it before them. But the the the the tricky thing here is that they didn't actually do anything for three or or four months. So they basically made people believe that it it was working, but nobody checked.

And then in December, they basically uh rigged everyone by changing the implementation which they had power. So uh this is this is the transaction that uh had the issue. And actually we we had to fix this for this in the in the library. Of course, people should be always aware of this and uh it it was possible before to do that in a single transaction, but now we kind of try to make it even easier for for for for people to not do that. So basically we verify in the constructor so that you deploy the proxy and initialize it in the same in the same transaction to avoid this this kind of issues.

Uh another issue that is not necessarily related to to to governance, but also is really important nowadays because we have uh like a lot of chains in and usually in in a lot of times you're able to to have multiple chains uh in a governance system is basically that uh a governor trusts a uh a gateway and this great gateway basically verified the cross cross chain transaction. So because uh a blockchain is not able to actually see what's happening in the other. But the issue that happened in KelpDAO with the Layer Zero how it was basically that Layer Zero got hacked and because of that they were able to like send a lot of tokens in the in the different chain and basically steal a lot of money. [snorts] This is also a case which where it is working as intended but like you need to make sure that you you you improve the code so like for example you don't trust so so much a single gateway and you are able to actually actually verify what's happening. One way that we actually have in Open Zeppelin is using the ERC 777s and then we we we have what we call an open bridge.

Think think of it as a multi-sig of blockchains of crushing protocols actually in a way that basically you have a single message but you send it through more than one crushing protocol. Let's say Layer Zero Hyperlane and a different one and and you and you have a threshold in order to execute it. This way you have more trust that you you are actually able to to send the the transaction and you and by and by doing that you're not trusting a single point of failure which was the the issue that that happened a few months ago. So now I'm I'm going to talk one issue that kind of relates to all of the other ones. So basically in order to avoid all of the issues that we had in the previous years we we have guardians usually and basically a guardian is someone or a a group of people a multi-sig that is able that is able to bypass the rules in order to cancel a veto and help the DAO basically not to get hacked.

But the problem is how do you limit that because over time people like change minds the security council could be not as safe as we think. And unfortunately, this is an open problem. You know, in OpenZeppelin, we have a lot of code in the in governance and other contracts to make the the contract safe, but also there is an open problem. So like how much power should these guardians actually have and by having and which kind of roles they they should? We have some recommendations on like how to limit them.

Like for example, I have a guardian that only cancels has to be renewed over time, so you have some control over like the the people or the signers in a guardian for for for example. But yeah, like maintainers basically have to think about all of these all of these issues both on the guardian side and like all of the issues, not only the technical ones, but also configuration, how like basically the the context is happening, how the the marketing the market is is like changing over time, which basically impacts from token price, which also from like two days smart contracts and and very verification. So I think this is a good thing like if you are thinking about deploying your own governor or if if you have a governor, this is a simple checklist with all of the issues that I I talked about in the in the in the slide from voting to from from voting to execution to think about how the the voting power is achieved, who who is able to [snorts] do do proposal, execute them. How do you prevent someone to be blocked? Like one important thing is that in open DAO, in open governance systems, we want the we want everyone who is legitimate to be able to have a legitimate proposal.

Also, how to you prevent these people to be to be blocked and how you you enable them to even if they're not technical to understand uh to understand the code and what is actually happening on chain and make sure that what they they want and what the people and the voters want is actually going to be executed. A a conclusion here is basically the incidents are like nowadays not so much on the code itself, although we we we we have some of the code, but basically is the configuration of the governance. So like uh nowadays with with AI it's easier to to check and to to make sure everything is is working, but at the same time it's important that the maintainers of of of governance and like the users themselves they're always like verifying the configurations to make sure that the governance is is deployed in a way that is open and everyone is able to like propose and vote and execute. Uh in no open supply contracts we we do our best to always check for the contract issues. If if have any issue please open an issue in in our library and we we we we try to have our contracts up to date with all of the bugs that we we may see.

But there's things that we cannot control such as like participation or token or how a token this distribution changes over time and how this actually relates uh to to uh DAO and uh a governance system basically. So that's it. Uh this is Luis. Thank you everyone.

[applause]

Great talk, Luis. Now time for some Q&A. 5 minutes. I think we can start with the first question on top of the screen. The solutions you presented are great, but many DAOs use outdated governance designs and most don't even have basic time locks as you said.

So is this problem technical, cultural? What can we do to promote adoption?

Uh today I think the the problem is mostly technical and like uh mostly cultural actually like it's not so much technical because as I said we have multiple solutions to it. And as a community basically if you are a voter in a DAO or if you even you are some someone that like looks into the DAO basically try to pre- pre- pressure whoever is in charge of that I'd say uh maybe like you are not the the one that is actually like uh doing the code but like the most we as voters uh can do is like by either by buying votes which not necessarily is is easy but trying to pressure pressure the the the the people to actually have rel- reliable systems that work I'd say like it it it it's mostly a cultural thing and actually coordination issue which is like most of the issues in the world are coordination ones.

Nice. We're getting people voting on the audience and moving the order of questions very quickly. Oh another one. Let's do this. Free votes.

Any traditional non crypto company using this smart contract for letting stakeholders make decisions? The answer is no. Sorry.

[laughter]

Any traditional crypto uh no like I don't see a lot of people doing that today. Uh maybe they should maybe they should like there's a lot of it's not a uh a an agreement like among everyone if this like if governance and o- open governance works for everything I'm I I think there are real cases where this is beneficial but also it generates kind of a lot of uh delay some sometimes and some organizations need need to be a bit faster. This is also like an issue. Uh so yeah like I don't see any other from outside crypto basically.

That's fine. And another question just jump to the top. What can we do as fast as possible to stop this wave of governance attacks that DAOs are now facing every week?

Uh

the best we can do, I'd say, is to uh, I mean, going to like we we we we need to go over all of the DAOs that are basically uh, stagnant over a few years like there are voting people there and sometimes they're uh, and simply the community kind of doesn't care. I think this kind of a cultural cultural thing. Uh, what we we can do like usually is to put pressure on like the people that are in charge of of of this kind of stuff or if you are a huge voter, do proposals and do on-chain on-chain proposals that actually could change things. So like either by being a voter and doing the the proposal like using it or I don't know like putting pressure which which is kind of like talking to people uh, talking to the community which is voting and trying to to get to to it in a better way.

Nice. What about voter fatigue? Luis, do you think voter fatigue is also why these DAOs are getting so easily attacked?

Um, yeah, I mean uh, because I mean one of the things that AI brings and we we we've seen this even in OpenZeppelin with like more people looking in into it and maybe open issue opening issues that are not so good but like they're in a huge volume is that by having a huge volume of uh, proposals, it's actually difficult to to see the the proposals that are could be actually good and like vote in them uh, on time. So yeah, I think voter fatigue is one of the issues. Maybe AI is even helping with that as well.

Nice. Last question. I think we can go with the one on ZK proofs.

[snorts]

Uh, [laughter] you yeah, I mean I think they there are people working on on this on this kind of stuff. I think I I I a tweet of about Anthropic maybe a few days ago [snorts] like trying to verify that that model was actually doing what it was supposed to do. In theory this is a a great a great solution uh but in practice I don't think we're still like quite there yet. Something with AI there is that it's always kind of biased uh so ZK proofs could help help with that. If you have like better better better solutions I think that's what we're going to eventually be be going for.

Luis I hope next year you are giving us a talk on 10 ways DAOs are getting successful and not owned.

Thank you.

[music]

Automatic transcript — names and jargon may be misspelled.