OAK — OnChain Attack Knowledge

Worked example · 2022-03

NFT collection proxy-upgrade rug cohort — upgradeable contracts without timelock executed within same block — Ethereum — 2021–2023

Loss
aggregate — the dollar-denominated loss across the NFT proxy-upgrade rug cohort is estimated in the tens of millions of dollars across multiple collection-level incidents during the 2021–2023 NFT market expansion. Per-incident losses ranged from mid-six to low-seven figures at the collection level, with the largest single-collection proxy-upgrade rugs exceeding $2M in extracted ETH. The loss is measured as the buyer-paid mint/secondary-market price of NFTs that became valueless (or were drained of associated treasury/staking assets) when the collection contract was upgraded to a malicious implementation.
OAK Techniques observed
OAK-T16.006 (Timelock-Free Protocol Upgrade Execution — the NFT-specific sub-pattern: a collection deploys an upgradeable proxy contract, markets the collection to buyers, accumulates treasury/staking/royalty assets, then the contract owner — typically the project team or a compromised deployer key — upgrades the proxy implementation to a malicious contract that drains treasury assets, mints unlimited tokens, or redirects royalty streams to attacker-controlled addresses. The upgrade executes in the same block as the proposal or a minimal number of blocks later, with no mandatory timelock delay to give holders an exit window or an intervention opportunity. The timelock-free upgrade path converts the contract owner's upgrade privilege into a same-block rug capability).
Attribution
pseudonymous — the specific project teams behind named rug pulls are documented in community-security research (ZachXBT, CertiK, Peckshield), but attribution is at the pseudonymous / deployer-address level; named-individual attribution is rare and typically follows law-enforcement action. At the cohort level, no single attacker attribution is relevant.
Key teaching point
An upgradeable NFT contract without a mandatory timelock on proxy upgrades gives the contract owner same-block rug capability — the upgrade privilege IS the rug capability. The structural lesson is specific to the NFT-collection context: buyers evaluate an NFT project's safety primarily by looking at the collection contract (verified on Etherscan, audited by a known firm), but an upgradeable proxy pattern means the deployed contract is a pass-through to a logic contract that the contract owner can replace at any time. If the proxy upgrade path has no mandatory timelock, the owner can replace the logic contract with a drainer in the same block, and no buyer-side due diligence on the currently-deployed logic contract provides protection.

Summary

During the 2021–2023 NFT market expansion, a recurring rug-pull pattern emerged: NFT project teams deployed collections using OpenZeppelin's upgradeable proxy pattern (UUPS or Transparent Proxy), marketed the collection as "audited" or "verified," accumulated buyer funds through mints and secondary-market trading, and then — typically within hours to days of the mint sell-out — upgraded the proxy implementation to a malicious contract. The malicious implementation typically contained a drainTreasury() or mintUnlimited() function that transferred accumulated ETH and NFT assets to the attacker's address.

The proxy-upgrade rug exploited the gap between the security signal that buyers relied on (verified collection contract on Etherscan, audit badge) and the structural reality of upgradeable contracts: the deployed proxy contract is a thin routing layer that delegates all logic — including asset custody, mint authority, and royalty routing — to a logic contract that the proxy owner can replace atomically. A buyer reading the currently-deployed logic contract (or relying on an audit of it) received no protection against a future logic-contract replacement, because the proxy's upgrade path was the load-bearing security surface, not the logic contract's current code.

The timelock-free upgrade path was the critical enabling design choice. A mandatory timelock (e.g., a 48-hour delay between upgrade proposal and execution, with a public event log) would have given buyers a detection-and-exit window: the upgrade proposal event would be emitted, community watchdogs would inspect the proposed new logic contract, and buyers could exit their positions before the upgrade executed. The absence of a timelock converted the upgrade privilege from a governance-controlled parameter-change capability into a same-block rug capability — structurally identical to a selfdestruct or rugPull() function hardcoded into an immutable contract, but hidden behind the legitimacy-signalling of an upgradeable proxy with a verified, audited current implementation.

Timeline (UTC)

When Event OAK ref
2020–2021 OpenZeppelin upgradeable proxy patterns (UUPS, Transparent Proxy) become the standard for upgradeable Solidity contracts; widely adopted across DeFi and NFT projects (proxy-pattern proliferation)
2021–2022 NFT market expansion; hundreds of NFT projects deploy with upgradeable proxies, many without timelocks on the upgrade path T16.006 (surface creation)
2021–2023 Multiple NFT projects rug via proxy-upgrade-to-malicious-implementation; per-incident losses range from mid-six to low-seven figures at the collection level T16.006 (active exploitation)
2022–2023 Community-security researchers (ZachXBT, CertiK, Peckshield) document the proxy-upgrade rug pattern; timelock-on-upgrade becomes a community-standard security recommendation T16.006 (pattern documented)
2023 onward Proxy-upgrade rugs decline as the pattern becomes widely recognised and buyer communities demand upgrade-timelock verification before minting; the pattern persists at smaller scale through v0.1 T16.006 (attenuated, ongoing)

What defenders observed

  • The proxy-upgrade rug is structurally indistinguishable from a non-upgradeable rug from the buyer's perspective. Whether the rug is executed via proxy.upgradeTo(maliciousImpl) or via a hardcoded ownerDrain() function on an immutable contract, the buyer's experience is the same: funds are extracted in a single transaction, with no detection window and no intervention opportunity. The upgradeable proxy pattern adds a layer of legitimacy-signalling (verified implementation, audit report on the current logic contract) that can make the rug MORE effective, not less, because buyers lower their guard based on the currently-deployed logic contract.
  • The timelock is the sole structural mitigation — not the audit, not the verification, not the team's reputation. A mandatory timelock on proxy upgrades (minimum 24–48 hours between proposal and execution, with a public event log) is the only structural control that prevents the same-block proxy-upgrade rug. Audits, code verification, team doxxing, and community review of the current logic contract all provide zero protection against a future logic-contract replacement. Defenders evaluating NFT project safety should treat the presence or absence of an upgrade timelock as a binary security signal — not a加分 item but a prerequisite.
  • The proxy-upgrade rug is a DeFi+NFT cross-cutting pattern. The same timelock-free upgrade path that enabled the Bancor and Furucombo DeFi incidents (T16.006's existing DeFi examples) is the enabler for NFT proxy-upgrade rugs. The two verticals share the same root cause (insufficient governance-contract design) and the same mitigation (mandatory upgrade timelock), but the buyer-side due-diligence surface differs: DeFi users can check governance-contract parameters; NFT buyers typically evaluate the collection contract and the team's social presence, neither of which surfaces the upgrade-timelock status.

What this example tells contributors writing future Technique pages

  • T16.006 is inherently cross-vertical (DeFi + NFT). The technique's three existing examples (Bancor, Furucombo, 2020–2021 DeFi cohort) are DeFi; this example adds the NFT vertical. Contributors writing future T16.006 examples should expect to find the same timelock-free upgrade path across DeFi protocols, NFT collections, DAO treasuries, and any on-chain entity that deploys an upgradeable proxy without a mandatory upgrade timelock — the root cause and the mitigation are vertical-agnostic.

Public references

  • [openzeppelinproxies] — OpenZeppelin upgradeable proxy documentation; the UUPS and Transparent Proxy patterns that are the substrate for T16.006's upgrade path.
  • [certiknftrug2022] (proposed) — CertiK NFT rug-pull cohort reporting including proxy-upgrade rug classification.
  • [zachxbtnftrug2022] (proposed) — ZachXBT community-investigation threads on named NFT rug pulls including proxy-upgrade-to-drainer incidents.

Discussion

The NFT proxy-upgrade rug cohort is the NFT-vertical T16.006 worked example, complementing the DeFi-vertical examples (Bancor, Furucombo, 2020–2021 DeFi cohort). The structural observation — an upgradeable proxy without a mandatory timelock converts the upgrade privilege into same-block rug capability — is vertical-agnostic and applies to any on-chain entity deploying an upgradeable contract pattern.

For OAK's T12 coverage, this example brings T16.006 to 4 worked examples and adds the NFT vertical to a technique whose existing examples were all DeFi. The cross-vertical framing strengthens the argument that T16.006 is a general governance-design Technique that happens to be classified under T12 (NFT-Specific in OAK's current tactic structure) but is structurally applicable across DeFi, NFT, and DAO verticals — a classification boundary that contributors may want to revisit in a future v0.x update.

Techniques demonstrated (1)