OAK — OnChain Attack Knowledge

Worked example · 2023-08

Zunami Protocol price-manipulation drain via Curve pool — Ethereum — 2023-08-13

Loss
approximately 1,152 ETH (~$2.1M at the time of extraction). Funds were laundered through Tornado Cash and not recovered or returned.
OAK Techniques observed
OAK-T9.001 (Oracle Price Manipulation — the attacker manipulated the on-chain price of Zunami's zStables by executing a large swap on the Curve pool that Zunami used as its price oracle, inflating the zStables' valuation relative to the underlying Curve LP tokens). OAK-T9.002 (Flash-Loan-Enabled Exploit — the attacker used a flash loan from Balancer to source the initial capital for the price-manipulation swap, executing the entire drain atomically within a single block without committing own capital).
Attribution
pseudonymous. The attacker's address was identified on Etherscan; the funds were routed through Tornado Cash shortly after extraction. No wallet-cluster attribution to a known actor was published by on-chain analytics providers at v0.1.
Key teaching point
Zunami Protocol is the canonical mid-2023 worked example of the "internal-pool price-oracle manipulation via flash loan" exploit class — a structural variant of the T9.001 + T9.002 chain in which the manipulated price feed is not an external oracle (e.g., Chainlink) but the protocol's own Curve pool that it uses for internal asset-price calculation. The incident demonstrates that a protocol's use of its own liquidity pool as a price reference creates a reflexive vulnerability: the attacker manipulates the pool to inflate the protocol's internal valuation of its own tokens, then mints protocol tokens at the inflated rate and redeems them for the pool's underlying reserves at a profit — the pool is simultaneously the price source, the minting reference, and the extraction vector.

Summary

Zunami Protocol was a yield-aggregation protocol on Ethereum that issued zStables (zUSD, zETH) — stablecoins backed by Curve Finance LP tokens deposited into the Zunami pool. Users deposited stablecoins into Zunami, which in turn deposited the stablecoins into Curve pools (primarily the Curve 3pool for USD-stablecoin assets and the Curve ETH/stETH pool for ETH-denominated assets). Users received zStables in return, representing their share of the underlying Curve LP position.

On 2023-08-13, an attacker exploited Zunami's price-calculation mechanism. Zunami calculated the on-chain price of its zStables by referencing the exchange rate of its Curve pool. The attacker executed a flash loan from Balancer (~$4.5M in USDC/DAI), used a portion of the borrowed funds to perform a large swap on the Curve pool — manipulating the pool's exchange rate and artificially inflating the reported price of Zunami's zStable tokens — then, with the manipulated price, deposited into Zunami to mint a disproportionately large amount of zStables. The attacker then redeemed the zStables for the underlying Curve LP tokens, extracting more value than the deposit was worth. The attacker repeated this in two transactions across two blocks, extracting a total of 1,152 ETH.

The funds were laundered through Tornado Cash on Ethereum shortly after extraction. Zunami acknowledged the exploit within hours and published a post-mortem identifying the price-manipulation root cause. The protocol's TVL was effectively wiped out by the drain.

Timeline (UTC)

When Event OAK ref
2023-08-13 ~17:50 Attacker takes flash loan from Balancer: ~$4.5M in USDC/DAI equivalent T9.002 (flash-loan capital source)
2023-08-13 ~17:55 Attacker executes large swap on Zunami's Curve pool, artificially inflating zStable exchange rate T9.001 (internal-pool price manipulation)
2023-08-13 ~17:55 (same block) Attacker deposits at manipulated rate to mint excess zStables, then redeems for underlying Curve LP tokens — extracts ~1,078 ETH (first transaction) T9.001 + T9.002 (combined extraction)
2023-08-13 ~18:05 Second exploit transaction: smaller repetition — extracts ~74 ETH T9.001 + T9.002 (repeat)
2023-08-13 ~18:30 Zunami team confirms exploit; protocol paused; post-mortem analysis begins (defender response)
2023-08-13 ~19:00 Attacker routes 1,152 ETH through Tornado Cash T7.001 (mixer-routed laundering)
2023-08-14 Zunami publishes post-mortem; on-chain analytics firms confirm price-manipulation root cause (forensic analysis)

Realised extraction

Approximately 1,152 ETH (~$2.1M) in total, laundered through Tornado Cash. No funds were recovered.

T9.001 classification

The Zunami exploit is classified under OAK-T9.001 (Oracle Price Manipulation) in the internal-pool-as-oracle sub-shape. Unlike the classic external-price-oracle manipulation case (e.g., bZx February 2020, where the attacker manipulated the Kyber/Uniswap price feed that the bZx protocol read as an external oracle), Zunami's price reference was its own Curve pool — a pool in which the protocol's own assets were deposited and that the protocol itself used to calculate the on-chain exchange rate of its zStable tokens. The attacker did not need to manipulate an external oracle because Zunami's internal price feed was directly influenced by the pool's state, and the pool's state could be manipulated by a flash-loan-funded swap. This is the reflexive-oracle sub-shape of T9.001 — the protocol is both the consumer and the target of the manipulated price signal.

T9.002 classification

The exploit required initial capital (approximately $4.5M) to execute the price-manipulating swap on the Curve pool. The attacker sourced this capital through a Balancer flash loan — borrowed and repaid within the same transaction — meaning the attacker committed zero own capital to the exploit. This is the canonical OAK-T9.002 (Flash-Loan-Enabled Exploit) pattern: the flash loan provides the temporary capital to distort a price signal, the protocol's internal logic acts on the distorted signal to the attacker's benefit, and the loan is repaid from the extracted profit within the same atomic block.

Cross-reference — reflexive-oracle class

The Zunami reflexive-oracle pattern (protocol uses its own pool as a price reference) is structurally analogous to the following OAK incidents where a protocol's internal price signal was the manipulated surface:

  • bZx February 2020 (external oracle: Kyber/Uniswap price feed consumed by bZx) — T9.001 + T9.002
  • Harvest Finance October 2020 (external oracle: Curve pool price consumed by Harvest) — T9.001 + T9.002
  • Cream Finance October 2021 (external oracle: yUSD pool price consumed by Cream via Yearn) — T9.001 + T9.002
  • Zunami August 2023 (internal oracle: Zunami's own Curve pool price) — T9.001 + T9.002

The distinction between the external-oracle and internal-oracle sub-shapes in T9.001 at v0.1 is that the internal-oracle case reflects a protocol-design decision (using one's own pool as the price reference) that creates a structural reflexive vulnerability, whereas the external-oracle case reflects an oracle-dependency decision (choosing which external feed to trust). The Zunami case anchors the internal-oracle sub-shape for events from 2023 onward.

Public references

  • Zunami Protocol, "Zunami Exploit Post-Mortem," August 14, 2023 (via Medium)
  • PeckShield, "Zunami Protocol — Price Manipulation via Curve Pool," August 13, 2023
  • CertiK, "Zunami Protocol Exploit Alert," Twitter (@CertiKAlert), August 13, 2023
  • Beosin, "Zunami Protocol Attack Analysis," August 14, 2023
  • Etherscan — attacker address, exploit transaction hashes, Tornado Cash routing (August 13, 2023)

Techniques demonstrated (2)