Tentrix Honeypot
What happened
Tentrix (TRIX) is a BNB Chain token whose contract has an owner-only switch, setFeeEnabled, that turns on a sell fee with no cap. When the switch is on, any transfer to the liquidity pair from an ordinary holder is charged a fee of almost 100% of the amount, so selling returns essentially nothing while the owner, the router and the contract itself are exempt. The switch starts off, and the code alone does not show whether or when it was turned on.
De.Fi's REKT database lists the token as an exit scam/honeypot and says the contract owner could restrict users from selling.
How it happened
- The constructor sends the whole supply to the deployer (
_balances[_owner] = _totalSupply;, 100,000,000 TRIX at 9 decimals) and creates the trading pair withcreatePair(address(this), uniswapV2Router.WETH()). _feeEnabledstarts asfalse. Only the owner can change it:function setFeeEnabled(bool feeEnabled) external { require(_owner == msg.sender); _feeEnabled = feeEnabled; }. There is no limit on what the fee does once enabled.- In
_transferthe sender is debited the full amount first (_balances[from] = sub(_balances[from], amount);). The fee branch then runs only when_feeEnabled && to == uniswapV2Pairand the sender is notaddress(uniswapV2Router),_owneroraddress(this). Holders selling into the pair, or any other wallet adding to the pair, take this branch. - The fee is
mul(div(amount, 100), 100), which is the amount rounded down to a multiple of 100 raw units. The pair is credited onlysub(amount, fee), so at most 99 raw units (under 0.0000001 TRIX), and the fee is removed from_totalSupply. Selling 1,000 TRIX (10^12 raw units) would deliver 0 to the pair. - The owner is exempt from the fee branch (
from != _owner), so the code allows the owner to move tokens into the pair at full value while other holders cannot.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.