👨🏾‍💻 Dev corner: How a DAO vote can be used to attack a treasury

Real case this week: Unlock Protocol says a malicious governance proposal targeting its treasury has passed and becomes executable on Dec 1. It says the risk is limited to Base and urged Base users to review their Locks by Nov 30 (TokenPost, Nov 30).

How on-chain governance works:
🔹 Token holders vote on proposals, and each token counts as votes
🔹 If a proposal reaches quorum and wins, it gets queued
🔹 A timelock contract waits a set delay, then executes the code in the proposal, for example "send X tokens from the treasury to this address"

How attackers win:
🔹 Low turnout: if few holders vote, a small group can reach quorum
🔹 Cheap or borrowed voting power: buying or borrowing tokens just before a snapshot
🔹 Hidden payloads: a harmless-sounding title with code that does something else

Defenses builders use:
🔹 A timelock long enough for people to react and exit
🔹 A guardian or security council that can veto clearly malicious proposals
🔹 Vote snapshots taken before a proposal is public, so voting power can't be bought at the last minute
🔹 Always read the calldata, not just the title

Have you ever voted in a DAO? Did you read the code first? 👇

📷 Photo: FlyD / Unsplash