본문으로 건너뛰기
Skillpedia
보안8.0k · #12665

token-integration-analyzer

하는 일

토큰 계약과 그 연동을 분석해서 표준 준수 여부와 알려진 특이한 토큰 동작을 확인합니다. 토큰을 만들거나 프로토콜에서 임의의 토큰을 받는 개발자를 위한 것입니다.

사용하는 경우

  • ✓개발자가 ERC20이나 ERC721 토큰을 만들며 표준을 따르는지 확인하고 싶을 때.
  • ✓팀이 임의의 토큰을 연동하거나 받아들이며 특이한 토큰을 안전하게 처리해야 할 때.
  • ✓감사자가 배포된 계약의 소유자 권한이나 토큰 희소성을 확인하고 싶은 경우.

스킬 링크

https://github.com/trailofbits/skills/blob/main/plugins/building-secure-contracts/skills/token-integration-analyzer/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/trailofbits/skills/blob/main/plugins/building-secure-contracts/skills/token-integration-analyzer/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 프로토콜은 어떤 ERC20 토큰이든 받습니다. 일반 규칙을 깨는 특이한 토큰을 어떻게 처리하는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 토큰 코드를 살펴보고, 20개가 넘는 알려진 특이 토큰 패턴과 대조하며, 소유자 권한을 검토합니다. 배포된 계약에 대해 공급량과 설정 정보를 조회할 수도 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Token Integration Analyzer

Purpose

Systematically analyzes the codebase for token-related security concerns using Trail of Bits' token integration checklist:

  1. Token Implementations: Analyze if your token follows ERC20/ERC721 standards or has non-standard behavior
  2. Token Integrations: Analyze how your protocol handles arbitrary tokens, including weird/non-standard tokens
  3. On-chain Analysis: Query deployed contracts for scarcity, distribution, and configuration
  4. Security Assessment: Identify risks from 20+ known weird token patterns

Framework: Building Secure Contracts - Token Integration Checklist + Weird ERC20 Database


How This Works

Phase 1: Context Discovery

Determines analysis context:

  • Token implementation: Are you building a token contract?
  • Token integration: Does your protocol interact with external tokens?
  • Platform: Ethereum, other EVM chains, or different platform?
  • Token types: ERC20, ERC721, or both?

Phase 2: Slither Analysis (if Solidity)

For Solidity projects, I'll help run:

  • slither-check-erc - ERC conformity checks
  • slither --print human-summary - Complexity and upgrade analysis
  • slither --print contract-summary - Function analysis
  • slither-prop - Property generation for testing

Phase 3: Code Analysis

Analyzes:

  • Contract composition and complexity
  • Owner privileges and centralization risks
  • ERC20/ERC721 conformity
  • Known weird token patterns
  • Integration safety patterns

Phase 4: On-chain Analysis (if deployed)

If you provide a contract address, I'll query:

  • Token scarcity and distribution
  • Total supply and holder concentration
  • Exchange listings
  • On-chain configuration

Phase 5: Risk Assessment

Provides:

  • Identified vulnerabilities
  • Non-standard behaviors
  • Integration risks
  • Prioritized recommendations

Assessment Categories

I check 10 comprehensive categories covering all aspects of token security. For detailed criteria, patterns, and checklists, see ASSESSMENT_CATEGORIES.md.

Quick Reference:

  1. General Considerations - Security reviews, team transparency, security contacts
  2. Contract Composition - Complexity analysis, SafeMath usage, function count, entry points
  3. Owner Privileges - Upgradeability, minting, pausability, blacklisting, team accountability
  4. ERC20 Conformity - Return values, metadata, decimals, race conditions, Slither checks
  5. ERC20 Extension Risks - External calls/hooks, transfer fees, rebasing/yield-bearing tokens
  6. Token Scarcity Analysis - Supply distribution, holder concentration, exchange distribution, flash loan/mint risks
  7. Weird ERC20 Patterns (24 patterns including):
    • Reentrant calls (ERC777 hooks)
    • Missing return values (USDT, BNB, OMG)
    • Fee on transfer (STA, PAXG)
    • Balance modifications outside transfers (Ampleforth, Compound)
    • Upgradable tokens (USDC, USDT)
    • Flash mintable (DAI)
    • Blocklists (USDC, USDT)
    • Pausable tokens (BNB, ZIL)
    • Approval race protections (USDT, KNC)
    • Revert on approval/transfer to zero address
    • Revert on zero value approvals/transfers
    • Multiple token addresses
    • Low decimals (USDC: 6, Gemini: 2)
    • High decimals (YAM-V2: 24)
    • transferFrom with src == msg.sender
    • Non-string metadata (MKR)
    • No revert on failure (ZRX, EURS)
    • Revert on large approvals (UNI, COMP)
    • Code injection via token name
    • Unusual permit function (DAI, RAI, GLM)
    • Transfer less than amount (cUSDCv3)
    • ERC-20 native currency representation (Celo, Polygon, zkSync)
    • And more...
  8. Token Integration Safety - Safe transfer patterns, balance verification, allowlists, wrappers, defensive patterns
  9. ERC721 Conformity - Transfer to 0x0, safeTransferFrom, metadata, ownerOf, approval clearing, token ID immutability
  10. ERC721 Common Risks - onERC721Received reentrancy, safe minting, burning approval clearing

Example Output

When analysis is complete, you'll receive a comprehensive report structured as follows:

=== TOKEN INTEGRATION ANALYSIS REPORT ===

Project: MultiToken DEX
Token Analyzed: Custom Reward Token + Integration Safety
Platform: Solidity 0.8.20
Analysis Date: March 15, 2024

---

## EXECUTIVE SUMMARY

Token Type: ERC20 Implementation + Protocol Integrating External Tokens
Overall Risk Level: MEDIUM
Critical Issue
자주 묻는 질문

특이한 토큰은 무엇인가요?

표준처럼 동작하지 않는 토큰입니다. 예를 들어 특이한 전송 규칙이 있는 토큰이 있으며, 이 스킬은 20개가 넘는 알려진 패턴을 확인합니다.

배포된 토큰도 확인하나요?

네. 온체인의 희소성, 분배, 설정을 분석할 수 있습니다.

Solidity 전용인가요?

주로 Ethereum과 다른 EVM 체인을 대상으로 하며, Solidity 프로젝트에는 Slither 도구를 쓸 수 있습니다.

상세 정보

작성자의 원본 설명

Token integration and implementation analyzer based on Trail of Bits' token integration checklist. Analyzes token implementations for ERC20/ERC721 conformity, checks for 20+ weird token patterns, assesses contract composition and owner privileges, performs on-chain scarcity analysis, and evaluates how protocols handle non-standard tokens. Use when integrating or accepting arbitrary ERC20/ERC721 tokens, auditing a token implementation for standards conformity, or assessing risk from weird tokens such as fee-on-transfer, rebasing, missing return values, or blocklists.

repo: trailofbits/skills

인기도

GitHub 스타
8.0k
순위
#12665
라이선스
CC-BY-SA-4.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬