CargoX Honeypot

Reported loss Not disclosed
BNB Chain
Honeypot

What happened

De.Fi's REKT database lists the CargoX (CXO) token on BNB Smart Chain as an Exit Scam/Honeypot, stating that the contract owner could disable the transfer function and so restrict users from selling. In the verified code at 0xae08de0f…b36b2f the mechanism is a switchable sell fee: once the owner sets _feeEnabled to true, a sell into the PancakeSwap pair debits the seller's full amount but credits the pair with only the remainder left after rounding the amount down to a multiple of 100 raw units. The fee is the whole rounded amount, so in practice the pair receives almost nothing.

How it happened

  1. The constructor mints the full supply to the deployer, stores it in _owner, and creates a pair on the hard-coded PancakeSwap router 0x10ED43C7…56024E, saved as uniswapV2Pair. _feeEnabled starts as false, so early transfers and sells behave normally.
  2. Only the owner can switch the fee on: function setFeeEnabled(bool feeEnabled) external { require(_owner == msg.sender); _feeEnabled = feeEnabled; }. The contract has no function that changes or renounces _owner.
  3. With the fee on, _transfer takes the special branch when _feeEnabled && to == uniswapV2Pair && from != address(uniswapV2Router) && from != _owner && from != address(this). A holder selling through the router is the from address, so the branch applies; the owner, the router and the token contract itself are exempt.
  4. In that branch _balances[from] = sub(_balances[from], amount) runs first, so the seller loses the full amount. Then uint256 fee = mul(div(amount, 100), 100); makes the fee equal to amount rounded down to a multiple of 100, and the pair is credited sub(amount, fee), which is amount % 100 raw units (under 0.0000001 CXO at 9 decimals).
  5. The fee is not credited to anyone: _totalSupply = sub(_totalSupply, fee) removes it from supply. The pair therefore receives a negligible fraction of every sale, while transfers from the pair (buys) and transfers by the owner are unaffected.

This describes what the code allows. No transaction in the evidence shows the owner calling setFeeEnabled(true) or any sale being affected.

Protocol details

Classification Token
Protocol Type Exit Scam/Honeypot
Affected asset / contract CXO

Build your security review skills

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