【Bunni】First DEX built on Uniswap v4 / Liquidity Density Function allows customization of liquidity and reinvestment of idle assets / @bunni_xyz
Could be the DEX standard for the future.
Good morning.
Mitsui from web3 researcher.
Today I researched "Bunni".
🐇What isBunni?
⚙️Technical Details
🚩Transition and Outlook
💧Token Economics
💬Uniswap v4 is a quiet revolution
🐇What is Bunni?
Bunni v2is the first project built on Uniswap v4 as a DEX.is the first project built on Uniswap v4 as a DEX, leveraging the "Hooks" feature provided by Uniswap v4, designed to maximize liquidity provider (LP) profit and improve LP profitability in all market conditions.
In existing DEXes such as Uniswap v3, liquidity is provided uniformly within a specific range or spread throughout the pool.Bunni v2, on the other hand, allocates liquidity in any shape, allowing strategies such as a thicker allocation in the middle for stable token pairs and thicker allocation at both ends for more volatile pairs.For example, a strategy such as allocating a thicker center for stable token pairs and a thicker both ends for pairs with high volatility can be used..
This flexibility is achieved without additional gas costs, allowing LPs to manage their positions efficiently and dynamically.Also, whereas Uniswap v3 represented LP positions in NFTs, Bunni v2 issues ERC-20 LP tokensfor each pool.and have a divisible liquidity share, making it easy to integrate with other DeFi protocols.
These differences set Bunni v2 apart from existing DEXsby providing "programmable liquidity"and are designed to maximize revenue without the hassle of manual management.It is designed to provide LPs with the ability to maximize revenue without the hassle of manual management.
Before I go into more specific details, I would like to briefly explain how the existing DEX works in the first place, but please understand that this is only an example and a simplified explanation, as there are many different types of DEX.
Without this understanding, it is impossible to understand the features of Bunni v2.
The first issue that traditional DEXs have had is the high risk of liquidity providers (LPs) due to impermanent losses (ILs).
A common problem with most DEXs that employ AMM, such as Uniswap v2 and v3, is that an LP's asset value can be reduced by losing arbitrage gains to outside arbitragers during price volatility.(This is a bit complicated and will be explained in another article, so if you have difficulty understanding it, please skip it, it is a core part of how DEXs work.)
Another problem for LPs was the lack of capital efficiency.This was because in many cases when funds were offered, they were not used effectively, with little trading taking place at most price points.
On the other hand, from the trader's perspective, there were also issues such as "high gas costs" and "large slippage when making slightly larger swaps," especially when LPs were dispersed in fine price ranges with concentrated liquidity, and there were situations where there was not enough liquidity at the rate sought, causing inconvenience.
The totality of these issues tended to make the user experience a "lossy exchange," meaning that it was difficult for LPs to make money and expensive for traders.
Bunni v2 aims to significantly increase the overall efficiency and user-friendliness of the DEX by introducing new mechanisms to address arbitrage at the root of these problems, automatically optimize liquidity provision, and dynamically control swap fees.
⚙️Technical Details
Now we will get into more specific details, which may be a bit difficult if you do not have a basic understanding of DEX, but we hope you will do your best to see just what you can understand.I think this is a rather innovative DEX and has the potential to become a standard in the future.(Please DM me with any questions!)
Working with Uniswap v4
Bunni v2 is built using the "hooks" feature of Uniswap v4.Bunni v2 uses this to implement advanced AMM functionality.Specifically, Bunni v2 has a hook for Uniswap v4 called BunniHookin its core contracts, which does its own processing during swapIt does its own processing at swap time.
This hook allows for automatic adjustment (rebalancing) of the liquidity distribution with each price change and the application of proprietary fee logic.Liquidity itself is basically managed on the Uniswap v4 pool structure, but LPs can deposit and withdraw funds via BunniHubcontracts.and withdraw funds through the contract.
The LP share of each pool is issued as an ERC-20 tokenBunniToken and the userBy receiving it, the user retains the rights as a liquidity provider (fee income and withdrawal request rights).
Liquidity Density Function (LDF)
Unlike Uniswap v3's "uniform liquidity within a price range", Bunni v2defines the liquidity distribution with a function.LDF allows for fine-tuned customization of liquidity by price range, with profiles that, for example, concentrate liquidity near the current price or make it thinner as you move away from the price.
Liquidity is allocated according to the LDF selected when each pool is created, which makes it possible to provide liquidity of any shape (any-shape liquidity). By using LDF, even if prices fluctuate greatly, the gas cost of the swap processing is designed to be kept constant regardless of the price range, making it efficient even for large-scale swaps.
Keep reading with a 7-day free trial
Subscribe to web3 Research to keep reading this post and get 7 days of free access to the full post archives.