Blog/Case Study
EthereumERC-20 Honeypot TokenJuly 2026376 lines

Case Study: ERC-20 Token Audit — Three Critical Honeypot and Backdoor Mechanisms on Ethereum

40/100
Risk Score (C)
23
Total Findings
10
Critical + High
Severity Distribution

Executive Summary

This token uses three coordinated critical mechanisms to extract money from holders. A broken balance reporting function prevents any regular user from selling — trading platforms see a zero balance and reject all sell attempts. A hidden allowance backdoor lets the deployer drain tokens from any wallet that has ever interacted with the contract. And an automatic ETH drain sends all collected fees directly to the deployer on every sell transaction, with a mathematical condition that is always true.

The liquidity setup is also exploitative: LP tokens go directly to the owner with zero slippage protection, meaning the deployer can remove all liquidity at will while also being able to sandwich-attack their own launch.

This contract represents a coordinated scam design rather than a collection of unrelated bugs.

Risk Assessment

This contract is a deliberate scam. Users who buy this token are permanently trapped — they cannot sell. The deployer can drain all ETH and tokens at any time. There is no legitimate use for this contract.

Key Findings

critical

Broken balanceOf — Missing Return Path Creates Honeypot

What We Found

The function that tells trading platforms how many tokens you hold is intentionally broken for regular users. It silently returns zero instead of your real balance, so every sell attempt is rejected. The deployer bypasses this check and can sell freely. This is the core of a honeypot: you can buy, but you can never sell.

Why It Matters

All regular holder sell transactions will be rejected. Only the deployer can sell. User funds are permanently trapped with no recovery path.

What Should Be Done

Remove all conditional balance overrides and return the actual balance from the token mapping for every address without exception.

critical

transferFrom Allowance Bypass via Shared Mutable State

What We Found

Instead of reducing your allowance after each transfer as required, the contract uses a shared counter that the deployer can reset. This lets the deployer drain your wallet repeatedly using the same approval, and your allowance never decreases. The mechanism is hidden behind innocuous-looking variable names.

Why It Matters

Deployer can repeatedly drain any approved wallet indefinitely. The allowance system — the primary user-facing safety mechanism — is fully bypassed.

What Should Be Done

Store the transfer amount in a local variable within each function call. Never use a shared state variable to pass values between functions in an allowance flow.

critical

Hidden Backdoor Resets Allowance Amount

What We Found

A separate hidden function lets the deployer overwrite the amount used in allowance accounting at any time. By setting this value to any number before a transfer, the deployer controls exactly how much can be taken from any account that has given an approval — effectively giving them a master key to all approved wallets.

Why It Matters

Deployer can set the deduction amount to zero, making every transferFrom call take the full balance regardless of the original approval amount.

What Should Be Done

Remove the function that externally sets the shared transfer amount variable. The transfer amount must only come from the caller-provided argument in the transfer function.

high

Tautology — uint256 >= 0 Always True Forces ETH Drain on Every Sell

What We Found

The condition that triggers the ETH send to the deployer checks whether a number is greater than or equal to zero. Since the number type can never be negative, this condition is always true. Every sell transaction drains the entire ETH balance to the deployer, regardless of how much ETH should stay in the contract.

Why It Matters

Every sell transaction results in complete ETH drainage to the deployer's wallet. There is no scenario where this condition is false.

What Should Be Done

Replace the tautological condition with a meaningful threshold check against a configurable minimum balance. Only send ETH when it meaningfully exceeds operating costs.

What a Secure Contract Should Have

balanceOf reads directly from the balance mapping — no address-conditional overrides
Allowance deductions use the amount passed to the function, not an externally settable variable
No external function can override the amount used in transfer or transferFrom accounting
ETH distribution to fee wallets uses a meaningful threshold, not an always-true condition
LP tokens are sent to a time-lock contract at launch, not to the deployer wallet
startTrading sets slippage parameters appropriate for the launch liquidity depth

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 Contract

Thinking 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