GDRAGON Honeypot
What happened
GDRAGON (GDRAGON) is a BNB Chain token deployed on 16 May 2021 at 0x09bda2df…266a9e. Every transfer and transferFrom runs through a modifier named burnTokenCheck that lets only the owner, a second privileged address called _safeOwner and owner-whitelisted wallets move tokens freely. Any other holder can only send less than a hidden threshold _sellAmount, which starts at zero and which only the owner can raise, or send to the PancakeSwap router address itself, which is not where a router sale delivers tokens.
The owner can also blacklist and whitelist wallets through functions misleadingly named addApprove and increaseAllowance, and mint new supply to itself. De.Fi's REKT database lists GDRAGON as an exit scam/honeypot, stating that the owner could disable transfers and so stop holders from selling.
How it happened
- The constructor sets
_ownerand_safeOwnerto theowneraddress passed at deployment and mints the initial supply to it. - The first transfer the owner sends while
_owner == _safeOwnermakes its recipient the new_safeOwner. If that first transfer is the liquidity deposit, the PancakeSwap pair becomes_safeOwner, so tokens leaving the pair (purchases) pass the check. The owner can also set_safeOwnerdirectly withdecreaseAllowance(address). - For an ordinary holder,
burnTokenCheckrequiresamount < _sellAmount, or elsesender == _safeOwner || recipient == _unirouter._sellAmountstarts at 0, and a PancakeSwap sale moves tokens from the holder to the pair, not to_unirouter, so the sale reverts with the misleading message "ERC20: transfer amount exceeds balance". - The owner can raise
_sellAmountby transferring tokens to itself. A holder who then sends less than that amount to_safeOwneris added to_blackAddress, after which the same router-only rule applies to every later transfer. addApprove(address[])blacklists wallets andincreaseAllowance(address[])whitelists them;multiTransferlets the owner send tokens, whitelist the firstapprovecountreceivers and give the router an unlimited allowance over their balances._mint(address, uint256)is public and owner-only, and credits new tokens to_ownerwhateveraccountis passed.
Protocol details
Evidence
- report Token Sniffer post 1374999601485291522 (De.Fi proof link) twitter.com
- transaction GDRAGON contract creation transaction bscscan.com
- address GDRAGON verified contract code on BscScan bscscan.com
- analysis Sourcify match for 0x09bda2df735530fc1e834745f5f82815ff266a9e on BNB Chain repo.sourcify.dev
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.