Onchain Atlas

Cover Protocol Infinite Mint Exploit

A cached-storage bug in Cover Protocol's Blacksmith shield-mining contract let attackers mint quadrillions of COVER tokens in hours, collapsing the token's price by over 95%.

▶ Run interactive simulation animated mechanism with editable parameters

Statusexploited
Launched2020-11-20
ChainsEthereum
Mechanismsshield mining / liquidity mining rewards, peer-to-peer coverage / claims market, token minting via staking contract
Official sitehttps://coverprotocol.com/
Project X@Unknown (unverified)
FoundersAlan Chiu

How it works onchain

Diagram of how Cover Protocol Infinite Mint Exploit's mechanism worksOpen full-size diagram
Original diagram derived from this entry’s researched mechanism description.

Summary

Cover Protocol (formerly SAFE) was a peer-to-peer, Ethereum-based DeFi insurance/coverage market that let users buy and sell protection on smart-contract failure risk, funded partly through a "shield mining" liquidity-rewards program built around a contract called Blacksmith. On December 28, 2020, an attacker discovered that Blacksmith's reward-accounting logic could be manipulated to mint an effectively unlimited amount of the protocol's governance/reward token, COVER. Within hours, tens of quadrillions of COVER tokens were minted and dumped, the token price fell from roughly $700–900 to under $5–7, and total losses across multiple exploiters (including a self-described "white hat," Grap Finance) were estimated around $27.8 million on-chain value created, with roughly $9.4–13 million actually extracted before most funds were voluntarily returned. The incident became one of DeFi's canonical "infinite mint" case studies and a widely cited lesson in cached-state accounting bugs.

Design (Mechanism)

Cover's core product allowed users to mint paired CLAIM and NOCLAIM tokens against collateral, creating a market where CLAIM token holders were compensated if a specified protocol was hacked and NOCLAIM holders were compensated if it was not — a binary, peer-to-peer coverage mechanism modeled loosely on other yes/no prediction markets. To bootstrap liquidity for these coverage pools (and for Balancer-based COVER/ETH and stablecoin pools), Cover ran a "shield mining" program: users who deposited eligible LP tokens into the Blacksmith staking contract earned newly minted COVER tokens over time, proportional to their share of a pool.

Blacksmith's reward calculation cached each pool's total staked amount in memory at the start of a transaction, updated the on-chain storage value when a user deposited, but then continued to use the stale cached (pre-update) value for the remainder of the reward computation. This alone was mostly harmless. The critical "amplifier" was that the reward formula multiplied a rate by the ratio between a miner's new deposit and the pool's existing (cached) total. If a pool had a tiny existing balance (in the extreme, a single wei) and a miner then deposited a very large amount, that ratio could balloon by a factor of 10^18 or more, letting the depositor claim an astronomically inflated share of rewards — effectively minting COVER without bound. Because Blacksmith held unrestricted minting rights over the COVER token, this accounting bug translated directly into unlimited token creation with no upper check.

Outcome

An initial exploiter identified the bug on a freshly added Balancer pool with negligible starting liquidity and extracted roughly $4.4 million in minted COVER. Word of the vulnerability spread; several hours later, while the Cover core team was asleep (the exploit began around 8 AM UTC and the team wasn't alerted until nearly 11 AM UTC, with meaningful response only after noon UTC), the entity "Grap Finance" used the same bug to mint approximately 40.8 quadrillion COVER tokens, worth an estimated $9.4–13 million at the time, framing itself as acting to drain remaining risk before "real" bad actors could. The Cover team revoked Blacksmith's minting rights around 12:22 PM UTC once awake, ending the attack window. COVER's price collapsed roughly 95-97% within hours. Grap Finance and other participants subsequently returned over 4,350 ETH (roughly $3–4 million at the time) to the Cover team, who used it plus a pre-exploit token snapshot to design a compensation and migration plan. Cover Protocol nominally continued (a "v2" was floated) but never regained meaningful traction; the project's official Twitter account announced permanent shutdown in September 2021 amid internal team conflict.

Why it worked

The exploit succeeded because Blacksmith combined three conditions: (1) it held direct, unrestricted mint authority over COVER, so any accounting error became real economic value instantly and irreversibly; (2) the reward formula depended on a ratio against a pool's existing liquidity, which was attacker-controllable simply by creating or targeting near-empty pools; and (3) the underlying stale-cache bug had shipped in the original audited contract and gone undetected through a full audit cycle and months of live operation, meaning it was a "sleeper" bug waiting for someone to notice the specific low-liquidity conditions that made it exploitable.

Where the design broke

The core failure was a subtle but classic smart-contract bug: updating storage state without updating the in-memory cached copy used later in the same function, combined with unbounded trust placed in a ratio-based reward formula. Response time compounded the damage: with no automated circuit breaker or minting cap to bound worst-case damage independent of human intervention, mitigation depended entirely on a person noticing and manually revoking mint rights, and the exploit began in the early morning UTC hours when that response was slowest — leaving a multi-hour window during which the bug was known (at least to attackers) and actively exploited before minting rights were revoked. The incident also exposed a monitoring gap: no alerting system existed that could catch anomalous minting activity in near-real time and trigger an automatic pause.

Lessons

  • Any contract with unrestricted mint authority is a single point of catastrophic failure; even a minor accounting bug becomes an unbounded loss when nothing caps total mintable supply per transaction or per epoch.
  • Cached/stale local-variable bugs (reading memory that was invalidated by an intervening storage write) are a recurring, hard-to-spot class of vulnerability that formal audits can miss, especially when the exploitable condition (near-zero pool liquidity) doesn't arise until well after deployment.
  • Ratio- or share-based reward formulas need explicit bounds or sanity checks (e.g., minimum liquidity floors, maximum per-transaction mint caps) because ratios against attacker-influenced denominators are trivially manipulable.
  • 24/7 monitoring and automated emergency-pause capability matter as much as pre-launch audits; a multi-hour "team asleep" gap between exploit start and mitigation was a major amplifier of total losses here.

Redesign (EDITORIAL — hypothesis, not fact)

A hardened version of Blacksmith could have avoided this outcome with three changes: first, replace direct unrestricted minting with a pre-funded, capped reward pool (e.g., a fixed emissions budget locked in the contract) so that even a logic error could only redistribute already-allocated tokens rather than create unbounded new supply. Second, add a hard per-transaction and per-block mint/reward ceiling independent of the ratio calculation, so that any single deposit-and-claim sequence could not yield more than a sane multiple of the pool's intended emission rate. Third, adopt automated on-chain monitoring (e.g., a bot watching for mint events exceeding a statistical threshold) wired to an emergency pause guardian with a small multisig or time-locked kill-switch, reducing reliance on a human team noticing and reacting while asleep. None of these would have been exotic for late-2020 DeFi tooling, and together they would have converted a catastrophic, unbounded exploit into a contained, bounded-loss incident.

Sources

  1. 12/28 Post-Mortem (Cover Protocol official) — primary (primary)
  2. Cover protocol hack analysis: Infinite Cover tokens minted via an exploit (analysis)
  3. Cover Incident: The Unlimited Token-Minting Vulnerability (PeckShield) (analysis)
  4. Cover Protocol suffers infinite minting attack, price tanks 97% (news)
  5. Deep Dive into Cover Protocol's December 28, 2020 Exploit (analysis)
  6. COVER Protocol. SAFE's Launch (Cover Protocol official) — primary (primary)

Last verified: 2026-07-27 · Spot an error? Suggest a correction