# Tereno Uniswap V4 Hook Guard

> Tereno Uniswap V4 Hook Guard is a paid API for AI agents from www.tereno.xyz, paid per call via x402, $0.54/call, status unknown (last checked 2026-09-14).

Inspects Uniswap V4 pool hook permission flags and verifies contract deployment safety before swap execution

## Facts

- Endpoint: POST https://www.tereno.xyz/api/v1/capabilities/uniswap.v4.hook.guard/invoke
- Price: $0.54/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tereno-uniswap-v4-hook-guard-0e68ae25
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cX5a16_Mo0hSXoxKeX08B

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tereno-uniswap-v4-hook-guard-0e68ae25 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tereno-uniswap-v4-hook-guard-0e68ae25/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.tereno.xyz](https://www.zero.xyz/host/www.tereno.xyz/llms.txt)
