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.

Jun 2025Otherlogic2 min read

Chain

Other

Category

logic

Date

Jun 2025

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: 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-registry mirror.


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#

ImpactHIGH — wrong NAV → excess deposit shares → extract 100e18 from LPs
ProtocolPanoptic Hypovault / PanopticVaultAccountant
Vulnerable codepoolExposure1 = long.left - short.left (reversed)
Bug classSign / operand swap in premium accounting
FindingCode4rena 2025-06-panoptic-hypovault · #62092 · H-01 · 0xAura
Reportcode4rena 2025-06-panoptic-hypovault
SourceAuditVault
StatusAudit finding. Reproduced as a standalone local PoC.
Compiler^0.8.24 (PoC)

TL;DR#

  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.

The vulnerable code#

SOLIDITY
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#

  1. Premiums: short (200,150), long (50,50) → correct net +250; buggy net +50.
  2. Vault cash 1000 → buggy NAV 1050 vs correct 1250.
  3. Deposit 1050 against 1050 NAV → 1000 shares (fair ~840).
  4. Redeem against true value → +100e18 profit.

Diagrams#

flowchart TD A["shortPremium / longPremium"] --> B["poolExposure0 = short - long OK"] A --> C["poolExposure1 = long - short WRONG"] B --> D["NAV understated"] C --> D D --> E["deposit mints excess shares"] E --> F["redeem extracts LP value"]

Impact#

All deposits/withdrawals priced off computeNAV mis-value token1 premium exposure. Users can systematically over-mint shares or under-receive assets.

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.