Theory Craft Fames Rug Pull
What happened
Theory Craft Fames (TYF, BNB Smart Chain contract 0x5459b93a…fdF326) restricts who can move tokens. Transfers between ordinary wallets revert, and sells from a wallet only pass if _usdtPair equals the pool the sale goes to; both setUsdtPair and a per-address allowance table are controlled by the admin. The admin can also set an uncapped percentage that is moved to the dead address from the recipient of every transfer.
On 2023-04-11 CertiK Alert reported that the deployer removed liquidity in 3 transactions, profiting about 69,000 USD, and described the token as appearing to be a honeypot. De.Fi's REKT database lists the price as dropping about 90% after the liquidity was removed and the tokens sold.
Scammer address as listed by De.Fi: 0x8dce7d8d…9773ca Liquidity removal transaction: 0x6bb3c129…8de6c3
How it happened
- The constructor mints the whole supply to the deployer and gives them the admin role:
_mint(creater_,totalSupply_*10**decimals());and_grantRole(DEFAULT_ADMIN_ROLE, _msgSender());. - Every
transferandtransferFromruns theTYF._transferfilter. Unless the recipient is the dead address, it only lets a transfer through if one of three branches matches: the sender has quota left in_botHMDArr, the sender is a contract (isTxt(from)), orfrom==_usdtPair||to==_usdtPair. Anything else reverts withBlock is busy, please try again. - Buys pass because the pool is a contract, so
isTxt(from)is true. A sell from a wallet passes only ifto==_usdtPair._usdtPairstarts empty and is set bysetUsdtPair, which the admin controls, so if it does not point at the real pool, wallet sells and wallet-to-wallet transfers revert while buys still work.setBotHMDArrlets the admin give chosen addresses a quota that skips the filter. setBackscalestores an uncapped_scale. In_tokenTransferthe sender is debited the full amount, the recipient is credited it, and thensuper._transfer(recipient, _destroyAddress, tAmount.div(100).mul(_scale))moves that percentage from the recipient to the dead address. At a high_scalea buyer keeps little, and a pool that receives a sell loses most of the credited tokens, so the seller gets paid for only the remainder. A_scaleabove 100 makes the100-_scalestep fail for every transfer except those to the dead address.- What happened, per CertiK Alert: the deployer removed the pool's liquidity in 3 transactions for about 69,000 USD and the token appears to be a honeypot. Which of the admin settings above was active is not shown by the sources opened.
Protocol details
Evidence
- report @CertiKAlert incident report twitter.com
- report TYF source on Sourcify repo.sourcify.dev
- report CertiK Alert post on Theory Craft Fames liquidity removal twitter.com
- transaction bscscan.com transaction 0x6bb3…e6c3 bscscan.com
- address TYF verified source code on BscScan bscscan.com
- address bscscan.com address 0x8dce…73ca bscscan.com
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.