{
  "tool_id": "art-709-v4-hook-fee-conformance",
  "kernel_id": "art-709-v4-hook-fee-conformance",
  "display_name": "V4 Hook Fee Conformance",
  "tool_version": "1.0.0",
  "mandate_type": "compliance_control",
  "purpose": "Recomputes a Uniswap v4 pool's per-swap fee from v4-core's own fee rules at the pinned commit a7cf038cd568801a79a9b4cf92cd5b52c95c8585 (ProtocolFeeLibrary.sol calculateSwapFee: swapFee = protocolFee + lpFee - protocolFee*lpFee/1e6; Pool.sol L307 the protocol-fee-zero pass-through and L310-316 the MAX_SWAP_FEE revert, which applies to exact-out swaps only; LPFeeLibrary.sol the 0x400000 override flag, the 0x800000 dynamic flag and MAX_LP_FEE 1,000,000) and checks each swap's emitted fee against that recomposition: per-swap CONFORMS, OUT_OF_BOUNDS (LP fee outside the declared bounds or over MAX_LP_FEE) or FEE_MISMATCH (the declared fee story does not explain what the pool charged). Validates the packed two-direction protocol fee with isValidProtocolFee (each direction <= 1000 pips), decodes a per-swap LP-fee override by stripping its flag per REMOVE_OVERRIDE_MASK (read only on a dynamic pool, per Hooks.sol beforeSwap; on a static pool it is ignored), enforces the declared total fee cap (swap fee + hook charge), accrues a separately declared hook charge per swap and per recipient in integer floor arithmetic with every remainder reported, and reports LP revenue (amount_in * lpFee / 1e6) side by side, never netted against the hook charge; LP revenue stays LP revenue. An exact-out swap whose composed fee is at or above MAX_SWAP_FEE (where v4 reverts) and a dynamic pool fee (0x800000) without a per-swap override are reported INDETERMINATE rather than guessed; an exact-in swap at that fee is checked like any other. Evidence artifact only: it states no opinion on whether a fee is lawful. Zero network: the node never reads a chain and recomputes only what the caller supplies.",
  "control_description": "Recomputes a Uniswap v4 pool's per-swap fee from v4-core's own fee rules at the pinned commit a7cf038cd568801a79a9b4cf92cd5b52c95c8585 (ProtocolFeeLibrary.sol calculateSwapFee: swapFee = protocolFee + lpFee - protocolFee*lpFee/1e6; Pool.sol L307 the protocol-fee-zero pass-through and L310-316 the MAX_SWAP_FEE revert, which applies to exact-out swaps only; LPFeeLibrary.sol the 0x400000 override flag, the 0x800000 dynamic flag and MAX_LP_FEE 1,000,000) and checks each swap's emitted fee against that recomposition: per-swap CONFORMS, OUT_OF_BOUNDS (LP fee outside the declared bounds or over MAX_LP_FEE) or FEE_MISMATCH (the declared fee story does not explain what the pool charged). Validates the packed two-direction protocol fee with isValidProtocolFee (each direction <= 1000 pips), decodes a per-swap LP-fee override by stripping its flag per REMOVE_OVERRIDE_MASK (read only on a dynamic pool, per Hooks.sol beforeSwap; on a static pool it is ignored), enforces the declared total fee cap (swap fee + hook charge), accrues a separately declared hook charge per swap and per recipient in integer floor arithmetic with every remainder reported, and reports LP revenue (amount_in * lpFee / 1e6) side by side, never netted against the hook charge; LP revenue stays LP revenue. An exact-out swap whose composed fee is at or above MAX_SWAP_FEE (where v4 reverts) and a dynamic pool fee (0x800000) without a per-swap override are reported INDETERMINATE rather than guessed; an exact-in swap at that fee is checked like any other. Evidence artifact only: it states no opinion on whether a fee is lawful. Zero network: the node never reads a chain and recomputes only what the caller supplies.",
  "declared_inputs": [],
  "declared_outputs": [],
  "kernel_digest": "sha256:68ca34965c2b4f1c5f10617b45c673cf3034c7fe65de08d9cf763d9e0bb04a27",
  "trust_label": "independently verified: zkVM execution proof (risc0/groth16-bn254)",
  "data_vintage": "2026-10-17",
  "last_validated": "2026-10-17",
  "conformance_fixtures_vendored": true,
  "compute_proof_ready": "ready",
  "wave": 128,
  "source_url": "https://ainumbers.co/chaingraph/art-709-v4-hook-fee-conformance.html",
  "generated_at": "2026-10-22T16:58:00.450Z"
}
