An attacker used a 60,000 USDC Aave flash loan to deposit liquidity into PerpPair, Denaria's virtual-AMM perpetual exchange on Linea, then immediately trade against that liquidity to inflate its matrix-tracked LP share and withdraw real USDC collateral through realizePnL. DeFiLlama puts the loss at $165,618, matching the attacker's final on-chain transfer rather than the 165,647.74 USDC the DeFiHackLabs proof of concept states.
Security ·
Logged as “2026-04-05: Virtual Amm Manipulation on PerpPair”.
Denaria ran PerpPair, a virtual-AMM perpetual exchange on Linea, where liquidity providers deposit stable and asset-denominated liquidity tracked through a shared matrix (liquidityM), while the real USDC backing every position sits in a CollateralVault. Opening a trade in trade() does more than move virtual balances between trader and pool: it rewrites liquidityM by an amount scaled to the trade's size against the pool's current globalLiquidityAsset or globalLiquidityStable. Nothing in that update, in addLiquidity(), or in realizePnL() checks that the share of the matrix being credited actually reflects liquidity the beneficiary brought in, or requires that share to have existed for more than one block. realizePnL() reads a liquidity provider's resulting stable and asset balance through calcPnL(), prices it at getPrice(), the Chainlink spot price read live from IOracleMiddleware, and pays the result into real USDC collateral through IVault.addPnlToCollateral. An address can add liquidity, trade against that liquidity in the same transaction, realize the resulting credit, and withdraw it as real USDC with no holding period in between.
The attacker borrowed 60,000 USDC from Aave through a flash loan and repeated the same pattern twice, each time with a fresh liquidity-provider helper contract and a fresh trader helper contract:
addLiquidity() to add stable liquidity to PerpPair.trade() from the trader helper to open a long sized far beyond what the liquidity helper had just deposited, moving liquidityM in the liquidity helper's favor.realizePnL() from the liquidity helper, then call the vault's removeCollateral() to withdraw the resulting credit in real USDC.The attack transaction, confirmed on Lineascan, landed at block timestamp April 5 2026, 09:07:13 UTC, sent from 0x8D67…9Db3. It shows the two removeCollateral withdrawals at 183,283.399597 and 42,364.335584 USDC, and a final transfer to the attacker's account of 165,617.735181 USDC once the 60,030 USDC Aave repayment is subtracted. That is close to, but not identical to, the 165,647.74 USDC figure in the DeFiHackLabs proof of concept's header comment. The two figures differ by exactly 30 USDC, the size of the flash-loan premium. DeFiLlama's hacks list records the loss at $165,618, matching the on-chain transfer rather than the PoC header, and attributes the incident to Denaria, the product name, rather than to PerpPair, which is the name of the vulnerable contract itself.
DeFiLlama's protocol record for Denaria shows the Linea pool's total value collapsing from about $165,446 on April 5 to $197 the next day, and describes the protocol today as one where "trading settles on GMX V2 on Arbitrum One" and "Denaria's original virtual-AMM engine on Linea is now sunset." Denaria's current contracts repository, denaria-perp-arbitrum, keeps the Solidity PerpPair.sol only as a legacy implementation "retained as a reference engine for regression, fuzz, invariant, and differential tests" against a newer Rust-based perp engine. Its architecture notes describe the live oracle component as a TWAPOracleMiddleware handling "Chainlink Data Streams report verification, freshness checks, and TWAP volatility checks," replacing the plain IOracleMiddleware.getPrice() spot read that PerpPair relied on.
KolanHook, exploited on Ethereum in October 2026, shares the same habit without sharing a protocol, a chain, or an asset: it settled escrowed value against a pool's instantaneous spot price with no time-weighting, right after a trade sized to move that price. PerpPair's external spot price never moved; its internal ledger did, through the same absence of any check on what a single trade, paired with a same-block deposit, is allowed to do to an account's recorded share.
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.