Reproduced Exploit

Rubicon — Migration can underpay users via price manipulation

migrate redeems V1 then mints V2 with no minOut; low-liquidity exchangeRate inflation rounds victim to 0 shares.

Apr 2023Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Apr 2023

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: 48953-h-14-users-might-get-less-assets-than-expected-upon-migratio. Standalone Foundry PoC and full write-up: 48953-h-14-users-might-get-less-assets-than-expected-upon-migratio_exp in the evm-hack-registry mirror.


Vulnerability classes: spot-price · price-manipulation · fot-slippage

Reproduction: self-contained Foundry PoC with only forge-std — no fork, no RPC. Full trace: output.txt. PoC: test/48953-h-14-users-might-get-less-assets-than-expected-upon-migratio_exp.sol.


Key info#

ImpactHIGH — V2Migrator.migrate has no slippage guard; inflated BathV2 rate can mint 0 shares and enable drain
ProtocolRubicon
Bug classspot-price · price-manipulation · fot-slippage
FindingCode4rena 2023-04-rubicon · #48953 · H-14 · reporter 0xNineDec
Reportcode4rena.com/reports/2023-04-rubicon
SourceAuditVault
StatusConfirmed. Reproduced as a standalone local synthetic.
Compiler^0.8.24 (PoC)

TL;DR#

migrate redeems V1 then mints V2 with no minOut; low-liquidity exchangeRate inflation rounds victim to 0 shares.


The vulnerable code#

See synthetic test/48953-h-14-users-might-get-less-assets-than-expected-upon-migratio.sol (@> VULN markers).

Fix: Require min shares out / simulate redeem and bind underlying received.


Root cause#

migrate redeems V1 then mints V2 with no minOut; low-liquidity exchangeRate inflation rounds victim to 0 shares.


Preconditions#

Protocol deployed with the vulnerable code paths from the Code4rena contest.


Attack walkthrough#

See PoC run() and output.txt.


Diagrams#

sequenceDiagram participant User participant Protocol User->>Protocol: trigger vulnerable path Protocol->>Protocol: hit @> VULN line Protocol-->>User: harm realized

Impact#

V2Migrator.migrate has no slippage guard; inflated BathV2 rate can mint 0 shares and enable drain


Taxonomy#

  • genome: spot-price · price-manipulation · fot-slippage
  • severity/high · platform/code4rena

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.