Chuyển đến nội dung
Skillpedia
Bảo mật8.0k · #12665

token-integration-analyzer

Skill này làm gì

Phân tích contract token và các tích hợp của chúng để kiểm tra tuân thủ chuẩn và các hành vi bất thường đã biết của token. Dành cho lập trình viên tạo token hoặc chấp nhận token tùy ý trong giao thức của mình.

Khi nào nên dùng

  • ✓Khi lập trình viên xây dựng token ERC20 hoặc ERC721 và muốn kiểm tra nó đúng chuẩn.
  • ✓Khi nhóm tích hợp hoặc chấp nhận token tùy ý và muốn xử lý an toàn các token bất thường.
  • ✓Khi kiểm toán viên muốn kiểm tra đặc quyền của chủ sở hữu hoặc độ khan hiếm token trên một contract đã triển khai.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/trailofbits/skills/blob/main/plugins/building-secure-contracts/skills/token-integration-analyzer/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Giao thức của tôi chấp nhận bất kỳ token ERC20 nào. Kiểm tra cách nó xử lý các token bất thường phá vỡ quy tắc thông thường.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill xem code token, đối chiếu với hơn 20 mẫu token bất thường đã biết, và review đặc quyền của chủ sở hữu. Nó cũng có thể truy vấn contract đã triển khai để lấy thông tin về nguồn cung và cấu hình.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Token kỳ lạ là gì?

Đó là các token không hoạt động như chuẩn, như token có quy tắc chuyển khoản bất thường. Skill kiểm tra hơn 20 mẫu đã biết.

Nó có kiểm tra token đã triển khai không?

Có. Nó có thể phân tích độ khan hiếm, phân phối và cấu hình trên chuỗi.

Nó có chỉ làm việc với Solidity không?

Nó chủ yếu nhắm đến Ethereum và các chuỗi EVM khác, và nó có thể dùng công cụ Slither cho dự án Solidity.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
8.0k
Vị trí xếp hạng
#12665
Giấy phép
CC-BY-SA-4.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự