Check a token ↗
STABLEHUB · HOW-TO GUIDES

How to Read Smart Contract Red Flags

A practical walkthrough, one section at a time.

On this page +

Quick answer

To read smart contract red flags on Etherscan without being a developer, do two things. First, confirm the contract is verified — the Contract tab on Etherscan must show Solidity source code with a green tick, not just bytecode. Unverified contracts grade HIGH automatically in StableHub's Rug Risk Score with no exceptions; the code on-chain cannot be inspected. Second, for verified contracts, use the Contract tab's search field to scan for five red-flag patterns: onlyOwner mint (the developer can inflate supply), blacklist or isBlacklisted (the developer can block specific wallets from selling), pause or tradingEnabled (the developer can disable selling for everyone), setFee or setTaxRate with no cap (the developer can set the sell tax to 100%), and tx.origin inside a transfer restriction (the contract is a likely honeypot). Each pattern takes 10–15 seconds to search. Finding any one of them does not automatically mean the contract is malicious — some are legitimate — but each one significantly elevates the rug or honeypot risk and should change how you size the position.

Not financial advice. Contract reading is a triage skill, not a formal audit. StableHub tools are for informational purposes only.

You do not need to read Solidity

This guide does not teach you to write or formally audit smart contracts. It teaches you to recognise five specific function-name patterns that indicate the developer retains control over key economic levers — the levers most often used in rug pulls and honeypots. The skill required is roughly the same as searching a Word document for a phrase. The whole check takes under three minutes per contract.

The wider conceptual frame — what an unverified contract means, why verification matters, the five-signal model — sits in the Token Safety pillar. This page is the hands-on signal-by-signal walkthrough.

1

Step 1 — Confirm verification status

Open etherscan.io/address/<contract address>. Click the Contract tab. Three things can happen:

What you seeWhat it meansWhat to do
Green tick + Solidity source code + ABI Verified. Code is readable. Continue to Step 2.
"Are you the contract creator? Verify and Publish your source code" Unverified. Code is opaque. Stop. StableHub's Rug Risk Score grades this HIGH automatically. Do not buy.
Verified proxy + implementation address linked Proxy contract. Logic is in another address. Click through to the implementation contract; verify that code separately.

The unverified case is the most important signal in this whole guide. The complete rule, with its rationale and the validation set it was tested against, is on the open-methodology grader documentation.

1

Red flag 1 — onlyOwner minting

Search for: mint

You are looking for any function whose name contains mint and whose modifier list contains onlyOwner, onlyAdmin, or a similar permission gate. Example:

function mint(address to, uint256 amount) external onlyOwner {
    _mint(to, amount);
}

This means the owner can create new supply at will. If you hold 1% of the token today and the owner mints 10x the existing supply tomorrow, you hold 0.09% — your position is diluted to a fraction of itself with no consent and no recourse. Some legitimate tokens have controlled mint (governance-restricted, capped). Many rug-prone tokens have unrestricted owner mint. The defence is to read the modifier and confirm whether the mint is capped, governance-gated, or completely owner-controlled.

2

Red flag 2 — Blacklist functions

Search for: blacklist or isBlacklisted or _isBlacklisted

You are looking for a mapping like mapping(address => bool) public _isBlacklisted and a setter like function setBlacklisted(address account, bool value) external onlyOwner. If both exist, the owner can mark any wallet as blacklisted and the _transfer function will reject transactions from that wallet — meaning the owner can selectively block specific holders from selling.

Some legitimate tokens have blacklists for compliance reasons (sanctioned addresses, hack recovery). Many rug-prone tokens use the blacklist to block all sellers except the deployer wallet, creating a one-sided market. The defence is to read the conditions under which the blacklist gets applied in the _transfer function.

3

Red flag 3 — Trading pause flags

Search for: pause or tradingEnabled or tradingOpen or swapEnabled

You are looking for a boolean state variable like bool public tradingEnabled = false and an owner-only setter that flips it. The _transfer function will typically check this flag and reject all transfers if it is false. Common pattern:

function _transfer(address from, address to, uint256 amount) internal override {
    require(tradingEnabled || from == owner(), "Trading not enabled");
    ...
}

That single require means the owner can disable trading for everyone except themselves at any moment, exit through their own carve-out, then leave the rest of the holders unable to sell. This is the central mechanism of many honeypot contracts. SQUID's contract used this pattern.

4

Red flag 4 — Uncapped fee setters

Search for: setFee or setTax or setBuyFee or setSellFee

You are looking for an owner-only function that sets a tax-on-sell rate, with no maximum cap. Example:

function setSellFee(uint256 newFee) external onlyOwner {
    sellFee = newFee;
}

If there is no require(newFee <= 10, "Fee too high") or similar cap, the owner can set the sell fee to 100% — meaning every sale transfers the entire value to the owner's wallet. This is a soft-rug mechanic that does not require draining liquidity; the owner just collects all selling pressure as a tax.

The defence is to confirm any fee setter has an explicit numerical cap in the require statement. A capped setter is normal. An uncapped setter is the red flag.

5

Red flag 5 — tx.origin in transfer restrictions

Search for: tx.origin

You are looking for any use of tx.origin inside the _transfer function or any helper it calls. tx.origin is the address that originated a transaction — not the immediate caller. Using it in a transfer restriction creates a whitelist that distinguishes "the deployer is selling" from "anyone else is selling", because the deployer's address can be hard-coded into the check while everyone else's transactions get rejected.

This is rarer than the first four flags and almost always a honeypot indicator when it appears. Legitimate contracts have almost no reason to use tx.origin in transfer logic; it is generally considered an anti-pattern in modern Solidity.

The StableHub Contract Red-Flag Scan Framework

StableHub Contract Red-Flag Scan: A non-developer can triage smart contract risk on Etherscan in under three minutes by checking verification status and searching the verified source code for five specific patterns. (1) Functions named with "mint" gated only by onlyOwner with no supply cap allow unrestricted dilution. (2) Mappings named "blacklist" or "isBlacklisted" with owner-only setters allow selective blocking of seller wallets. (3) Boolean flags named "pause", "tradingEnabled", or "swapEnabled" gated by onlyOwner allow trading to be disabled for everyone except the owner. (4) Fee setters named "setFee", "setTax", or "setSellFee" without an explicit numerical cap in their require statement allow the sell tax to be raised to 100%. (5) Use of tx.origin inside transfer logic creates whitelisted exit paths typical of honeypot contracts. Finding any one pattern does not prove malicious intent — some patterns appear in legitimate contracts — but each one significantly elevates the rug or honeypot risk and should change position sizing accordingly.

Proxy contracts — the meta-trap

A proxy contract is a small contract that delegates all its logic to a separate implementation contract. Etherscan recognises common proxy patterns and shows a "Read as Proxy" / "Write as Proxy" set of tabs that link to the implementation address.

The trap: if you read the proxy's Contract tab, you are reading the proxy code, not the logic. The implementation can be upgraded by the proxy admin at any time. To check a proxy honestly:

  1. Confirm Etherscan flags the contract as a proxy and links to the implementation.
  2. Click through to the implementation contract.
  3. Run all five red-flag searches against the implementation.
  4. Read the proxy admin: if the admin is a single EOA wallet rather than a multisig or timelock, that wallet can swap in a new implementation at any moment — including one with mint, blacklist, or pause functions that did not exist in the previous version.

A clean current implementation does not protect against a hostile future upgrade. Proxy admin status is part of the read.

What this check does not catch

Three caveats matter for honesty:

  • This is triage, not audit. A formal audit by a security firm reads every function for re-entrancy, integer overflow, access-control flaws, and economic invariants. The five-pattern scan above catches obvious red flags but cannot replace audit work for any meaningful position size.
  • Patterns can be obfuscated. A malicious developer can rename a blacklist function, hide a mint behind several internal calls, or use inline assembly to disguise behaviour. The scan catches the lazy implementations, which is most of them.
  • Verified does not mean reviewed. Verification confirms the deployed bytecode matches the source — it does not mean anyone has read the source. The five-pattern scan is the cheapest meaningful read of that source.

The full pre-purchase flow that bundles this check with liquidity, holder, and exchange checks is in how to check a token before buying. The rug-pattern context for honeypots and soft rugs is in how to spot a crypto rug pull.

Run the score on a token

Paste an ERC-20 contract address into StableHub's free checker. The Rug Risk Score reads verification status automatically and grades all unverified contracts HIGH. Use the five-pattern scan above for verified contracts where you want to triage the function-level risk before sizing a position.

Frequently asked questions

How do I check if a smart contract is safe without being a developer?
Confirm the contract is verified on Etherscan, then run five quick text searches against the source code for owner-only mint functions, blacklist mappings, trading-pause flags, uncapped fee setters, and use of tx.origin in transfer logic. The whole scan takes under three minutes. Finding any one pattern does not prove the contract is malicious — some patterns appear in legitimate tokens — but each one significantly elevates rug or honeypot risk. Unverified contracts cannot be checked this way at all and are graded HIGH automatically by StableHub's Rug Risk Score.
What is the difference between a verified and unverified contract on Etherscan?
A verified contract has its Solidity source code uploaded to Etherscan, with confirmation that the source compiles to the bytecode actually deployed on-chain. Anyone can read the code and inspect what the contract does. An unverified contract has only its bytecode visible — the human-readable source is hidden. Verified does not mean safe; verified means readable. Unverified means opaque, which is why StableHub's Rug Risk Score grades all unverified contracts HIGH regardless of other signals.
What does onlyOwner mean in a smart contract function?
onlyOwner is a Solidity modifier that restricts a function so only the contract owner address can call it. The owner is typically the deployer wallet, set when the contract was deployed. Functions modified with onlyOwner can do whatever the function says — mint new tokens, blacklist wallets, pause trading, change fee rates — only when called by that owner. The presence of onlyOwner is not by itself a red flag — many legitimate contracts use it. The red flag is when onlyOwner gates a function that affects holders' economic position (mint, blacklist, fee setter, pause) with no further constraints like a supply cap or governance vote.
What is a honeypot smart contract?
A honeypot contract lets buyers acquire a token but blocks selling for everyone except a whitelisted address — usually the deployer wallet. Price rises as buyers come in; no one can exit. The developers eventually drain the pool. Common technical implementations include hidden transfer restrictions, tx.origin checks inside the _transfer function, uncapped sell-fee setters that get raised to 100%, and blacklist mappings the owner can apply to all non-whitelisted addresses. SQUID was a documented honeypot. StableHub's Rug Risk Score catches most honeypots through the unverified-contract rule; verified honeypots with hidden restrictions require manual contract reading.
Should I avoid every contract with owner privileges?
No. Owner privileges exist in most legitimate contracts — for legitimate reasons including emergency pause during a hack, migration to a new contract version, treasury management, and protocol parameter updates. The right reading is to look at what the owner privileges actually allow and whether they are constrained. A capped mint with a governance vote is materially safer than an uncapped mint with onlyOwner. A timelock on owner actions is materially safer than immediate execution. A multisig owner is materially safer than a single EOA wallet. The privileges themselves are neutral; their constraints determine the risk.

Not financial advice. Contract reading is triage, not audit. Read the full disclaimer.

Explore StableHub

Manage cookies
Scroll to Top