Quark Honeypot
What happened
Quark (QUARK) is a BNB Chain token deployed on 22 April 2021 at 0xf03b5240…c92ed9. Its internal _approve function only stores an allowance when the approving address is the hard-coded deployer 0x4871a312…58E8B7; for every other holder it stores zero while emitting an Approval event with the value 4. A PancakeSwap sale needs the router to move the holder's tokens with transferFrom, which then fails the allowance check, so holders can buy but not sell through the router, while the deployer's own approvals work.
The owner can also mint any amount of QUARK to itself. De.Fi's REKT database lists Quark as an exit scam/honeypot, stating that the contract owner could disable transfers and so stop holders from selling.
How it happened
- The constructor mints 2,222,222,222 QUARK (4 decimals) to the deployer.
- When a holder approves the PancakeSwap router,
_approvechecksif (owner == address(0x4871a312C9E226192755BEb9f4e4d0d7cd58E8B7)). For any other holder it runs_allowances[owner][spender] = 0;and emitsApproval(owner, spender, 4), so the approval appears to succeed but grants nothing. - A router sale calls
transferFrom, which subtracts the amount from the zero allowance withsub(amount, "BEP20: transfer amount exceeds allowance")and reverts. - Buys use the pair's
transferto the buyer, which needs no allowance, so buying keeps working. - The hard-coded deployer address keeps normal allowances, so it can still sell through the router. The
onlyOwnerfunctionmint(uint256)can create unlimited QUARK for the owner.renounceOwnershipwould remove the mint power, but the allowance exception is tied to a fixed address, not to the owner role.
Protocol details
Evidence
- report @Token_Sniffer incident report twitter.com
- report De.Fi REKT database listing for Quark (proof links: Token Sniffer tweet 1380219360631906307 and S4) twitter.com
- transaction Quark contract creation transaction bscscan.com
- address Quark verified contract code on BscScan bscscan.com
- analysis Sourcify match for 0xf03b5240cc4dfbad9efb5507b82286a5b4c92ed9 on BNB Chain repo.sourcify.dev
- analysis BSC-SCAM: PancakeSwap NoApproval cryptot3ddybear.gitlab.io
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.