The transaction did not look like a theft. It looked like a routine governance call: borrow, delegate, vote, return, settle. Four operations. One block. No private key compromised, no reentrancy, no oracle pushed off its peg, no integer overflow hiding in a loop. The contract executed exactly as written, and two governance seats changed hands, and the treasury followed them out.
I have read a lot of incident reports. Most of them are stories about a bug. This one is a story about a price. Somebody finally worked out what a governance seat was worth per block, and the number was lower than the market believed.
The public record on X100 is thin. There is a title, an event, and a second event placed beside it, and the rest is inference. The record gives me the shape of the event and nothing else: no attacker address, no transaction hash, no chain, no figures. I want to be explicit about that before going further, because the temptation with a thin record is to write a confident story and call it analysis. What follows separates what the record supports from what the pattern implies. The pattern, unfortunately, is very well established.
Governance voting power in a token-based DAO is a balance lookup. Some contract, at some moment, asks a token how many units an address holds, and that number becomes a vote. The entire security model of the DAO reduces to one design question: at which moment does the lookup happen?
There are two answers, and they are not close. The first is a historical snapshot: voting power is read from a block that predates the proposal, so the balance at the time of the vote is irrelevant. The second is a live read: voting power is read when the vote is cast, or when the proposal executes. The first is a lock. The second is a door with a sign on it.
A flash loan is a loan that exists only inside one transaction. It is unsecured because it cannot be escaped with: either the borrower returns the principal plus a fee before the transaction ends, or the whole transaction reverts and it never happened. EIP-3156 standardized the interface, but the economics predate the standard, with fees in the range of five to nine basis points, plus gas, plus whatever slippage the borrower eats moving the borrowed asset into the governance token.
Put those two mechanisms in the same transaction and the failure is arithmetic, not mysterious. Borrow the governance token, hold it for the duration of the call, vote with a balance that did not exist one block earlier, return the principal, keep the decision. The protocol checked the balance and the balance was real. It was real for one block.
This is not a new attack. Beanstalk lost roughly one hundred eighty-two million dollars to this pattern in April 2022, having spent about eight thousand dollars to do it. Build Finance lost its governance to a hostile takeover two months earlier. The category is old enough to have a literature. What keeps happening is not a failure of knowledge, it is a failure of coverage: the people auditing the code and the people designing the mechanism are rarely the same people, and the second group is usually not audited at all.
The mechanism, stripped down:
attack_cost is approximately the flash fee times principal, plus gas, plus slippage of the principal against pool depth. attack_yield is approximately the treasury assets controlled by the captured seats.
The critical term is not principal. It is slippage. A borrowed balance large enough to control a vote has to be moved through a pool, and the pool prices that movement against its own depth. The AMM model hides its truth in the invariant: for a constant product pool, buying a fraction of the reserve costs a convex function of that fraction, and the function turns ugly fast. This is the only friction in the attack, and it is a function of liquidity depth, not of protocol size.
Which produces the structural defect: when governance token liquidity depth is smaller than protocol TVL, the attack is economically rational.
That inequality is the whole story of the last four years of governance drains. It also inverts the decentralization framing. A token that is widely distributed, actively traded, and accepted as collateral on Aave or Compound has a deep pool and a low borrow cost. A token concentrated in a multisig has a shallow pool and cannot be borrowed in size. The property the market calls healthy liquidity is, from the governance attack surface, a measure of how cheaply the protocol's treasury can be rented.
I ran the numbers on Beanstalk's structure when it broke. The leverage ratio exceeded twenty thousand to one: eight thousand dollars of cost against one hundred eighty-two million of yield. No rational attacker leaves that on the table. The fact that it stood as long as it did is evidence of how few people were looking, not of how hard it was.
Now the detail that says the most about X100's design: two seats. Not fifty-one percent of a token vote. Two seats. The phrasing implies a committee or multisig structure, a governance body small enough that individual seats carry decisive weight. If the threshold for control is two of perhaps five to nine positions, the attacker does not need a majority of token supply. They need enough voting weight to fill two slots for one block. The capital requirement collapses and the leverage ratio gets worse.
That is a design pattern worth naming. Committee governance is sold as a pragmatic compromise: faster decisions, accountable members, less voter apathy. What it does instead is concentrate the value density of a single seat. Every seat is a key to the treasury, and every key is priced by the cheapest market that can mint a temporary copy.
Here is where I part company with most of the post-mortems I read. The standard recommendation after an event like this is to get a better audit. I do not think that is the failure. I have been on the reviewing side of enough Solidity to know what an audit checks: access control modifiers, arithmetic, external call ordering, reentrancy surfaces, upgrade patterns, oracle staleness. A competent reviewer reads onlyGovernance on a function and marks it correctly implemented. It is correctly implemented. The modifier does what it says. The question of who can satisfy the modifier at time T is an economic question, and economic questions do not appear on the checklist.
So the code passes and the mechanism fails. A Trail of Bits or OpenZeppelin report on that contract would have been accurate and useless, and that is not a criticism of the firms. I don't read access modifiers as security anymore. I read them as a price. Code audit answers whether this function does what it claims. Governance audit answers who can call it, at what cost, using whose money. The second question is asked approximately never.
Governance apathy is the other half of the mechanism, and it does not show up in any audit either. A flash loan can only fill a seat if nobody else is competing for it. Proposals that arrive on a Friday afternoon, that read like routine parameter changes, that carry a quorum threshold low enough to clear with a borrowed balance, pass because the alternative to passing is somebody reading the diff. The attack is not a breach of the process. It is the process working with the only participant who showed up.
The defense list is short and well understood, which makes the recurrence more damning than the novelty.
Historical snapshot. Voting power read from a block before the proposal opens. Kills the attack outright, because the balance cannot be conjured retroactively. ERC20Votes exists, is audited, is boring, and is still unused by a surprising number of live protocols.
Time lock. A mandatory delay of at least forty-eight hours between passage and execution. Not prevention, a window. It converts an instantaneous theft into a visible event a community can respond to. It only works if somebody is watching, which ties back to apathy.
Proposal deposit and quorum. Raises fixed cost. Does nothing against a large flash loan, but it filters noise.
Independent guardian multisig. A pause authority that does not route through governance. This is the one that actually saves funds in the incident response window, and the one most often blocked on ideological grounds.
On the ranking: snapshot and timelock are structural, deposits are cosmetic, guardians are emergency. A protocol with a snapshot and no timelock is still exposed to a slow capture. A protocol with a timelock and no snapshot is exposed to a fast one with a visible tail. You want both, and the reason protocols ship neither is that both add friction to the exact operations the team wants to perform quickly.
The uncomfortable part is the remediation paradox. Once governance is captured, the only legitimate path to fixing governance runs through governance. The attacker holding the seats can vote down the patch. Teams escape by shipping an emergency migration through the guardian multisig or by redeploying and asking holders to follow, which is a social fork wearing an engineering costume. I have watched three projects do it. Two of them lost the community in the process.
The contrarian read: this is not a security failure, it is a pricing discovery. A governance token is not a voting coupon. It is a call option on the treasury, exercisable at the cost of renting the float. For years the market priced that option at zero because nobody had exercised it in public. Every drain event is the option being repriced, and the repricing holds. Once the mechanism is understood, the discount does not come back.
Which means the fix the industry keeps proposing, more audits and more bug bounties and more monitoring, addresses the wrong ledger. The exposure is not a bug inventory. It is a balance sheet item that never appeared on one.
Second point. The reflex is to call this an exploit and the actor a hacker. Look at the transaction set and the word does not fit. The attacker borrowed under a published standard, delegated under the protocol's own contract, voted under the protocol's own rules, and repaid on time. No invariant was broken. The system was used exactly as specified, and the specification was wrong. Calling that a hack lets the designers off. The correct description is that the protocol sold a controlling interest in its treasury for the price of a swap fee, and someone accepted the offer.
Third. Most DAOs should not run on-chain governance at all. The teams arguing for it are usually arguing about legitimacy, not security, and legitimacy is a social property a token vote does not manufacture. A protocol with a two-of-five committee and a forty-eight hour timelock is more decentralized in practice than one with a token vote any borrower can rent. Decentralization is a cost curve, and most treasuries cannot afford the top of it.
What I am watching for in the next twelve months is not another drain of this shape. It is the migration. Watch which protocols move to ERC20Votes and a real timelock after this event, and which ones publish a statement about enhanced monitoring. The first group understood the lesson. The second group is buying time. Watch the yield premium as well: if lending markets and liquidity providers start demanding compensation for governance risk, the cost of thin mechanism design finally shows up where the industry can read it, in the borrow rate. And watch the regulators, because every one of these events is a gift to the argument that protocols need accountable operators. Zero knowledge isn't magic; it's math you can verify. Governance is the same. The math was visible from the start. Nobody ran it.