Reproduced Exploit

Cork — Insufficient slippage protection in `redeemEarlyLv` leads to MEV via flash swaps

1. redeemEarlyLv takes amountOutMin and checks it only against RA from the AMM. 2. CT / DS / PA received have no floors. 3. Attacker skews the RA/CT pool (e.g. flash-style RA→CT swap) so the redeem still clears the RA min but CT is worse. 4. User's basket is value-extracted on the unprotected legs.

Dec 2024Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Dec 2024

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: 53126-insufficient-slippage-protection-in-redeemearlylv-leads-to-m. Standalone Foundry PoC and full write-up: 53126-insufficient-slippage-protection-in-redeemearlylv-leads-to-m_exp in the evm-hack-registry mirror.


Vulnerability classes: impact/mev/frontrun · fot-slippage · spot-price

Reproduction: self-contained Foundry PoC with only forge-std — no fork. output.txt · test/53126-…_exp.sol.

AuditVault taxonomy: lang/solidity · sector/dex · platform/cantina · severity/high · genome: spot-price · frontrun · fot-slippage


Key info#

ImpactHIGH — early LV redemption only floors RA; CT/DS/PA can be skewed by AMM manipulation while RA min still passes
ProtocolCork Protocol — VaultCore.redeemEarlyLv
Vulnerable codeOnly result.raReceivedFromAmm < amountOutMin is checked
Bug classIncomplete multi-asset slippage protection
FindingCantina — Cork, December 2024 · #53126 · reporter Sujith Somraaj
Reportcantina_competition_cork_december2024.pdf
SourceAuditVault
FixCork PR 280 — add min-out params for CT/DS/PA
Compiler^0.8.24 (PoC)

TL;DR#

  1. redeemEarlyLv takes amountOutMin and checks it only against RA from the AMM.
  2. CT / DS / PA received have no floors.
  3. Attacker skews the RA/CT pool (e.g. flash-style RA→CT swap) so the redeem still clears the RA min but CT is worse.
  4. User's basket is value-extracted on the unprotected legs.

Diagrams#

sequenceDiagram participant A as Attacker participant P as RA/CT AMM participant U as User participant V as VaultCore A->>P: Skew pool RA-heavy CT-light U->>V: redeemEarlyLv amountOutMin=RA_floor V->>P: removeLiquidity P-->>V: more RA, less CT V->>V: RA min passes#59; CT unchecked V-->>U: unfavorable basket

Impact#

MEV extraction from early LV redeemers; incomplete slippage surface on multi-asset exit.

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.