Reproduced Exploit

ParaSpace — [H-05] Attacker can manipulate low-TVL Uniswap V3 pool to borrow

1. Any UniV3 position whose tokens are listed can be collateral. 2. Value = token amounts in the position × external oracle prices (no pool TVL check). 3. Attacker owns a thin pool, flash-inflates amounts, borrows max, deflates → keeps loan, leaves ~dust collateral.

Nov 2022Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Nov 2022

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 15978-h-05-attacker-can-manipulate-low-tvl-uniswap-v3-pool-to-borr. Standalone Foundry PoC and full write-up: 15978-h-05-attacker-can-manipulate-low-tvl-uniswap-v3-pool-to-borr_exp in the evm-hack-registry mirror.


Vulnerability classes: oracle manipulation · low-liquidity · direct drain / bad debt

Reproduction: self-contained Foundry PoC with only forge-std — no fork. Full trace: output.txt.

AuditVault taxonomy: lang/solidity · platform/code4rena · severity/high · sector/dex · sector/lending · sector/oracle · genome: decimal-mismatch · trigger/low-liquidity · direct-drain · oracle-manipulation-resistance


Key info#

ImpactHIGH — borrow against inflated low-TVL UniV3 LP; leave protocol with bad debt
ProtocolParaSpace
Vulnerable codeUniswapV3OracleWrapper.getTokenPrice — external prices × LP amounts, no TVL whitelist
Bug classManipulable collateral oracle (spot amounts × external prices)
FindingCode4rena 2022-11-paraspace · #15978 (H-05) · reporter minhquanym
Compiler^0.8.24 (PoC)

TL;DR#

  1. Any UniV3 position whose tokens are listed can be collateral.
  2. Value = token amounts in the position × external oracle prices (no pool TVL check).
  3. Attacker owns a thin pool, flash-inflates amounts, borrows max, deflates → keeps loan, leaves ~dust collateral.

The vulnerable code#

SOLIDITY
return ((liquidityAmount0 * price0) / (10 ** dec0)) // @> VULN: external spot x amounts, no TVL/whitelist
    + ((liquidityAmount1 * price1) / (10 ** dec1));

Diagrams#

flowchart LR A["Seed low-TVL pool $200"] --> B["Flash-inflate +3e6 token0"] B --> C["Oracle values LP ~$3mm"] C --> D["Borrow 3e6 DAI"] D --> E["Deflate pool back"] E --> F["Bad debt: 3e6 debt vs ~$200 coll"]

Impact#

PoC harm: 3,000,000 DAI borrowed against an attacker-controlled LP that returns to ~$200 value.

Remediation#

Whitelist UniV3 pools with sufficient TVL; reject thin/attacker-owned pools as collateral.

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.