Cook Finance's issuance module let a caller's own weightings set the trade size for a thin Pancake V2 pool and then trade against that pool with no minimum output, draining a CKToken fund's component holdings in two seed-and-issue cycles for a reported ~$50,000. The mechanism is confirmed independently by the module's verified source and the attack transaction's own on-chain record.
Security ·
Logged as “2026-06-27: Price Oracle Manipulation on CookFinanceIssuance”.
Cook Finance runs CKToken index funds, fund-specific tokens similar in concept to Set Protocol's SetToken that represent a basket of underlying components, with an IssuanceModuleV2 contract handling deposits and redemptions. The module's issueWithSingleToken2 function lets a caller mint a CKToken position by supplying a single token, which the module then trades into the basket's actual components through a router, using a weightings array and a midTokens array the caller supplies to control how that trade is routed.
DeFiHackLabs' proof of concept, run against a BNB Smart Chain fork at block 106,740,999, names the attacker as 0xEe18c4c2E123402731f43d680e75ca2809c30f8b, the disposable attack contract as 0xeFFcB496CaE89E7E92abe17d22386345707CEEe4, the issuance module as 0x7Db3CBAf736C049933A3Af28dBeD4A4442aa89d0, and the affected fund as the CKToken at 0xA4e9f6032ee717710D8Fd3dCE0367d283e16f50e, which held eight components. The module's own verified source, on BNB Chain's Sourcify mirror, confirms the mechanism independently of the PoC author's account. Inside _issueWithSpec, the amount of the issue token to sell for each component is computed as _issueTokenQuantity.preciseMul(_weightings[i]), a caller-supplied weighting multiplied by the issue quantity with no check that the result stays within what the caller actually transferred in, so a weighting far above the "percentage" the function's own comment describes can make the module trade for an amount set almost entirely by the caller. Every trade that _issueWithSpec triggers is routed through _trade, which builds its parameters in _createTradeInfo. That function sets tradeInfo.totalReceiveQuantity = 0 unconditionally, meaning the swap through the registered exchange adapter carries no minimum-output floor no matter how thin the pool backing it is. Those two missing checks, not one, are what the thin-pool manipulation exploited.
The attack ran in two near-identical cycles against two different components of the same fund. In the first cycle, the attacker's contract bought small amounts of the fund's first through eighth components with BNB on PancakeSwap, paired each of the others against the first component, and seeded a liquidity pool for each pairing by committing a tenth of whatever balance of the first component remained after each prior pairing was funded. Because that tenth was taken from a shrinking balance, each pool after the one paired with the second component held progressively less of the first component, not a fixed multiple of the others. It then called issueWithSingleToken2 with issueTokenQuantity set to 1, minCkTokenRec set to 0, and a weightings array whose entry for the first component was set to 99.9 percent of the CKToken contract's actual held balance of that component, multiplied by one unit. Routed against the freshly thinned pools under the module's zero-minimum-output trade, that call pulled the targeted share of the fund's real component holdings out to the attacker's contract rather than minting a genuine one-unit position. The attacker then removed the seeded liquidity. The second cycle repeated the same steps using the fund's second component as the base asset. A final pass swapped every recovered component back to BNB through Pancake and forwarded the balance to the attacker's externally-owned account.
The attack itself is confirmed on BNB Smart Chain's own record, independent of both DeFiHackLabs and Cook Finance. The transaction's on-chain record shows the entire sequence above ran as a single contract-creation call from the attacker's address, mined in block 106,741,000 at 20:27:03 UTC on 27 June 2026, one block after the PoC's fork point, carrying 0.02 BNB into the deployed contract's constructor, the same value the PoC's INITIAL_BNB constant funds the attack with. That block time matches the date in the README's heading.
DeFiHackLabs' PoC header states the total loss at about $50,000, and its test asserts the attacker's BNB balance grew by more than 2.7 ether while the fund's holdings of the targeted components fell, which is consistent with, but not the same number as, the headline figure. No other source confirms either number. DeFiLlama's hacks database has no entry for Cook Finance or CookFinanceIssuance around this date. Neither the README entry nor the PoC records any statement from Cook Finance or Cook Protocol acknowledging the incident, pausing the issuance module, or compensating affected fund holders, and no coverage of the event appears on SlowMist's hack archive, rekt.news, or elsewhere.
The fix implied by the verified code is two separate corrections, not one. The per-component trade inside issueWithSingleToken2 needs a non-zero minimum output enforced in _createTradeInfo rather than a hardcoded zero, priced against a reference the caller cannot move in the same transaction. And the amount _issueWithSpec derives from each weighting needs to be bounded by the token quantity the caller actually supplied, rather than trusting an array the function's own comment calls a percentage but never checks sums to one. A caller-supplied weighting that is allowed to set both the trade size and the price it trades at is the same shape of bug regardless of which AMM or which fork of Set Protocol's issuance machinery it sits inside.
Query every incident yourself — free, no signup
Updated 30 Nov 2026. Figures are as reported by the sources listed above and are not independently verified.