xMINT BSC Honeypot
What happened
xMINT BSC is a BEP20 token whose verified source lets its owner block selling. The owner can flag any address as a PancakeSwap receiver with setPanCakeSwapReciever, and every transfer whose recipient is flagged reverts with the message "Can not sell this token". Selling through a liquidity pool sends tokens to the pool address, so flagging that address blocks sells while transfers to unflagged addresses, including buys from the pool, keep working.
De.Fi's REKT database lists the token as an exit scam / honeypot, stating that the owner could restrict users from selling; no source opened here shows the flag being set on a pool or any loss amount.
How it happened
- The owner can call
function setPanCakeSwapReciever(address _recipient, bool _feeless) public onlyOwner { ... PanCakeSwapReciever[_recipient] = _feeless; }. The mapping name suggests a DEX pair, but the code applies no check on which address is flagged, and setting it back tofalseundoes the flag. - Every transfer runs
_transfer, which first debits the sender (_balances[sender] = _balances[sender].sub(amount, ...)) and then callscalculateFeesBeforeSend(sender, recipient, amount). - That function contains
if(PanCakeSwapReciever[recipient]){ revert("Error: Can not sell this token"); }. The check is on the recipient, so a transfer into a flagged address reverts as a whole, including the earlier balance debit. A sale through a liquidity pool is atransferFrom(seller, pool, amount), so with the pool flagged every sale reverts. - Transfers where the recipient is not flagged, such as a buy from the pool to a buyer, return
(amount, 0)and succeed. Fees are always zero in this function, sotxFeeandseTxFeedo not change the outcome. - What the code allows is separate from what happened. The code includes
renounceOwnership(), so the owner could give up this power, and no source opened for this record shows the flag being set or any sale failing. De.Fi's REKT database lists the token as an exit scam / honeypot (2021-10-04) with the note that the owner could disable transfers in a way that restricted selling.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.