deep_semantic_audit
Audit proposal claims against target contract bytecode and calldata using LLM evaluation and risk scoring to approve, flag for review, or reject transactions.
Instructions
Stage 2 Paid ($0.05 USDC via x402 on Base Mainnet) hybrid audit combining Stage 1 on-chain gatekeeping with Stage 2 Gemini LLM evaluation to verify proposal_description claims against target_address bytecode and calldata under policy_prompt. Non-idempotent due to LLM evaluation and single-use EIP-3009 x402_payment_header nonce; omitting x402_payment_header safely returns an HTTP 402 payment challenge without charging. Breaching risk_threshold (0.0-10.0) escalates decision to REJECT. Returns JSON with status, decision (APPROVE, MANUAL_REVIEW, REJECT), risk_score, reasoning, and flagged_issues.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target_address": "<target_address>",
"proposal_description": "<proposal_description>"
},
"name": "deep_semantic_audit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calldata | No | Transaction hex calldata or function selector being executed | 0x |
| chain_id | No | EVM Chain ID (default: 8453 for Base Mainnet) | |
| policy_prompt | No | Security policy or governance criteria to audit against | Audit contract and proposal for unauthorized privilege escalation, proxy upgrades, honeypot traps, or treasury drainage. |
| risk_threshold | No | Risk score threshold (0.0 to 10.0) above which the audit triggers rejection or alert | |
| target_address | Yes | Hex EVM address of smart contract under evaluation | |
| x402_payment_header | No | Optional Base64-encoded EIP-3009 transferWithAuthorization payment header satisfying $0.05 USDC requirement | |
| proposal_description | Yes | Natural language claim or governance proposal description explaining the intent of the transaction |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | ||
| stage | Yes | ||
| status | Yes | ||
| decision | No | ||
| reasoning | No | ||
| risk_score | No | ||
| llm_invoked | No | ||
| status_code | No | ||
| flagged_issues | No |