AlphaHook is an attempt to leverage Uniswap V4 hooks to generate dynamic pool fees by using Chainlink Oracles.
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.
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.