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.…