Query Token Audit

Scans token contracts for scams, honeypots, and security vulnerabilities before trading

What Is This?

Overview

Query Token Audit is a development skill designed to perform automated security analysis on blockchain token contracts before any trading or swap operation takes place. It connects to audit APIs that scan contract code, trading behavior, and on-chain metadata to identify potential threats such as honeypots, rug pulls, and malicious contract logic. The skill returns a structured security report covering contract risks, trading risks, and scam detection signals.

This skill is particularly valuable in Web3 development environments where user-facing applications need to protect traders from interacting with dangerous tokens. Rather than relying on manual research or third-party browser extensions, developers can integrate this audit capability directly into their application logic, triggering checks automatically before swaps are executed or token details are displayed.

The skill is sourced from the Binance Web3 team and is versioned at 1.4, reflecting a mature implementation with refined detection heuristics. It is designed to be invoked programmatically, making it suitable for embedding into trading bots, DeFi dashboards, wallet interfaces, and developer toolchains.

Who Should Use This

  • DeFi application developers building swap interfaces who need automated pre-trade safety checks
  • Smart contract auditors who want a fast first-pass analysis before conducting deeper manual reviews
  • Trading bot engineers integrating token safety gates into automated execution pipelines
  • Wallet developers adding token risk warnings to asset display and transaction confirmation screens
  • Security researchers monitoring token deployments for malicious patterns across multiple chains
  • Platform integrators embedding token safety signals into aggregator or portfolio tracking tools

Why Use It?

Problems It Solves

  • Prevents users from unknowingly swapping into honeypot contracts where funds cannot be withdrawn after purchase
  • Detects rug pull indicators such as owner mint privileges, hidden transfer restrictions, and unlocked liquidity
  • Identifies scam tokens that mimic legitimate projects through similar names or contract structures
  • Reduces manual due diligence time by automating contract risk analysis at the point of interaction
  • Provides structured audit output that can be parsed and acted upon programmatically without human review

Core Highlights

  • Detects honeypot contracts by simulating buy and sell transactions against the contract
  • Analyzes owner privileges including mint functions, blacklist controls, and fee manipulation capabilities
  • Checks liquidity lock status and identifies whether liquidity can be removed without notice
  • Returns trading risk scores covering slippage anomalies and tax manipulation
  • Supports multi-chain token auditing across major EVM-compatible networks
  • Provides scam detection signals based on known malicious contract patterns
  • Outputs structured JSON responses suitable for direct integration into application logic
  • Covers both contract-level and market-level risk indicators in a single API call

How to Use It?

Basic Usage

To invoke the skill, pass the token contract address and the target chain identifier to the audit function.

from skills import query_token_audit

result = query_token_audit(
    contract_address="0xTokenContractAddressHere",
    chain_id="56"
)

print(result["contract_risks"])
print(result["trading_risks"])
print(result["scam_detection"])

Specific Scenarios

Pre-swap safety gate: Before executing a token swap, call the audit skill and block the transaction if the honeypot flag is set to true or if the overall risk score exceeds your defined threshold.

Token listing review: When a new token is submitted for listing on a platform, run the audit automatically and route high-risk results to a manual review queue while allowing low-risk tokens to proceed.

Real-World Examples

A DeFi aggregator uses this skill to display a risk badge next to each token in search results, warning users when a contract has owner-controlled transfer restrictions. A trading bot uses the honeypot detection output as a hard stop condition, preventing any buy order from executing on flagged contracts.

When to Use It?

Use Cases

  • Before any automated or user-initiated token swap
  • During token search and discovery flows in wallet or DEX interfaces
  • When onboarding new tokens to a curated list or marketplace
  • Inside trading bots as a pre-execution safety check
  • When responding to user queries about token safety in chat or assistant interfaces
  • During smart contract review workflows as a rapid first-pass tool
  • For monitoring newly deployed contracts on supported chains

Important Notes

Requirements

  • A valid token contract address on a supported EVM-compatible chain
  • A chain ID corresponding to the target network such as 1 for Ethereum or 56 for BNB Chain
  • API access credentials configured for the audit endpoint
  • Network connectivity to the audit service at the time of the call