Case Study: ERC-20 Token Audit — Sell-Blocking Honeypot and Allowance Bypass on Ethereum
Executive Summary
This token uses two coordinated critical mechanisms to trap holder funds. The balance function is overridden to return zero specifically when the Uniswap trading pair calls it — the exact moment when a sell is being executed. This surgically blocks sells at the trading pair level while leaving all other balance lookups appearing normal. Combined with an allowance bypass backdoor that lets the deployer drain any approved wallet, holders are both trapped and exposed.
Sell fees can be changed to 99% at any time with no warning. A single EOA controls all functions with no multisig or timelock. The ETH drain function has no cap or delay.
Risk Assessment
This contract is a deliberate honeypot. The sell-blocking mechanism is surgical and precise — it targets the Uniswap pair specifically, which shows intent. Combined with the allowance bypass, holders cannot sell and are exposed to unlimited token theft.
Key Findings
Honeypot: Manipulated balanceOf Returns 0 for Uniswap Pair — Sell-Blocking Mechanism
What We Found
When the Uniswap trading pool checks how many tokens a seller has — which it does before executing every sell — this contract returns a fake balance of zero. The pool sees zero tokens available and cancels the transaction. This is a targeted, surgical sell block: regular balance checks elsewhere appear normal, but every sell attempt through the trading pool fails.
Why It Matters
Every sell transaction routed through Uniswap is permanently rejected. The deployer retains a bypass. This is a precision-engineered honeypot targeting the specific address that enables token liquidity.
What Should Be Done
Remove all address-conditional logic from balanceOf. The function must return the real balance for every address, including the Uniswap pair address.
Allowance Bypass via Shared State Variable Manipulation
What We Found
The contract stores the amount used in allowance accounting in a shared variable that the owner can change at any time. By setting this to zero, the owner can execute transferFrom calls that take tokens without reducing the approval counter. The same approval can be used repeatedly, indefinitely, to drain the same wallet.
Why It Matters
Owner can drain any approved wallet indefinitely with no reduction in allowance. Combined with the honeypot, users cannot sell or recover their tokens.
What Should Be Done
Store the transfer amount only in a local variable scoped to each function call. Never use a shared mutable state variable to pass amounts between functions.
Sell Fees Configurable Up to 99% with No Timelock
What We Found
The owner can change the sell tax to as high as 99% in a single transaction with no delay and no notification to holders. A user could be holding tokens expecting a 5% sell tax and find themselves hit with 99% the moment they try to sell. Combined with the honeypot, this adds a secondary mechanism to punish any holder who finds a bypass.
Why It Matters
Holders face unpredictable and potentially total fee extraction on sells. The owner can move the fee to near-100% at any point, including immediately before a holder attempts to sell.
What Should Be Done
Cap the sell fee at a disclosed maximum in the contract (typically 10%). Protect fee changes with a 48-hour timelock so holders have time to exit before changes take effect.
Extreme Centralization — Single EOA Controls All Critical Functions
What We Found
One wallet has unchecked control over every sensitive function: fees, trading gates, ETH drains, and fund movements. There is no second key required, no waiting period, and no oversight. If this wallet is compromised or acts maliciously, there is nothing stopping total fund extraction.
Why It Matters
Single point of failure for all security-sensitive operations. Key compromise or malicious action by the owner results in total loss for all holders.
What Should Be Done
Transfer ownership to a Gnosis Safe multisig with at least 3-of-5 signers. Apply timelocks to all parameter changes and fund movements.
What a Secure Contract Should Have
Disclaimer: This case study is published for educational purposes only. It reflects the state of the analyzed contract at the time of audit and does not constitute investment advice, an endorsement, or a guarantee of security. Smart contracts may be modified after an audit. HyperAudit is not liable for losses arising from interaction with any contract referenced in this report. Project names and addresses have been removed to protect ongoing remediation efforts. For a full audit of your own contracts, visit hyperaudit.io.
Building a project?
Get the same depth of analysis on your own contracts before you deploy. Reports delivered in hours, not weeks.
Audit Your ContractThinking about buying a token?
Before you buy, find out if the contract is safe. We can audit any token on any EVM chain and tell you exactly what risks you're taking — in plain language you can act on.
Check a Token Before You Buy