project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Unihook

Market Maker Hook aims to extend a real case based on Aggregator Hook. When a user initiates a transaction, the hook is called to add liquidity, allowing users to use quote from orderbook directly. It makes it possible for Market Maker to seamlessly integrate into Uniswap V4.

Unihook

Created At

ETHGlobal San Francisco

Winner of

Uniswap Foundation - Hooks, Hooks, and Hooks 1st place

Project Description

The current market makers built upon Uniswap V4 have the problem of not knowing a better quote from outside. Besides, without a hook, users cannot put a limit order for trade on Uniswap. We went through the implementation of the limit order hook and found that it doesn’t process the spread issue, which may also lead to imprecise quotes. Based on these insights, we create a Market Maker Hook, which aims to extend a real case based upon Aggregator Hook – MatchEngine is used to maintain the order book provided by different Market Makers. Aggregator Hook projects quotes from the external market makers and offers a better quote with little difference by calculating the exact tick given deltaX and deltaY. When a user initiates a transaction, the Aggregator Hook adds liquidity into an empty pool, allowing users to leverage the better quote from the order book directly. This design resolves the need for limited orders and allows Market Maker to integrate seamlessly into Uniswap V4.

How it's Made

We use Uniswap V4 Hook and Framework. It introduces a powerful and flexible way to extend the functionality of Uniswap's decentralized exchange. With hooks, developers can customize and optimize various aspects of liquidity pools, such as executing trades, managing fees, and integrating external data, allowing for a more versatile and efficient trading experience on the platform. We create a hook based on the framework to map LP positions from various DEXs to Uniswap ticks effectively using Solidity. The logic includes liquidity mapping and interaction with both Uniswap pool and other DEXs by utilizing APIs or smart contracts to fetch and interpret liquidity data. A frontend is also created to demonstrate the implementation of this hook.

background image mobile

Join the mailing list

Get the latest news and updates