Mechadog Honeypot
What happened
Mechadog (MDOG) is an Ethereum token whose transfer and transferFrom both run through a burnTokenCheck modifier that decides, per sender, whether a transfer may proceed. Ordinary holders can only send tokens to the hard-coded _unirouter address or to _owner, unless the owner has whitelisted them or has set _sellAmount above the size of their transfer; the owner can also blacklist addresses and change _safeOwner. De.Fi's REKT database lists the token as an Exit Scam/Honeypot, stating that the contract owner could disable the transfer function and so restrict users from selling.
The code shows the controls that allow this; the sources opened here do not show any holder losses or the amount involved.
How it happened
- The constructor stores the owner and sets
_safeOwnerto the same address (_owner = owner;and_safeOwner = owner;) and mints the initial supply to the owner. - Every
transferandtransferFromcalls_approveCheck, which carries theburnTokenCheck(sender,recipient,amount)modifier. When_owner == _safeOwnerand the sender is the owner, the first branch runs:_safeOwner = recipient;and the transfer proceeds, so the recipient of the owner's first transfer becomes_safeOwner. - After that, a sender that is
_owneror_safeOwner, or any transfer whose recipient is_owner, passes. For any other sender the code looks up the lists: a whitelisted sender passes. A blacklisted sender, and an unlisted sender whoseamountis not below_sellAmount, hitrequire((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance"). Because such a sender is never_owneror_safeOwnerat that point, the transfer only succeeds when the recipient is_unirouter(the hard-coded address 0x05fF2B0D…608C7F). _sellAmountstarts at 0 (uint256 private _sellAmount = 0;), soamount < _sellAmountis false for every transfer until the owner sets it by transferring to themselves (if (sender == _owner && sender == recipient){_sellAmount = amount;}). Once it is set, an unlisted holder can move amounts below it, and if the recipient of such a transfer is_safeOwnerthe sender is added to_blackAddress.- The owner can adjust these lists at will:
multiTransferwhitelists recipients and gives them an unlimited allowance to_unirouter,increaseAllowancewhitelists and un-blacklists addresses,addApproveblacklists and un-whitelists them, anddecreaseAllowancereplaces_safeOwner. All are restricted withrequire(msg.sender == _owner, "!owner"). The function names do not match what they do. - A sale to a pool address that is neither
_unirouternor_ownertherefore reverts in the modifier, and because the revert undoes the whole call, the holder's balance is not debited. De.Fi's REKT database lists the token as an Exit Scam/Honeypot on this basis; the transactions behind any actual loss were not opened.
Protocol details
Evidence
- report De.Fi REKT database listing for MDOG (Exit Scam/Honeypot), proof link Token Sniffer X post 1374999601485291522 (404 when fetched) twitter.com
- address Mechadog (MDOG) verified source on Etherscan etherscan.io
- analysis Sourcify match for 0x93c2c7cf7efb87f140a3a79ae647bbc85d23b630 (chain 1) repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.