JNB Token Rug Pull
What happened
JNB is a BEP20 on BNB Smart Chain whose code gives the owner several ways to trap holders: an unlimited blacklist, an uncapped trade-fee setter and a fee-swap routine that can be made to revert on every sell. A CertiK Skynet alert on February 28, 2023 reported JNB down more than 98% after two EOAs, 0xD05 and 0x024, sold JNB for a total of about 106K USD. De.Fi's REKT database lists the same day as a rugpull by the initial token holders for 106,497 USD, with the two addresses below draining the PancakeSwap pool and the proceeds spread across several EOAs.
The code shows what the owner can do; the sources opened here do not show that any of these controls was used.
(from the De.Fi listing):
- Address: 0x024ea85a…ccd0e8
- Address: 0xd050e636…779464
- Draining transactions: 0x0bc8451a…00a5b5, 0x8c3425a1…3a7965
How it happened
What the code allows:
- Every transfer to or from the pair address pays a fee debited from the sender's balance:
uint256 TFee = amount.mul(buyTaxFee).div(100);followed bydoTransfer(from, address(this), TFee);. As deployedbuyTaxFeeis 15 (the source comment says 2%), and it applies to sells as well as buys because the check isif(from == uniswapV2Pair || recipient == uniswapV2Pair). - The owner can set that fee to any
uint8value withsetbuyTaxFee; there is no cap. At 100 the whole amount goes to the contract and the recipient of the trade receives 0; above 100 theamount.sub(TFee)step reverts, so trades through the pair fail. - The owner can blacklist any address with
addBlackListorsetIsBlackList._transferrequiresisBlackList[from] == falseandisBlackList[recipient] == false, andtransferFrompasses the holder asfrom, so a blacklisted holder can neither sell through the router nor receive tokens. - Before every transfer to the pair,
_transfercallsswapRewardToken(), which computes_balances[address(this)].mul(exchangeFee).div(100). The owner can setexchangeFeeabove 100 withsetexchangeFee; the swap then tries to move more tokens than the contract holds and reverts, which blocks every sell while the contract holds any fee tokens. Buys (from == uniswapV2Pair) do not call it. WithexchangeFeeat or below 100 the routine sells that share of the collected fee tokens for USDT and sends it towalletTaxwith a minimum output of 0, andwalletTaxis owner-settable. - The owner can also pull any token or the BNB held by the contract with
rescueTokenandrescueBNB.
6. CertiK reported on February 28, 2023 that two EOAs sold JNB for about 106K USD in total and the price fell more than 98%. The sources opened do not show whether the blacklist, fee or exchangeFee controls were used in that event, or the relationship between the two sellers and the deployer 0x06d19456…CeeA64.
Protocol details
Evidence
- report @CertiKAlert incident report twitter.com
- report CertiKAlert Skynet post on JNB, 2023-02-28 (read via fxtwitter) twitter.com
- transaction bscscan.com transaction 0x0bc8…a5b5 bscscan.com
- transaction bscscan.com transaction 0x8c34…7965 bscscan.com
- address JNB verified source on BscScan bscscan.com
- address bscscan.com address 0x024e…d0e8 bscscan.com
- address bscscan.com address 0xd050…9464 bscscan.com
- analysis Sourcify match for 0x9119e3f30c18b9e6b16ab6589534391e5e4a5653 repo.sourcify.dev
- analysis De.Fi REKT database listing for JNB (text as supplied in the job metadata; page not opened) de.fi
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.