GDC's $34.5K Loss and How Olympix Would Have Prevented It
At 07:40:32 UTC on November 9, 2026, in BNB Smart Chain block 132,546,183, GDC's PancakeSwap V2 pair lost 51.225527 WBNB, about $34.5K, in a single transaction. GDC's own token contract did the damage, by calling out to addresses it didn't control in the middle of a sell and then telling its pair to accept whatever balances it found afterward.
The trick only worked because two pieces of GDC's sell logic ran in the wrong order. Reward callbacks went out before the trade settled, and a reserve adjustment then committed the result as the pool's official state. Each piece made sense to the team that wrote it. Together they handed a stranger the pen.
A Sell Path With Moving Parts
GDC routes extra work through every sale into its GDC/WBNB pair. According to ExVul's analysis, the sell path in GDCToken._transfer checks a 10% sell limit and sets a reserve-floor mode, then GDCMain.onSellRewards pays reward callbacks to referral recipients. After that, a function called _applyReserveFloorDistribution removes the full gross sell amount from the pair and calls sync(), and only then does the outer transfer credit 30% of the sale to the pair.
In a PancakeSwap V2 pair, sync() tells the pool to adopt its current token balances as its reserves. The constant-product price comes from those reserves. Any code that calls sync() is vouching for the balances it's about to lock in, so it has to be sure nobody else has been rearranging them.
Referral Accounts That Could Act
The referral callbacks were the door. A referral payout is supposed to be a passive transfer to a wallet. Under EIP-7702, a regular wallet can delegate to contract code, which means a call that looks like a payment to a wallet can now run whatever logic that wallet has delegated to.
ExVul says the attacker used two EIP-7702 delegated referral accounts. When GDCMain.onSellRewards called them during a sell, they used the moment to trade against the GDC/WBNB pair while GDC's sell was still in progress. The pair was mid-operation and nothing in GDC's sell path checked whether its state had changed before the next step ran.
How the Drain Played Out
ExVul's analysis lays the transaction out step by step. The attacker brought more than 806,000 BNB and WBNB of atomic capital, liquidity borrowed and repaid inside the same transaction, and started a sell of GDC. GDCToken._transfer checked the sell limit and froze the reserve-floor mode while the pair still held about 21 million GDC.
Then GDCMain.onSellRewards called the delegated referral accounts. Inside those callbacks, the attacker pushed 804,812 WBNB into the pair and swapped the pair's GDC side down until it held only the gross sell amount.
Next, GDCToken._applyReserveFloorDistribution did what it was built to do. It removed the full gross sell amount from the pair and called sync(). Because the callbacks had already shrunk the GDC side to exactly that amount, the pair's reserves now read 66 wei of GDC against 806,382 WBNB.
Finally, the outer transfer credited the pair with 30% of the sale. Against a pool holding 66 wei of GDC, that credit looked like an enormous input, and the AMM paid out almost all of its WBNB. The attacker returned the borrowed capital, and the pair ended the transaction 51.225527 WBNB lighter. According to ExVul, the attacker's wallet came out 50.008850 BNB ahead after gas, having spent 41,047.699285 GDC it already held.
As of November 14, 2026, we couldn't find a public statement or post-mortem from the GDC team.
Why the Order of Operations Was the Bug
Each step in GDC's sell path is defensible in isolation. Paying referrers is a growth mechanic. A reserve floor is a tokenomics choice. Calling sync() keeps the pair's accounting tidy. The flaw is in the sequence: an external call to an address GDC didn't control, followed by a sync() on a pair that address could reach, with the pool's balances trusted in between.
Settling first and paying later would have closed the window. If referral rewards accrued to an internal ledger during the sell and recipients claimed them in a separate transaction, no outside code would run while the pair was half-updated, and sync() would only ever commit balances GDC itself had produced.
It's a close relative of the bug that cost TENDRIL $556K earlier this month, where a sell tax burned tokens out of the PancakeSwap pair and resynced its reserves mid-sale. Token contracts that reach into their own pools during a transfer keep turning the pool's reserves into something an attacker can steer.
How Olympix Would Have Caught the Mid-Sell Callback
Olympix reads a contract as states, transitions and entry points, and takes in context to infer the invariants it depends on. In GDC's case the key state is the pair's reserves, the key transition is a sell, and the entry point that matters is the referral callback, because it hands control to an address the token doesn't own.
Static analysis would have surfaced the signal here: an external call to a caller-influenced address inside the sell path, followed on the same path by a sync() on the pair that the callee can reach. The engine uses a signal like that to narrow from every path through _transfer to the feasible ones, and from those to the paths that touch the reserve invariant.
That invariant is simple to state. During a sell, the reserves GDC commits with sync() must reflect only GDC's own transfers, with no outside trade landing between the reserve-floor check and the commit. BugPoCer starts from an invariant like that and searches outward through the system for a sequence of state changes that breaks it. Had the GDC team run it, it would have tried referral recipients that execute code, found that a callback can trade against the pair before _applyReserveFloorDistribution calls sync(), and followed the result through to the 30% credit.
BugPoCer would have returned that sequence as a counterexample, with the minimal conditions it needs, such as a referral recipient running delegated code and enough flash capital to move the pair, and a generated Forge test that replays it. That would have been the November 9 drain, produced in development. Because Olympix runs at every merge and before release, the change that put onSellRewards in front of the reserve sync would have been tested when it landed.
Pools Are Not Scratch Space
A token contract that edits its own liquidity pool during a transfer is making promises on the pool's behalf. Every external call made before those edits finish is a chance for someone else to write into the same ledger. EIP-7702 has widened that set to include any wallet that can delegate to code. To see how Olympix would map the external calls and reserve updates in your own token's sell path, and return a working counterexample for each invariant that breaks, book a technical walkthrough.
On-Chain References
Exploit tx: 0x1427...0872
Attacker EOA: 0x0934...125f
Contract called by the attacker: 0xa7d6...8a4b
GDC token: 0x39a9...7777
GDC/WBNB PancakeSwap V2 pair: 0xe334...eb0a
GDCMain (referral callback contract): 0x8955...fd5c
More post-mortems
See every post-mortem →See what Olympix finds on your own code
Send us a repo that's already been audited, and we'll run Olympix at the same commit and show you what comes back.




