Rao Token Honeypot
What happened
Rao Token (RAO) is an Ethereum token deployed on 12 April 2021 at 0x9d72bcfb…842cd7. Every transfer and transferFrom calls ensure, which only lets a transfer through if it comes from or goes to the owner, comes from an owner-chosen tradeAddress, or comes from an owner-approved canSale address. Every other transfer must pass condition, which always returns false because its three limits (_saleNum, _minSale, _maxSale) start at zero and no function can set them.
An ordinary buyer can therefore receive tokens but cannot sell or move them, except to the owner. The owner can also overwrite any address's balance through an owner-only function misnamed approveAndCall. De.Fi's REKT database lists Rao Token as an exit scam/honeypot, stating that the contract owner could disable the transfer function and so stop users from selling.
How it happened
- The constructor records the deployer as the private
ownerand credits it with the whole supply. The contract has no function that changesowner. transferforwards totransferFrom, which runsrequire(ensure(_from, _to, _value))before moving any balance.ensurereturns true only if_from == owner || _to == owner || _from == tradeAddress || canSale[_from]; otherwise it requirescondition(_from, _value).conditionreturns false when_saleNum,_minSaleand_maxSaleare all zero. None of the three has a setter, so a holder outside the allow-list cannot send tokens to the trading pair or anyone else except the owner.- The owner picks
tradeAddresswithtransferownership(addr), a name that suggests an ownership change but only sets the address whose outgoing transfers are always allowed, such as a trading pair for buys. - The owner can call
approveAndCall(spender, addedValue)to overwritebalanceOf[spender]withaddedValuewhole tokens, without changingtotalSupply, and to addspendertocanSale.
Protocol details
Evidence
- report De.Fi REKT database listing for RAO (proof link: Token Sniffer tweet 1382886019419103233) twitter.com
- transaction Rao Token contract creation transaction etherscan.io
- address Rao Token verified contract code on Etherscan etherscan.io
- analysis Sourcify match for 0x9d72bcfb7f3bafe7b7d03e33265e75fa8b842cd7 on Ethereum repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.