cryptonist

Hacks

Compound V2, 29 September 2021

Data as of 22 November 2026

DefiLlama's record lists Compound V2 on 29 September 2021, with $147.0M lost on Ethereum, classed as Token & Share Accounting, technique Arithmetic Error. By amount it is the 29th largest of 1,373 incidents in the record, and the 3rd largest of 2021. The account below is ours, written from the sources it links; the figures are DefiLlama's, as of 22 November 2026, and the record does not say whether they are before or after any recovery.

What happened

At the end of September 2021 Compound, the Ethereum lending protocol, executed governance Proposal 062, “Split COMP rewards distribution and bug fixes” (proposal record). It upgraded the Comptroller, the contract that pays out the protocol’s COMP reward token, and introduced a bug that let users borrowing certain assets claim more than their intended share of COMP, as the later fix proposal put it. Rekt.news reported that about $80 million of excess COMP went out in the first days. By 3 October someone had called drip() on the Reservoir, a contract that feeds the Comptroller 0.5 COMP per block and had not been called for weeks, which sent another $68.8 million of COMP into the vulnerable contract (banteg; Compound’s Robert Leshner). Banteg tallied the exposure at $147 million (rekt.news).

How it worked

Proposal 062 split each market’s COMP rate into separate supply and borrow speeds. As part of the upgrade, any market whose reward index was still unset was given the default starting value, compInitialIndex (proposal record; GitHub). The payout code had a guard for users whose own index was zero: if the market’s index was greater than compInitialIndex, the user’s index was first set to that starting value. In a market whose index had just been set to exactly compInitialIndex, the strict “greater than” test failed, the user’s index stayed at zero, and the contract counted their rewards from zero rather than from the starting value, crediting COMP they had never earned. The fix changed the test from > to >=.

Governance timing made it worse. A correction had to go through Compound’s own process. Proposal 064 went on chain on 2 October and took about a week to be queued and executed (proposal record), and developers had hoped a fix would take effect before anyone called drip() (Leshner).

Afterwards

On 1 October Leshner asked recipients of excess COMP to send it back to the Compound Timelock and keep 10% as a white-hat reward, warning that otherwise it was “being reported as income to the IRS” (tweet). Later that day he called it a “bone-headed tweet / approach” (tweet). Proposal 064 patched the bug and disabled COMP claims for users in the affected markets. Proposal 065, executed on 19 October (record), used a one-off function, fixBadAccruals, to reduce over-accrued balances, recording any excess a user had already claimed as a sum owed back to the protocol.

Account reviewed 22 November 2026. The facts in it come from the sources linked in the text; the figures above are DefiLlama's record, which places it on Ethereum and files the target as DeFi Protocol.

In DefiLlama's record

Compound V2, as the record lists it. Newest first. Source: DefiLlama.
DateIncidentClass TechniqueChainsAmount
2021-09-29 Compound V2 Token & Share Accounting Arithmetic Error Ethereum $147.0M

More from the record: every incident in 2021, Token & Share Accounting, Arithmetic Error, and the whole record.

Other large incidents in 2021

Source: DefiLlama, retrieved 22 November 2026, under its open methodology. Figures are a dated snapshot, not a live feed.