A flash-loan-funded attacker walked Ambient Finance's CrocSwapDex ETH/USDC pool across roughly 10,400 ticks, minted a narrow concentrated-liquidity range at the manipulated price, and harvested its fee rewards through a code path that never checks the position's minimum dwell time, netting a reported 67.85 ETH on Ethereum on June 7, 2026.
Security ·
Logged as “2026-06-07: Native Surplus Accounting Flaw on AmbientCrocSwapDex”.
Ambient Finance (built as CrocSwap, and still named that way inside its contracts) runs its exchange through one monolithic contract, CrocSwapDex at 0xAaAaAAAaA24eEeb8d57D431224f73832bC34f688 on Ethereum, which delegatecalls into sidecar proxies for trading, liquidity provision, and account bookkeeping instead of deploying a separate contract per pool. One of those sidecars, `ColdPath`, keeps a per-user ledger called surplus collateral: a user deposits ETH or a token once with depositSurplus (userCmd code 73) and can then draw on that internal balance across later calls without sending msg.value again, finishing with disburseSurplus (code 74) to withdraw whatever is left. That ledger is not the bug. It is the plumbing that let the attacker chain thirteen swaps, a mint, and a harvest inside one transaction funded by a single flash loan.
The actual gap sits in a different sidecar. `WarmPath.harvest`, reachable through userCmd callpath 2 with code 5 (HARVEST_LP in the `ProtocolCmd` library), calls `PositionRegistrar.harvestPosLiq` to pay out a concentrated liquidity position's accumulated fee mileage. harvestPosLiq never calls assertJitSafe. Full or partial withdrawal of a position, through burnPosLiq, does call it, checking the position's timestamp_ against the pool's jitThresh to stop liquidity that shows up only to catch a single trade's fee and then leave. A position can be minted and have its fee mileage harvested in the same block, in the same transaction, with no dwell time enforced at all.
The attack contract, deployed by 0x0000000000037E625B2502C26029Aea237f102aF at 0xAAC14D196A9E27923A92D8e87E3b6A5DCD4fEc1B, ran the following sequence:
CrocSwapDex (code 73), consuming msg.value once for the rest of the transaction.MINT_RANGE_LIQ_LP, callpath 2) with 19.1 billion liquidity units, sized to dwarf whatever real liquidity already sat in that band.HARVEST_LP on that position, pulling its fee mileage out through harvestPosLiq with no resting-time check to block it.Etherscan's record of the attack transaction, 0xb2fc668c42623261074de6fc30d583efede2b0e20d7aded42b7b634f9322ff52, shows CrocSwapDex paying out 83.72 WETH to the attack contract. Against the 50 WETH owed back to Balancer, that leaves 33.72 WETH. The same transaction shows 55,913.81 USDC pulled from the pool and routed through Uniswap V3 via the Universal Router for 34.13 ETH. The two remainders add to 67.85 ETH, the net loss DeFiHackLabs reports for the incident after the final USDC-to-WETH conversion and ETH forwarding its proof of concept describes. No dollar figure for the loss appears in any source read for this incident.
No post-mortem, bounty notice, or compensation announcement from Ambient Finance about this transaction is available. The protocol did face a separate, later incident in which its website's nameservers were hijacked to serve a phishing frontend, attributed by the security firm Blockaid to the group Inferno Drainer. That attack touched only the front end and left the contracts untouched, and it is a different incident from the accounting gap exploited here.
The closest match on this site for mechanism is KolanHook, where a flash loan from Balancer funded a spot-price walk on a Uniswap V4 pool with no TWAP check, mispositioned escrowed liquidity at the manipulated price, and reversed the swap back through that liquidity before repaying the loan. Ambient's version swaps a mispositioned buy window for a harvestable position, and an ungated accept call for a missing assertJitSafe check, but the shape is the same: flash loan, manipulate price, exploit a freshly placed position, reverse, repay.
The fix is narrow: either extend assertJitSafe's dwell-time check to harvestPosLiq, the way it already applies to burnPosLiq, or scale the fee mileage a freshly minted position can harvest by how long it has actually rested rather than paying out the full raw delta since mint.
Query every incident yourself — free, no signup
Updated 9 Nov 2026. Figures are as reported by the sources listed above and are not independently verified.