Watchtower

Atomic Liquidation and Other Actions via 1-time Hooks 4 Sale on Uniswap V4

ETHGlobal TaipeiShipped April 4, 2025Prize winner#defi#uniswap
Visit Repo
Watchtower banner

About

***Watchtower***, a novel protocol for atomic price action triggered interventions. Uniswap V4 Hooks have allowed this protocol to react to price changes caused by executions of swaps. The reactions are atomic first-in-line without a possibility for anyone to intercept and front-run the reacting transaction.

Watchtower allows for anyone to permissionlessly subscribe to desired price actions caused by swaps and and take advantage of the prompt atomic actions as desired. Such actions can be delinquent loan liquidations, limit orders, undercollateralized option and/or derivative liquidations and many other use cases.

The implementation was facilitated by our One-time Hooks, which can be attached and detached dynamically to Uniswap V4 pools.

Watchtower has an economic incentive model that is beneficial to all parties involved.

How it's made

Pure Solidity to implement an elaborate Uniswap V4 hook that can manage dynamic "hooks".

How does this work?

In order to act on-chain, someone needs to initiate the contract call. This is not done by keepers, but by `swap` callers on Uniswap V4. Unknowingly they can cause action trigger calls, which does not cost them anything and they are rewarded for this as well. The user simply visits the Web3 front end of Uniswap V4. As soon as they ask for a swap, the Uniswap V4 calculates a route for the most efficient execution of the swap. Multiple pools can be used, but almost no pool is left behind, as if that happens, the pool in question remains behind with a more favorable price and it becomes even more attractive.

This is achieved via an Uniswap V4 Hook, attached to one of the above described pools. This hook can be used by multiple pools, as many as one would want. However this hook is quite complicated. As Uniswap V4 hooks are permanently attached to the pools, this hook: - Manages a data structure of registered Watch-ers ("hooks for sale"; not Uniswap hooks). These Watch-ers can execute one-time, pay for this to both the swapper and the pool and drop off. - As the price moves, it performs the proper calculation to efficiently trigger the appropriate Watch-ers in constant time ($O(1)$). - Cleans up to avoid storage cost and get storage refunds.

Prizes

  • Nodit · Best Multi-chain App with Nodit's Web3 Data API · 2nd place
  • Uniswap Foundation · Uniswap v4 Hook Integrations · 1st place

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Limit order hook

A gas-optimized hook for Uniswap v4 that enables limit orders by monitoring price movements between ticks. Place orders at target prices and automatically execute trades when conditions are met. Built with Solady's ERC1155 for token positions.

UniswapExeGuard

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

HackMoney 2026Prize winner Dormant#defi#identity

Intent Swap

Agent-executed intent-based swaps on Uniswap v4 using hooks for onchain enforcement