Polygon
Accounting error

Chain Games' $20.3K Loss and How Olympix Would Have Prevented It

Loss
Loss
Exploit date
November 15, 2026

Two thousand CHAIN, bought for under ten dollars, became more than 36 million CHAIN in about eleven minutes. Early on November 15, 2026, an attacker took Chain Games' staking contract on Polygon through 360 rounds of the same trick, then pulled the inflated position out through the ordinary withdrawal path and sold it for 20,345.51 USDC. Nothing about the attack needed a flash loan, an oracle or a privileged key. It needed a share transfer that the reward accounting didn't notice.

According to SlowMist, the staking contract failed to synchronize reward checkpoints when shares moved between accounts, so freshly created recipient contracts could claim historical rewards again and again through restake(). SlowMist put the loss at roughly $20,000, and the on-chain swap that turned the stolen CHAIN into stablecoins lands at almost exactly that figure.

A Staking Pool Priced in Shares

Chain Games is a Web3 gaming project, and CHAIN is its token. The victim contract, a TransparentUpgradeableProxy at 0x1cb1...c5a4 on Polygon, held CHAIN deposited by stakers. Like most share-based staking designs, it didn't track each staker's tokens directly. It tracked shares, and those shares picked up value as rewards accrued.

restake() is the compounding button. A staker calls it, the contract works out the rewards that account has earned since it last settled, and those rewards are folded back in as more shares. For that to stay honest, the contract has to remember, for every account, how much of the pool's reward history it has already been paid for. That memory is the checkpoint.

A Reward Ledger That Couldn't Tell Who Was New

Share balances and reward checkpoints describe the same position from two angles. The balance says how big the claim is. The checkpoint says from what point in the pool's history that claim starts earning. Whenever shares change hands, both have to move together, or the recipient's position stops making sense.

In Chain Games' contract, per SlowMist's analysis, a share transfer updated the balance and left the recipient's checkpoint out of sync. A brand-new recipient therefore looked to the reward math like an account that had held its shares through all the rewards the pool had already handed out, without ever collecting them. Calling restake() from that account converted that phantom backlog into real shares.

One round of that is a bug. Run in a loop, it becomes a printing press. Each new recipient contract arrived with a clean slate, claimed rewards that other stakers had already earned, and handed its larger position back to be transferred again.

Neither the proxy's current implementation (0x3362...2a78) nor the contract SlowMist names as vulnerable (0x4b19...7dac) had verified source on Blockscout as of November 17, 2026, so the exact lines aren't public. The mechanism above comes from SlowMist's root cause and from what the transactions show.

Eleven Minutes on Polygon

The attacker's account, 0x571d...776f, had first been funded on October 16, 2026, about a month before it moved. On November 15 the sequence on-chain runs like this.

At 03:23:22 UTC, the attacker swapped 4.78 USDC for 1,000 CHAIN through the Uniswap router and sent the tokens to its attack contract, 0xc11d...91fe. Over the next three minutes it called that contract eleven more times, eight of them through the same function selector. SlowMist counts 360 restake cycles in all. At 03:26:10 it wrapped about 61 POL, swapped it for 4.91 USDC, bought a second 1,000 CHAIN for 4.82 USDC and fed that in too.

At 03:34:05 UTC, a call to the attack contract's claim() function pulled 36,007,148.33 CHAIN out of the staking contract in a single transfer. That's the inflated position going out the front door, through the same withdrawal logic every legitimate staker uses.

At 03:34:56 UTC, the attack contract sold 36,008,148.33 CHAIN, the drained amount plus 1,000 CHAIN left over from the seed, into the CHAIN/USDC pool it had bought from, and received 20,345.51 USDC, which it forwarded to the attacker's account. At the roughly $0.0048 per CHAIN the attacker paid for its seed tokens minutes earlier, the drained CHAIN carried a paper value of about $172,000. The pool couldn't absorb anything close to that, so the realized take was 20,345.51 USDC, which is the figure this post uses.

Where the USDC Went

At 03:37:55 UTC the attacker sent 20,345.70 USDC on to 0x7944...20e7, and about a minute later it sent 100 POL to the same address. Soon after, look-alike USDC and POL transfers involving addresses that mimic 0x7944 started showing up in the account's history, a common address-poisoning pattern that has nothing to do with the exploit.

As of November 17, 2026, Chain Games hadn't published a post-mortem or an incident statement on its X profile, where the pinned post was a November 13 game update. Nothing on-chain shows the funds returning.

How Olympix Would Have Caught the Unsynced Checkpoint

Olympix reads a contract as a system of states, transitions and entry points, and infers the invariants that system depends on from its context. In a share-based staking contract, two pieces of per-account state carry the whole design: the share balance and the reward checkpoint. Every path that moves shares into an account is a transition that has to update both.

Static analysis would have surfaced the signal here: a transfer path that writes the recipient's share balance without bringing the recipient's reward checkpoint up to the current reward index. That mismatch is a concrete pointer to the transition worth attacking.

BugPoCer starts from an invariant and searches for a sequence of calls that breaks it. The invariant for this contract fits in a line: rewards paid out through restake() can never exceed the rewards the pool has actually accrued since each share's holder began holding it. Had the team run BugPoCer on the staking contract, it would have needed only a short sequence to break that rule: stake a small amount, transfer the shares to a new address, call restake() from that address, and compare the shares minted with what the position had earned. That's the November 15 attack at its smallest.

The output would have been a counterexample with the exact state changes, the minimal conditions (a fresh recipient and a nonzero reward history) and a generated Forge test that reproduces the inflation. One failing test like that, produced in development, would have been the 36 million CHAIN drain on a local fork instead of on Polygon. Because those checks run at every merge and before release, the transfer path would have come up for review before it ever held stakers' CHAIN.

Reward checkpoints that ignore new holders are a familiar failure. It's the same stale-baseline pattern that cost NovaBox $107K in June, where a new account joined with its dividend checkpoint left at zero.

Every Door Into a Position Needs the Same Bookkeeping

The lesson for builders is narrow and easy to act on. Any function that gives an account shares, whether it's a deposit, a mint, a transfer or a transferFrom, has to settle that account's pending rewards and move its checkpoint to the current index before the balance changes. Teams usually get the deposit path right because it's the one everyone tests. Transfers are where the accounting tends to drift, because they look like plain token moves.

Testing for it means writing the invariant down and attacking it from every entry point that can hand an account shares. If your protocol pays rewards on shares that can move, book a technical walkthrough.

On-Chain References

Exploit transaction (drain): 0x3705...19b4

Swap to USDC: 0x9ed1...b6ca

USDC sent onward: 0x7cd6...9f93

Attacker EOA: 0x571d...776f

Attack contract: 0xc11d...91fe

Staking contract (victim): 0x1cb1...c5a4

Vulnerable contract (per SlowMist): 0x4b19...7dac

Funds recipient: 0x7944...20e7

CHAIN token: 0xd55f...a509

CHAIN/USDC pool: 0xa4e9...574f

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.