Dextrarius Token Honeypot
What happened
Dextrarius Token ($DXT) is a BNB Smart Chain token whose transferFrom only works when the token holder is on an owner-maintained allow list. Only the deployer is on that list at construction, so any other holder who sells through a router (which moves tokens with transferFrom) hits a revert, while plain transfer calls are not checked. 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 restricted users from selling.
The code reviewed does not show how many holders were affected or any amount lost.
How it happened
- The constructor sets
allow[msg.sender] = truefor the deployer only and credits the entire supply to it:balances[msg.sender] = totalSupply;. transferhas no allow-list check, so moving tokens with a directtransfer(for example a pool paying out to a buyer) is not blocked by this code.transferFromrequiresrequire(allow[_from] == true);. Any other address defaults tofalse, so a router pulling a holder's tokens withtransferFromreverts.addAllow(address holder, bool allowApprove) external onlyOwneris the only way to changeallow[holder], andonlyOwnerisrequire(msg.sender == address(1080614020421183795110940285280029773222128095634)). That decimal value is 0xbd486897…439192, a hard-coded address that differs from the deployer address in the deployment record (0xffd92559…468afc), so the allow list andmintare controlled by that hard-coded address, not by theownervariable.- The same address can call
mint(address miner, uint256 _value), which executesbalances[miner] = _value;. It overwrites a balance without changingtotalSupply, so it can set any address's balance to any value. - What the code allows is therefore: holders cannot sell via
transferFromunless that address adds them toallow, and it can also rewrite balances. The code does not show whether it ever did either; the sell failures are attributed only to De.Fi's REKT database listing.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.