CargoX 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
- 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 asuniswapV2Pair._feeEnabledstarts asfalse, so early transfers and sells behave normally. - 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. - With the fee on,
_transfertakes the special branch when_feeEnabled && to == uniswapV2Pair && from != address(uniswapV2Router) && from != _owner && from != address(this). A holder selling through the router is thefromaddress, so the branch applies; the owner, the router and the token contract itself are exempt. - In that branch
_balances[from] = sub(_balances[from], amount)runs first, so the seller loses the full amount. Thenuint256 fee = mul(div(amount, 100), 100);makes the fee equal toamountrounded down to a multiple of 100, and the pair is creditedsub(amount, fee), which isamount % 100raw units (under 0.0000001 CXO at 9 decimals). - 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
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.