Magnet Attraction Honeypot
What happened
De.Fi's REKT database lists MAGNET as an exit scam/honeypot and states that the contract owner could disable the transfer function, which restricted users in selling their tokens. The verified BEP20 source (contract 0x92db92ab…cd4f6d) has no transfer switch. Its internal _approve keeps allowances only for one hard-coded address, 0x64958268…997ab6, which is the deployer.
For every other address it stores an allowance of 0, so any transferFrom for a positive amount reverts and swaps that pull tokens through an allowance cannot complete. Plain transfer calls do not touch allowances. The code shows what the design allows; no opened transaction or source in this review shows how many holders were affected or what was lost.
How it happened
- The constructor sets
_totalSupply = 10000 * (10**10);(10 decimals, so 10,000 tokens) and credits all of it to the deployer with_balances[msg.sender] = _totalSupply;. approvecalls_approve(_msgSender(), spender, amount). Inside_approve, only the hard-coded address passesif (owner == address(0x64958268d52c4B2215061Dabd2e83103a0997ab6))and gets the real allowance stored.- Every other holder takes the
elsebranch:_allowances[owner][spender] = 0;followed byemit Approval(owner, spender, 0);. The stored allowance stays 0 whatever amount was requested. transferFromruns_transfer(sender, recipient, amount)and then_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "BEP20: transfer amount exceeds allowance")). With a stored allowance of 0, thesubreverts for any positive amount and the whole call, including the balance move, is rolled back.- A swap back to the base asset normally pulls tokens from the holder through an allowance, so only the hard-coded address can use that path; plain
transferstill works for everyone. - The gate checks a hard-coded address, not
_owner, sorenounceOwnership()would not remove it. The owner also hasmint(uint256 amount)with no cap, which the owner can call.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- address BscScan verified source for Magnet Attraction (MAGNET) bscscan.com
- analysis Sourcify repository copy of the same contract repo.sourcify.dev
- analysis Scam explained: BSC no-approval (PancakeSwap NoApproval scam mechanism) cryptot3ddybear.gitlab.io
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.