Made using Use this Template
requires foundry
forge install
forge test
- A uniswap hook to adjust fee based on change in pool price at t and t-1 block.
- Original formula proposed by Nezlobin,
δ=cΔ, for some c>0.
δ represents change in fees, increase the fee for buys and lower the fee for sales δ for price change Δ.
With this implementation and simulation environment with limited dataset, we saw some improvements varying where fees collected by LPs were increased by 0.2 to 0.05% than normal pool.
The simulation in following results
However, we can iterate on the above idea and improve several aspects of it to make more profitable for LPs and fair for swappers.
-
One such improvement can be the implementation of anti fragile fees, inspired by Anti Fragility coined by Nassim Taleb.
-
Value of
ccan also be made dynamic but further research is required to determine which factors should be considered in determining a new value ofcthat will change the fees.