solidity-erc-standards

Installation
SKILL.md

ERC Token Standard Guidelines

When to Apply

  • Implementing a new token (Fungible, NFT, Multi-token, or Vault).
  • Reviewing existing token implementations for standard compliance.
  • Integrating with external tokens (e.g., DeFi protocols, marketplaces).
  • Extending standards with custom logic (e.g., Permit, Votes, Enumerable).

ERC20: Fungible Tokens

  • Required: totalSupply, balanceOf, transfer, allowance, approve, transferFrom.
  • SafeERC20: ALWAYS wrap external ERC20 calls (transfer, transferFrom, approve) using OpenZeppelin's SafeERC20 to handle tokens that return false instead of reverting.
  • Race Condition: The approve function has a known race condition. Use increaseAllowance and decreaseAllowance (OpenZeppelin) or ERC20Permit to mitigate.
  • ERC20Permit (EIP-2612): Use for gasless approvals via signatures (permit function).
  • ERC20Votes: Use for governance tokens to enable delegation and checkpointing.
  • Common Pitfall: Some tokens (like USDT) do not return a boolean on transfer, causing calls to revert if the interface expects a return value.

ERC721: Non-Fungible Tokens

Related skills

More from whackur/solidity-agent-toolkit

Installs
18
First Seen
Feb 15, 2026