ERC-20 Token Security

Smart Contract Updated Nov 2026

The six checks

An ERC-20 that passes a price chart and a pool check can still be a trap. These are the six places the trap lives, in the order they cost people money.

  1. Transfer logic. Read transfer and transferFrom. A token that reverts for some addresses and not others is a honeypot: you can buy, you cannot sell. Look for require(!isBlacklisted[...]), address comparisons against constants, or cooldown timestamps.
  2. Mint authority. _mint callable by an owner or a mutable minter role means supply is not fixed. An infinite mint can be dumped into the pool at will — the classic “unbacked mint” failure. Check whether owner is a contract, a multisig, or a single EOA.
  3. Owner powers. pause(), setFees(), setMaxTxAmount(), setBlacklist(), upgradeTo(). Each is a switch that changes the rules after you buy. The question is not “does it exist” but “who holds it, and can it be renounced or timelocked”.
  4. Taxes and fee paths. _taxFee, _liquidityFee, swapAndLiquify — a sell tax of 30% makes the token unsellable in practice. Read where the fee goes: a marketing wallet is normal; the deployer’s personal wallet is a drain path.
  5. Blacklist and trading gates. enableTrading(), tradingOpen, address-level allowlists. A token whose trading is gated can be opened for buyers and closed before sellers.
  6. Upgradeability / proxies. If the token is a proxy (EIP-1967 storage slot, upgradeTo), the implementation can be swapped to anything later, including a lock-everyone version. Verify the admin and whether it is a timelock.

How to read it in five minutes

  1. On Etherscan, confirm Contract → Read/Write as Proxy and open the implementation, not the proxy.
  2. Check the source is verified. Unverified bytecode with holder money in it answers the question by itself.
  3. Use the Read Contract tab for owner(), totalSupply(), paused(), and any isBlacklisted(address) — read them, do not trust the dApp’s UI.
  4. Search the source for onlyOwner and list every function it guards. That list is your risk surface.
  5. Run a honeypot simulator (honeypot.is, or a fork-simulated sell in Tenderly) before buying anything you intend to sell.

What this does not cover

Token security is contract-level. It says nothing about liquidity being locked (a safe contract with a pullable pool still rugs), about the team selling their allocation, or about price manipulation on a thin book. Contract safety is necessary, not sufficient — the four checks around it are distribution, liquidity lock, unlock schedule, and holder concentration.

Cite Quoting welcome. Please credit Onchain Diary and link here.