A reentrancy gap in Joe Agent's removeLiquidityViaContract, which paid out BNB before zeroing the caller's recorded LP balance, let an attacker re-enter the withdrawal 25 times against one funded position for roughly $45,000 (62.5 BNB plus about 1.2 million JOE), confirmed on-chain as one transaction against the attack contract.
Security ·
Logged as “2026-05-27: Reentrancy In Removeliquidityviacontract on Joe Agent”.
Joe Agent let a user park BNB inside the JOE token contract itself rather than through PancakeSwap's router: zapNativeForLP swaps part of the BNB for JOE, adds both sides to the JOE/WBNB pair at 0x7e5396A6b56372D1Ee42ab6b199bc2d5A8540f9c, and records the resulting LP size in lpInfo[user].lpAmount. Getting it back out works the opposite way, through removeLiquidityViaContract(liquidity, amountTokenMin, amountETHMin, deadline), which burns that LP against the pair, unwraps the WBNB side, and forwards the BNB to the caller with a low-level call. The contract updates lpInfo[user].lpAmount only after that call returns, a checks-effects-interactions violation that leaves the recorded balance untouched for the length of the external transfer.
An attacker contract with a receive() hook turns that gap into a drain. On May 27, 2026, at block 100,812,531, an attacker zapped 5 BNB into a single position through a registered referrer, recorded as roughly 437 LP in lpInfo, then called removeLiquidityViaContract once with that LP amount. The first call's BNB payout landed at the attacker contract before lpAmount had been zeroed, so its receive() function called removeLiquidityViaContract again with the same, still-valid liquidity figure. Each re-entry passed the contract's only check, that the requested liquidity did not exceed lpInfo[user].lpAmount, because that field had not moved. The reconstruction loops this 25 times, draining roughly 2.5 BNB-equivalent per call for a one-position total of 62.5 BNB, plus the JOE side of every one of those 25 burns, for about 1,195,918 JOE, against a position that had only ever been funded once.
The attacker EOA, 0xAA761779945dCC5f26064fC6dCb36FFaB6AC7610, routed the proceeds through an attack contract at 0x31F81FCD91025728F24bD6f0E4EfB156e345A4CF; the drain itself sits in transaction 0xd16a1c3dcd84427b2c7dcccbe1854c1c5bf65900460e1a44a95c1aaaf140c3a5 on BNB Smart Chain. The transaction's on-chain record confirms that detail independently of the PoC: its sender is that same attacker address, its recipient is the attack contract, and it sits in block 100,812,531, mined at 22:41:03 UTC on May 27, 2026, the same block the PoC forks from. SlowMist flagged the incident on X the same week, but no write-up from a security firm, a news outlet, or the JOE team has surfaced since. Neither the proxy contract nor its implementation is verified on BscScan. The implementation address's source code has not been published on Sourcify either, and the proxy address's own Sourcify match resolves to a generic OpenZeppelin ERC1967Proxy verified under an unrelated project, since that proxy's delegating bytecode is identical across many unconnected deployments and carries no Joe Agent-specific logic. The deployed Solidity cannot be read directly. The mechanism described here comes from DeFiHackLabs' proof of concept and its own root-cause comments, which name the specific functions, the pair address, and the ordering of the external call against the state write; the attacker, the attack contract, the block and the date are independently corroborated by the transaction's own on-chain record.
DeFiHackLabs puts the total loss at roughly $45,000, made up of the 62.5 BNB and 1.196 million JOE named above; DeFiLlama's hacks database carries no separate entry for this incident, so no second figure exists to compare it against. A removeLiquidityViaContract that zeroed or decremented lpInfo[user].lpAmount before sending BNB out, rather than after, would have closed the gap outright, as would a standard reentrancy guard on the function. No statement from the JOE team about the incident could be found.
Query every incident yourself — free, no signup
Updated 9 Nov 2026. Figures are as reported by the sources listed above and are not independently verified.