UniswapExeGuard

A Uniswap v4 hook that enforces institutional-style execution policies at swap time.

UniswapExeGuard

Created At

HackMoney 2026

Winner of

ENS

ENS - Integrate ENS

Prize Pool

Project Description

UniswapExeGuard is a Uniswap v4 execution guard that enforces deterministic, on-chain execution policies at swap time. Using a beforeSwap hook, pools can restrict swap size and enforce cooldowns per trader without modifying Uniswap core contracts.

Policies are configured using ENS names for human-readable operations, but enforced purely by address during execution. This demonstrates how Uniswap v4 hooks can act as programmable execution firewalls, enabling safer and more controlled AMM usage for institutional and regulated environments.

The hook intercepts swaps and enforces predefined execution policies (e.g. maximum trade size), allowing or blocking trades in a transparent and verifiable way.

This project focuses on protocol-level market design rather than UI or user onboarding

How it's Made

UniswapExeGuard is built on Uniswap v4’s hook architecture.

A custom hook contract implements beforeSwap and is deployed with the appropriate hook permission flags. Before a swap executes, the hook checks a PolicyRegistry contract that stores per-address execution rules such as maximum swap size and cooldown duration.

ENS is used only during policy setup: ENS names are resolved once to addresses and stored on-chain, ensuring no ENS resolution occurs in the swap execution path. If a policy is violated, the hook reverts the swap; otherwise, the swap proceeds and emits audit events.

The system is fully on-chain, deterministic, and composable, illustrating how Uniswap v4 hooks enable new execution-layer primitives beyond pricing logic.

background image mobile

Join the mailing list

Get the latest news and updates

UniswapExeGuard | ETHGlobal