Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Hijacking Phantom Shares: How a Cross-Contract Reentrancy in Panoptic Leads to Infinite Supply Inflation

DEV Community·rim dinov·23 days ago
#95BSKXmf
Reading 0:00
15s threshold

In decentralized finance, the order of operations is everything. A single asset transfer executed prior to fully writing internal state changes to storage is one of the oldest and most devastating pitfalls in smart contract security. During an in-depth security audit of the Panoptic protocol, I identified a critical Cross-Contract Reentrancy vulnerability in the CollateralTracker contract. By violating the Checks-Effects-Interactions (CEI) pattern, the protocol allows an attacker to hijack "phantom shares" and trigger an artificial, infinite inflation of the pool's internal supply. In this article, we’ll break down the vulnerability mechanics, analyze the dirty-state flow, and run a complete, functional Proof of Concept (PoC) in Foundry. 1. The Core Concepts: Liquidations & Phantom Shares To incentivize liquidators, protocols often distribute bonuses or execution fees during liquidations. In Panoptic's CollateralTracker , this occurs inside the settleLiquidation function.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More