{"uid":"cap_Dvbc1bo0SUflbVoagardA","slug":"uniswap-v4-hook-security-scanner-rug-check-api-c9c67979","name":"Uniswap v4 Hook Security Scanner & Rug-Check API","description":"Uniswap v4 hook capability scan on Base mainnet. Decodes all 14 permission bits from the hook address per v4-core Hooks.sol, flags swap custody, fee-taking and EIP-1967 upgradeability, and verifies source by Basescan/Sourcify/Blockscout consensus. Returns custodyClass PASSIVE|FLOW_CONTROL|FEE_TAKING|SWAP_CUSTODY|OPAQUE, flags[], riskFlags[] and verificationState. Requires ?address=0x + 40 hex. Errors: 400 invalid_address, 502 analysis_failed. Capability analysis - it never outputs SAFE.","url":"https://x402.donnyautomation.com/v4hooks","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"address":{"type":"string","description":"Uniswap v4 hook contract address on Base mainnet (0x + 40 hex chars)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"flags":["beforeSwap","afterSwap","beforeSwapReturnDelta","afterSwapReturnDelta"],"address":"0x000052423c1db6b7ff8641b85a7eefc7b2791888","chainId":8453,"network":"base","deployed":true,"verified":true,"riskFlags":["SWAP_DELTA_CUSTODY"],"disclaimer":"Capability analysis of on-chain state. We classify what a hook CAN do; we never output SAFE.","upgradeable":false,"custodyClass":"SWAP_CUSTODY","verificationState":"VERIFIED"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jEBi11D4UqMyMfL_Ks4Yr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Decodes all 14 Uniswap v4 hook permission bits from a contract address on Base mainnet, flags security risks (swap custody, fee-taking, upgradeable proxies), and returns a custody class and risk profile for pre-trade safety gating.","exampleAgentPrompt":"Before I swap on this Uniswap v4 pool, can you scan the hook at 0x1234567890abcdef1234567890abcdef12345678 on Base mainnet and tell me its custody class and any risk flags — specifically whether it takes fee custody or is upgradeable?","exampleUseCases":[{"title":"Pre-trade DEX router safety gate","prompt":"I'm about to route a swap through a Uniswap v4 pool on Base — can you check the hook at 0xabc123def456abc123def456abc123def456abc1 and tell me if it's PASSIVE or SWAP_CUSTODY, and whether it's verified on Basescan?"},{"title":"Token scanner rug-check integration","prompt":"Run a rug check on this Uniswap v4 hook contract: 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef on Base mainnet. I need to know if it has fee-taking permissions, is EIP-1967 upgradeable, and what risk flags come back."},{"title":"Trading bot hook permission audit","prompt":"My trading bot is evaluating a new v4 pool on Base — can you decode all 14 hook permission bits for hook address 0x0000000000000000000000000000000000000001 and classify its custody class so I can decide whether to allow trades through it?"}],"resultDescription":"Returns the hook's custody class (one of PASSIVE, FLOW_CONTROL, FEE_TAKING, SWAP_CUSTODY, or OPAQUE), all 14 decoded permission bits per Uniswap v4-core Hooks.sol, specific risk flags (swap custody, fee-taking, EIP-1967 upgradeability), and source verification state via Basescan/Sourcify/Blockscout consensus. Never returns a blanket SAFE verdict — only a capability and risk analysis.","failureModes":["Invalid or malformed address (not 0x + 40 hex chars) returns error","Address not on Base mainnet returns no data or error","Unverified contract with no source returns OPAQUE custody class","Network or RPC timeout on Base mainnet causes degraded response","Non-hook contract address returns unexpected permission bit profile"],"whenToPreferThis":"Use this endpoint when you need to perform pre-trade safety analysis specifically for Uniswap v4 hooks on Base mainnet. Prefer it over generic contract scanners because it decodes all 14 v4-specific hook permission bits and classifies custody class per Uniswap v4-core semantics, with multi-source verification consensus. Ideal for DEX routers, trading bots, and token scanners that need a fast, cheap ($0.01/call) machine-readable risk gate before executing swaps.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:35:37.940Z","isFirstParty":false}