Script Token Rug Pull
What happened
Script (SCPT) was a BNB Chain token paired with USDT on PancakeSwap, deployed on 31 March 2023 by 0x77978388…9d5db9. Its code blocks every sale and wallet-to-wallet transfer until a private switch, canSell, is turned on, and that switch starts off. Only a hidden _tokenOwner address, set at deployment, can flip canSell or give any holder a sell limit through maxSellToken; buys from the pair are never checked. These powers sit outside the normal owner() role, so moving ownership to the dead address does not remove them.
On 2 April 2023 CertiK reported that the deployer had removed liquidity in five transactions over 48 hours, a loss of about $133K, and said the token appeared to be a honeypot. De.Fi's REKT database puts the loss at 133,857 USD, names 0x77978388…9d5db9 as the address behind it, and gives 0x948975f3…903015 as an example liquidity removal transaction.
How it happened
- The constructor mints all 100,000,000 SCPT to a
tokenOwnerconstructor argument, stores it in the private_tokenOwner, and creates a pair against USDT. - In
_transfer, a transfer from the pair (a buy) only pays a 5% burn. A transfer to the pair (a sale) runsrequire(canSell,"canSell"), and so does any other transfer between non-exempt wallets. canSellis declared asbool canSell;with no initial value, so it starts false. Only_tokenOwnercan callchangeCanSell()to flip it, andmaxSellToken(userAddress, tokens)lets_tokenOwnercap how much any single address can ever sell.- Before any fee exemption is checked, a transfer that adds liquidity to the pair must come from
_tokenOwner:if(isAddLdx){ require(_tokenOwner == from); }. Addresses set withexcludeFromFees(the token owner, the deployer and the contract at deployment) then skip thecanSelland sell-limit checks. Only addresses in_isExcludedFromVipFees(the contract itself and pairs added withaddOtherTokenPair) skip every check. _tokenOwneris not tied toowner(), so moving ownership to the dead address leaves these controls in place.- According to CertiK, the deployer removed the pool's liquidity in five transactions over 48 hours, about $133K. No source opened here shows whether
canSellwas ever switched on for holders.
Protocol details
Evidence
- report @CertiKAlert incident report twitter.com
- report CertiK Alert: large liquidity removal on Script (SCPT) (2 April 2023) twitter.com
- transaction SCPT contract creation transaction bscscan.com
- transaction bscscan.com transaction 0x9489…3015 bscscan.com
- address Script (SCPT) verified contract code on BscScan bscscan.com
- address bscscan.com address 0x7797…5db9 bscscan.com
- analysis Sourcify match for 0xd4ac227eb1a4c0384aae06f7808f08bb8f516ebf on BNB Chain repo.sourcify.dev
- analysis De.Fi REKT database listing for SCPT de.fi
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.