Reproduced Exploit
Panoptic Hypovault — poolExposure1 premium operands reversed
1. Short premium is an asset; long premium is a liability. 2. poolExposure0 correctly does short − long; poolExposure1 reverses operands. 3. NAV understated (1050 vs 1250); deposit mints excess shares; redeem profits 100e18.
Chain
Other
Category
logic
Date
Jun 2025
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
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.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 62092-h-01-the-poolexposure-for-token1-is-erroneously-calculated-a. Standalone Foundry PoC and full write-up: 62092-h-01-the-poolexposure-for-token1-is-erroneously-calculated-a_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/logic/wrong-math · impact/loss-of-funds/direct-drain · stale-price
Reproduction: self-contained Foundry PoC with only
forge-std. Full trace: output.txt. PoC: test/62092-h-01-the-poolexposure-for-token1-is-erroneously-calculated-a_exp.sol.
AuditVault taxonomy: severity/high · sector/perpetuals · sector/oracle · platform/code4rena · defi/price-manipulation
Key info#
| Impact | HIGH — wrong NAV → excess deposit shares → extract 100e18 from LPs |
| Protocol | Panoptic Hypovault / PanopticVaultAccountant |
| Vulnerable code | poolExposure1 = long.left - short.left (reversed) |
| Bug class | Sign / operand swap in premium accounting |
| Finding | Code4rena 2025-06-panoptic-hypovault · #62092 · H-01 · 0xAura |
| Report | code4rena 2025-06-panoptic-hypovault |
| Source | AuditVault |
| Status | Audit finding. Reproduced as a standalone local PoC. |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
- Short premium is an asset; long premium is a liability.
poolExposure0correctly does short − long;poolExposure1reverses operands.- NAV understated (1050 vs 1250); deposit mints excess shares; redeem profits 100e18.
The vulnerable code#
poolExposure0 = int256(uint256(shortPremium.rightSlot())) - int256(uint256(longPremium.rightSlot()));
poolExposure1 = int256(uint256(longPremium.leftSlot()))
- int256(uint256(shortPremium.leftSlot())); // @> VULN
// FIX: short.left - long.left
Root cause#
getAccumulatedFeesAndPositionsData returns short (owed to vault) and long (owed by vault). Token1 exposure subtracts short from long instead of the reverse, flipping the premium contribution for token1.
Attack walkthrough#
- Premiums: short (200,150), long (50,50) → correct net +250; buggy net +50.
- Vault cash 1000 → buggy NAV 1050 vs correct 1250.
- Deposit 1050 against 1050 NAV → 1000 shares (fair ~840).
- Redeem against true value → +100e18 profit.
Diagrams#
Impact#
All deposits/withdrawals priced off computeNAV mis-value token1 premium exposure. Users can systematically over-mint shares or under-receive assets.
Sources#
- AuditVault finding #62092
- Code4rena 2025-06-panoptic-hypovault
- Reduced source:
PanopticVaultAccountant.sol@code-423n4/2025-06-panoptic@8ef6d86
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 62092-h-01-the-poolexposure-for-token1-is-erroneously-calculated-a_exp (evm-hack-registry mirror).
- AuditVault finding: 62092-h-01-the-poolexposure-for-token1-is-erroneously-calculated-a.
Alerts & third-party analyses
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.