Bare Bear Rug Pull
What happened
Bare Bear (BEAR) is an ERC-20 token deployed on Ethereum on 24 July 2023 at 0x9d41227c…e77009, with 6,599,565,555 tokens minted to the deployer 0x65bC21A4…EEBf75. Its constructor sets owner() to the zero address, so it looks renounced, but it also stores a hidden address, 0x66fcf45f…9094af. That address can freeze any holder through a function named Approve (capital A), and anyone can call a public addLiquidity function to credit it with unlimited tokens without changing total supply or emitting a Transfer event.
On 25 July 2023 at 03:46 UTC the deployer withdrew its Uniswap V3 liquidity position in transaction 0xdfd24972…905322, receiving about 109.51 ETH and 2.51 billion BEAR. Cyvers valued the removal at $202.8K and reported the ETH was moved through other addresses to 0x6f7c8980…b352ff; De.Fi's REKT database says it was spread across four wallets.
How it happened
- The
Ownableconstructor calls_setOwner(address(0)), soowner()is the zero address from deployment and noonlyOwnerfunction can run. - The
BareBearconstructor stores thetoken_argument as a hidden role,_tokin.addr = token_; Sourcify's constructor arguments show it is 0x66fcf45f…9094af. The deployer receives the full 6,599,565,555 BEAR supply. Approve(address spender, uint256 amount)only acts when the caller is that hidden address: withamount > 0it sets_decenEx[spender] = spender, flagging the holder.- Every transfer first runs
_chabalen. For a flagged sender it setsamount = _totSuand calls_mins(sender, amount), subtracting the whole total supply from the sender's balance, which underflows and reverts under Solidity 0.8.19. A flagged holder cannot sell or move tokens. addLiquidity(address lpToken, uint256 amount, bool canTrad)is public. WhenlpTokenis the hidden address, it subtractstotalwhiletotalis still 0, then addsamountto the hidden address's balance, so any caller can credit it with any amount;_totSuis unchanged and noTransferevent is emitted.- The recorded loss came from liquidity: in transaction 0xdfd24972…905322 the deployer called
multicallon the Uniswap V3 position manager and withdrew about 109.51 ETH and 2.51 billion BEAR.
Protocol details
Evidence
- report @CyversAlerts incident report twitter.com
- report Cyvers Alerts: deployer of #BEAR has removed 109.5 $ETH twitter.com
- transaction BEAR contract creation transaction etherscan.io
- transaction BEAR liquidity removal transaction 0xdfd24972...5322 etherscan.io
- address BareBear verified source code etherscan.io
- address etherscan.io address 0x65bc…bf75 etherscan.io
- analysis Sourcify match for 0x9d41227c99c75cccbf4fc65cb3585a5798e77009 on Ethereum repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.