{"uid":"cap_cX5a16_Mo0hSXoxKeX08B","slug":"tereno-uniswap-v4-hook-guard-0e68ae25","name":"Tereno Uniswap V4 Hook Guard","description":"Is this Uniswap V4 pool and hook safe to interact with? Inspect hook permission flags (dynamic fee, callbacks, delta modification) and verify contract deployment before swap execution.","url":"https://www.tereno.xyz/api/v1/capabilities/uniswap.v4.hook.guard/invoke","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"fee":{"type":"integer","maximum":16777215,"minimum":0,"description":"Fee tier or dynamic fee flag (24-bit uint)."},"hooks":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Hook contract address (or 0x0 for none)."},"currency0":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"First token address in the pool."},"currency1":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Second token address in the pool."},"poolManager":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Uniswap V4 PoolManager address."},"tickSpacing":{"type":"integer","minimum":1,"description":"Pool tick spacing."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.54","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.54/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.54","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.54","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_K1_cxKY3oHSOliEvh6CZL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.54","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Inspects Uniswap V4 pool hook permission flags and verifies contract deployment safety before swap execution","exampleAgentPrompt":"Before I swap on this Uniswap V4 pool, check if the hook at 0xAbCd...1234 is safe — the pool uses currency0 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, currency1 0x4200000000000000000000000000000000000006, poolManager 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, tick spacing 60, and fee 3000.","exampleUseCases":[{"title":"Pre-swap hook safety check","prompt":"I'm about to swap on a Uniswap V4 pool — can you verify the hook at 0xDeAd...BeeF is safe? The pool is currency0 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, currency1 0x4200000000000000000000000000000000000006, poolManager 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, tick spacing 10, and fee 500."},{"title":"Dynamic fee hook permission audit","prompt":"This Uniswap V4 pool has a dynamic fee set — check the hook at 0x1111...2222 with currency0 0x4200000000000000000000000000000000000006, currency1 0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb, poolManager 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, tick spacing 60, and fee 8388608 and tell me which callbacks it has enabled."},{"title":"New pool hook deployment verification","prompt":"A new V4 pool just launched with a hook at 0xFeed...Face — can you confirm the hook contract is actually deployed and inspect its permission flags? Pool details: currency0 0x940181a94A35A4569E4529A3CDfB74e38FD98631, currency1 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, poolManager 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, tick spacing 200, fee 10000."}],"resultDescription":"Returns a safety assessment of the Uniswap V4 pool hook, including decoded hook permission flags (dynamic fee enabled, which before/after callbacks are active, delta modification capability), confirmation of whether the hook contract is actually deployed on-chain, and an overall verdict on whether the pool is safe to interact with.","failureModes":["Hook address does not match expected Uniswap V4 hook address encoding pattern — permissions may be misread","Hook contract address is not deployed on-chain — returns deployment verification failure","Invalid Ethereum address format for hooks, currency0, currency1, or poolManager — returns 400 validation error","PoolManager address is incorrect or not a valid Uniswap V4 PoolManager — analysis may be unreliable","Fee value out of 24-bit range (>16777215) — returns validation error","Tick spacing below minimum (less than 1) — returns validation error","Network congestion or RPC failure causing inability to verify on-chain contract state"],"whenToPreferThis":"Use this endpoint when an AI agent or DeFi workflow needs to programmatically verify the safety of a Uniswap V4 pool hook before executing a swap, especially when interacting with unfamiliar or newly deployed pools. Prefer this over generic contract scanners when you need Uniswap V4-specific hook flag decoding (dynamic fees, before/after swap callbacks, delta modifications) combined with deployment verification in a single call. Ideal for automated trading bots, swap aggregators, and DeFi safety layers that need a fast, structured safety verdict rather than a manual audit.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:43:10.912Z","isFirstParty":false}