MEDUZA TOKEN Honeypot
What happened
MEDUZATOKEN is an ERC-20 token whose _transfer routes every transfer through calculateFeesBeforeSend, and that function reverts with "Error: Can not sell this token" whenever the recipient is flagged in the owner-controlled PanCakeSwapReciever mapping. If the owner flags a liquidity pair, any transfer into that pair, including a holder's sell, reverts, while transfers out of the pair (buys) are not checked. De.Fi's REKT database lists MEDUZA as an exit scam/honeypot on BNB Smart Chain and states that the contract owner could disable the transfer function, which restricted users in selling their tokens.
The source alone does not show which addresses were flagged or when.
How it happened
- The constructor mints the full supply to the deployer:
_transferTO(msg.sender, 10000000000e18);. The deployer is also theOwnableowner. - Only the owner can fill the sell-block list:
function setPanCakeSwapReciever(address _recipient, bool _feeless) public onlyOwner { ... PanCakeSwapReciever[_recipient] = _feeless; }. Unlike the fee whitelist setters, it has nocanWhitelistcondition, sorenounceWhitelist()does not lock it. - 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, whoever the sender is, so the whole transaction reverts, including the debit in step 3, when the recipient is a flagged address. - If a trading pair is flagged, a holder's sell (
transferor a router'stransferFromwith the pair as recipient) reverts. A buy has the pair as sender and the buyer as recipient, so it is not blocked unless the buyer is flagged. The owner can also remove a flag with the same setter by passingfalse. - The function otherwise charges nothing: it returns
(amount, 0), sotxFeeand the fee setters have no effect on balances. - Which addresses were flagged, and whether holders were actually unable to sell, comes from De.Fi's listing only; no transaction was opened to confirm it.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.