MoonPay Honeypot
What happened
MoonPay (MPAY) is a BEP-20 token on BNB Chain at 0xe75ece59…bd3fdf, deployed on 28 April 2021 at 06:07 UTC. De.Fi's REKT database lists it as an exit scam/honeypot. Its transferFrom function only works for holders marked true in an allow mapping, and the constructor marks only the deployer.
A DEX router sells tokens through transferFrom, so holders can buy but their sells revert. Only the hard-coded address 0xf7E1F5a3…432982 can add wallets to allow, through addAllow.
How it happened
- The constructor gives the whole supply to the deployer and sets
allow[msg.sender] = true, so the deployer can move tokens withtransferFromand add liquidity through a router. - Buyers purchase MPAY from the pair. The pair pays out with
transfer, which only checks the recipient and balance, so buys succeed. - To sell, a holder approves the router, and the router calls
transferFrom(holder, pair, amount). That function containsrequire(allow[_from] == true);, and a buyer's entry inallowis false by default, so the sale reverts. - The whitelist can only be changed through
addAllow(address holder, bool allowApprove), guarded byonlyOwner, andonlyOwnerchecksmsg.sender == address(0xf7E1F5a3B02178BAFBAE0c6C080622669c432982)rather than the storedowner. That single address decides which wallets may sell through the router.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.