Stanley the Bugman Rug Pull

Reported loss $114K
Rugpull

What happened

Stanley the Bugman (BUGMAN) is an ERC-20 on Ethereum whose verified contract 0x59C2aC21…52Cf80 has no owner (ownership is set to the zero address in the constructor) and advertises a 1-2% buy and 2-4% sell tax. In the transfer function, a call to an unverified contract at 0x551464e9…abedac is disguised as a tax discount: if that contract returns a non-zero value for the sending address, the transfer reverts, and the advertised tax is never actually charged. De.Fi's REKT database lists the incident as an exit scam on 3 October 2023 in which the deployer 0x0acc2e47…26cE79 removed 96.83 WETH, about 159,039 USD, from the Uniswap pool roughly 18 hours after adding it.

De.Fi says half of the proceeds went to another EOA, 0xe697EAb7…d4Ac8a, and from there into Tornado Cash, while the remaining 49.67 ETH was held at 0x1ca57014…A06538 as of 3 October 2023. Liquidity removal transaction: 0x8fc1a474…8b0a8f.

How it happened

  1. The constructor sets the owner to nobody: address msgSender = address(0); _owner = msgSender;. The token has no owner-gated switches, so its control is somewhere else. uniswapV2Pair is declared but never assigned in this source, so the buy/sell tax branches, max-transaction and max-wallet checks that compare against it never match a real pair.
  2. In _transfer the tax is computed as taxAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100);, which is non-zero for any normal amount, so the next block always runs.
  3. That block zeroes the tax and calls out: taxAmount = 0; uint160 tokenBalance = 485719020939537256468196668997616180115360443820; uint256 taxDiscount = IUniswapV2Pair(address(tokenBalance)).balanceOf(from); taxAmount -= taxDiscount;. The number converts to the address 0x551464e9…abedac, a contract whose Etherscan page shows no verified source.
  4. Because the Solidity 0.8.19 subtraction is checked, 0 - taxDiscount reverts whenever that contract returns anything above zero for from. Whoever controls that contract can therefore stop any address from sending BUGMAN: a holder who sells through the router is blocked because the router moves their tokens with transferFrom and from is the holder, and listing the pair address would block buys. If the contract returns zero, taxAmount stays 0 and the balances move untaxed (_balances[from]=_balances[from].sub(amount); _balances[to]=_balances[to].add(amount.sub(taxAmount));), so the 1-4% tax in the code is never collected. If the address had no code, every taxed transfer would revert.
  5. What was reported: De.Fi lists the removal of 96.83 WETH (about 159,039 USD) by the deployer about 18 hours after liquidity was added, and Cyvers' alert lists the same removal transaction ($163.7K) among four rug pulls, saying most of the proceeds were routed to Tornado Cash through intermediary addresses. No opened source shows which addresses, if any, the external contract flagged, so the code shows a hidden blocking control, not that it was used.

Protocol details

Classification Token
Protocol Type Exit Scam/Rugpull
Affected asset / contract BUGMAN

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.