project screenshot 1
project screenshot 2
project screenshot 3

AlphaHook

AlphaHook is an attempt to leverage Uniswap V4 hooks to generate dynamic pool fees by using Chainlink Oracles.

AlphaHook

Created At

ETHGlobal Singapore

Project Description

In Uniswap V3, fees are set for a given pool. Therefore, when a pair becomes more or less risky for liquidity providers, the fees can't be adjust and they have to manually withdraw and deposit to the pool with the right fees. Moreover, the current architecture allows only 4 - discrete - pools fees: 0.01%, 0.05%, 0.3% and 1%.

Uniswap V4 hooks allow developers to create custom - dynamic - fees for a pool.

Such architecture can use a wide array of variables to generate a pool fee that makes the most sense at a given time. One can think about the volatility of a pool, its liquidity, activity, age, etc. Things get even better when we connect oracles such as Chainlink. The great price feed and rate and volatility feeds are a perfect match.

Disclaimers

  • The contract should be thoroughly audited, as it may be susceptible to oracle attacks.
  • We need to carefully consider the price impact of this hook, given its complexity and external dependencies on oracles.
  • The final fee formula requires proper simulation, testing, and fine-tuning. Due to time constraints, we were unable to perfect the formula. While this hackathon project is a proof of concept, we believe these ideas have the potential to unlock significant value for the protocol.

How it's Made

Our project is based on the Uniswap V4 template. We have create a custom hook contract which computes the fees according to different variables.

The hook contracts relies on Chainlink Oracles (price / rate and volatility fees) to compute the final values.

We have also experimented with a frontend (/frontend folder) as we believe that if the contract exposes the right variables and functions, we can build a great UI for both traders and liquidity providers (to understand how the fee is calculated, etc.). However, we didn't have time to connect it to the contract and to deploy it.

background image mobile

Join the mailing list

Get the latest news and updates