Safari.Yield Finance Honeypot
What happened
Safari.Yield Finance (ySAFARI) is a BEP-20 token on BNB Chain whose transfer function contains a hidden sell block. The owner can mark any address as a PanCakeSwapReciever, and every transfer sent to a marked address reverts with "Error: Can not sell this token". Marking the PancakeSwap pair lets buyers receive tokens from the pool while every sale into it fails.
The fee settings in the contract are decorative: txFee is never used and no fee is charged. De.Fi's REKT database lists ySAFARI as an exit scam/honeypot dated 2021-10-04, with no loss figure.
How it happened
- The constructor mints 5,400,000
ySAFARIto the deployer, who is also theowner. - The owner can call
setPanCakeSwapReciever(address, true), which isonlyOwnerand has no whitelist lock or other limit. - Every transfer runs
calculateFeesBeforeSend, which reverts when the recipient is flagged:if(PanCakeSwapReciever[recipient]){ revert("Error: Can not sell this token"); }. - If the flagged address is the PancakeSwap pair, a sale (the router moving tokens into the pair) reverts, while a buy (the pair sending tokens to a buyer) is not checked and goes through.
- Holders can only leave by selling into a pool the owner has not flagged. The owner can flag or unflag any address at any time, and ownership has not been renounced: the on-chain
owneris still the deployer.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.