Skip to content
AI Skill Index

Read a token contract for red flags

Surfaces the mechanisms that let an owner take your money. Not financial advice.

Author: Editorial
Sign in to save
Read this contract as someone deciding whether to interact with it. This is not financial or legal advice.

[PASTE CONTRACT SOURCE OR ADDRESS AND CHAIN]

Look specifically for:
- **Owner powers** — can anyone mint, pause, blacklist, or change fees after deployment? Quote the function.
- **Upgradeability** — is there a proxy? If so, who controls it, and what could a new implementation do?
- **Fees on transfer**, especially ones the owner can raise later.
- **Anything preventing selling** — a whitelist, a cooldown, a max transaction that only some addresses exceed.
- **Whether the deployed bytecode matches the published source.**

For each finding: the function, what it lets someone do, and what it would look like from a holder's side. If the source is unverified, say that is itself the finding and stop. Do not give an opinion on whether the token is a good investment.

Highlighted parts are placeholders. Replace them before you send.

Worked example

The input is invented for this page. The output shows what the prompt asks for with that input.

Example input (invented)

Contract

The verified source of a token on the explorer, shortened to the parts that are not standard ERC-20.

contract ExampleToken is ERC20, Ownable {
    uint256 public sellFee = 2;
    address public feeWallet;
    mapping(address => bool) public isBlocked;
    bool public tradingOpen = true;

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

    function setBlocked(address account, bool blocked) external onlyOwner {
        isBlocked[account] = blocked;
    }

    function setTradingOpen(bool open) external onlyOwner {
        tradingOpen = open;
    }

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

    function _update(address from, address to, uint256 amount) internal override {
        require(!isBlocked[from], "blocked");
        require(tradingOpen || from == owner(), "closed");
        if (to == pair && from != owner()) {
            uint256 fee = amount * sellFee / 100;
            super._update(from, feeWallet, fee);
            amount -= fee;
        }
        super._update(from, to, amount);
    }
}

Example output

This is not financial or legal advice, and it covers only the source you pasted.

Owner powers

  • mint(address to, uint256 amount). The owner can create any number of new tokens at any time. The supply you bought into can grow without limit, and the owner can sell the new tokens into the pool.
  • setTradingOpen(bool open). The owner can stop every transfer but their own, through require(tradingOpen || from == owner(), "closed"). A holder's sale fails while the owner can still sell.
  • setBlocked(address account, bool blocked). The owner can freeze any address, and a blocked holder cannot move or sell at all.

Fee on transfer. setSellFee(uint256 fee) has no upper limit. The fee starts at 2%, but the owner can set it to 100, and amount * sellFee / 100 then sends the whole sale to feeWallet. Selling then returns nothing, and above 100 the subtraction fails and every sale reverts. Buys and wallet-to-wallet transfers are never charged, so the token can look normal until a holder tries to sell.

Anything preventing selling. Three ways, all above: the trading switch, the block list and a 100% fee. The owner is exempt from the switch and the fee.

Upgradeability. Nothing in this source is a proxy, but the source cannot show whether the address you would use is a proxy in front of it. Check the explorer [VERIFY].

Bytecode against source. You describe the source as verified, and verification is that match. Confirm the badge is on the exact address you were given, not on a token with a similar name [VERIFY].

All of this depends on who owner() returns today. If ownership was renounced, every onlyOwner function is locked. Read owner() on the explorer [VERIFY]. pair is used but not declared in your excerpt, so paste the constructor too.

ShareXLinkedIn

3 of the 7 other prompts filed under Technology & industry.

Cookies

We use only the cookies this site needs to work. Optional analytics helps us see which content is worth writing more of — nothing loads until you say yes.

Read the privacy policy