Skip to content
SkillModel-led2,874 tokens in use

Token Integration Analyzer

Analyzes ERC20 and ERC721 token implementations and the protocols that accept arbitrary tokens, including 24 known weird token behaviors.

8,319 stars on the repository CC-BY-SA-4.0trailofbits/skills · plugins/building-secure-contracts/skills/token-integration-analyzer
/plugin marketplace add trailofbits/skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing Token Integration Analyzer costs

109tokens idle
2,874tokens in use
7,076tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure22/25
  • Examples12/15
  • Output15/15
  • Size15/15
  • Resources10/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity100
  • Maintenance52
  • Community64
  • Maturity32
  • Momentum40

Token Integration Analyzer applies Trail of Bits’ token integration checklist to two situations: building a token, and integrating tokens you do not control. It checks standards conformity, contract composition, owner privileges, extension risks and safe transfer patterns.

It covers weird behaviors such as fee-on-transfer, rebasing, missing return values, blocklists and hooks, and can query a deployed contract for supply and holder concentration when given an address and an RPC endpoint.

What You Get

  • A compliance checklist across ten assessment categories
  • A weird token pattern analysis marking the presence or absence of all 24 patterns with evidence
  • An integration safety assessment covering safe transfer usage and defensive patterns
  • An on-chain analysis report with holder distribution and configuration, when an address is given
  • Recommendations ranked critical, high, medium and low with specific fixes

Common Use Cases

  • Reviewing a vault or DEX that accepts arbitrary ERC20 tokens
  • Auditing a token contract for ERC20 or ERC721 conformity
  • Assessing risk from fee-on-transfer, rebasing and missing-return tokens such as USDT
  • Judging owner privileges such as minting, pausing and blacklisting

What Makes It Unique

It combines code review with the Weird ERC20 database and an on-chain look at scarcity and distribution. The rationalization table blocks assumptions such as a reputable team implying standard behavior or OpenZeppelin use implying safety against odd external tokens, and requires code evidence for each of the weird patterns.

Under The Hood

The skill is an instruction file with linked resources for assessment categories and report templates. The agent reads project files and runs local Slither tools such as slither-check-erc and slither-prop. When you supply a contract address and an RPC endpoint, it queries the deployed contract over the network for supply, holders and configuration. It writes its report as a response and does not edit contracts.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers