Luxury Finance Honeypot
What happened
De.Fi's REKT database lists Luxury Finance (LF) on BNB Smart Chain as an exit scam/honeypot, noting that the contract owner could disable the transfer function and so restrict users from selling. In the verified source, transfer has no restriction, but transferFrom (the path a DEX router uses to pull tokens from a seller) requires a per-address flag: require(allow[_from] == true);. Only the deployer is flagged in the constructor, so every other holder's transferFrom reverts until a privileged caller sets their flag through addAllow.
How it happened
- The constructor mints the whole supply to the deployer and flags only that address:
balances[msg.sender] = totalSupply;andallow[msg.sender] = true;. Every other address starts withallowequal to false. transferhas no flag check, so a holder can move tokens directly:require(balances[msg.sender] >= _value);. Buying from a pool therefore works, because the pair sends tokens withtransfer.transferFromadds a gate on the source address:require(allow[_from] == true);. A sale through a router pulls the holder's tokens withtransferFrom, so for any holder whose flag is false the call reverts.- The flag can be changed only through
function addAllow(address holder, bool allowApprove) external onlyOwner. TheonlyOwnermodifier comparesmsg.senderwith a hard-coded address,require(msg.sender == address(1080614020421183795110940285280029773222128095634)), which is 0xbd486897…439192. That is not the deployer 0x88cBABb4…e4424c shown in the deploy record, and theownervariable set in the constructor is not what the modifier checks. - The same address can also call
mint(address miner, uint256 _value), which overwritesbalances[miner] = _value;without touchingtotalSupply. - What the code allows: whoever controls the hard-coded address decides which holders can sell through a router. What happened: De.Fi's REKT database lists the token as an exit scam/honeypot; no transaction showing a call to
addAllowormintwas opened.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.