Dynamic Liquidity Providing in AMM's
Description to our first strategy
Intro to Uniswap V3 Concentrated Liquidity
In Uniswap v3, concentrated liquidity refers to a feature that allows liquidity providers (LPs) to concentrate their funds within specific price ranges or "ticks" in the trading pair's price range. This is a departure from the traditional approach in earlier versions of Uniswap, where liquidity was evenly spread across the entire price range.
Concentrated liquidity offers several advantages for LPs. By focusing their liquidity within specific price ranges, LPs can potentially capture more trading fees during volatile market conditions when price movements are concentrated within those ranges. This can lead to increased capital efficiency and higher returns for LPs.
To implement concentrated liquidity, LPs specify the price range they want to provide liquidity for by selecting the tick spacing and the number of ticks they want to cover. Each tick represents a specific price point, and by choosing a narrower tick spacing, LPs can provide liquidity to a more granular and specific range of prices. The number of ticks determines the size of the price range the LP wants to cover.
The introduction of concentrated liquidity pools has brought forth a fresh concern for liquidity providers (LPs), which is known as impermanent loss. Addressing impermanent loss poses a significant challenge, resulting in increased complexity and risk for the typical user engaging in liquidity provision.
When concentrated liquidity was first implemented, there was a notable absence of analytics to assess the performance and profitability of LP positions. Additionally, there were no standardized metrics available for quantifying impermanent loss.
To tackle the complexities arising from concentrated liquidity, various protocols have emerged, such as Concentrated Liquidity Managers (CLMs) or Concentrated Liquidity Market Makers (CLMMs). These protocols are specifically designed to address the unique challenges posed by concentrated liquidity.
It's important to note that different liquidity managers have varying priorities, with some concentrating on specific aspects of concentrated liquidity, while others offer comprehensive solutions covering a wide range of functions.
Concentrated liquidity in Uniswap v3 offers LPs more control over their capital allocation and allows them to optimize their returns based on their risk appetite and market expectations. However, it also requires LPs to actively manage their positions and adjust their liquidity as market conditions change to maintain the desired concentration.
The YF strategy
YF's Dynamic Rebalancing contract is the first of the strategies provided to take the maximum potential out of concentrated liquidity providing.
When specific triggers are met, the liquidity ranges are automatically adjusted for rebalancing. These ranges can be established for a specific pair, and rebalancing is triggered when the price moves a certain percentage in either direction.
Into the selection of triggers we consider variables like the pool price change over time, liquidity available, swap fee in the specified pool, pair volatility, traded volume, competition, among others.
One important aspect is to consider the gas fees generated by rebalancing in the pool and the time the investor locks its tokens in the strategy. As gas fees could be high depending on the chain, our strategy considers a locking period for the assets in the strategy to ensure that the profits are higher than the fees consumed.
Our team also analyzes the different pools available through concentrated liquidity and find the most utility efficient.
Our strategy works in Uniswap V3 for now but we will soon apply it into other DeFi protocols and blockchains as we mature.
Mechanism
The interaction with the user in an Uniswap V3 pool looks like the following graph:
Interaction
The user connects its wallet into the YF protocol, and stakes his tokens into the YF contract.
YF initiates a liquidity position according to the strategy specified, this process is basically minting an NFT (which we will call pNFT), where after creating a position in the pool, Uniswap's protocol sends a pNFT to the sender address (the YF contract) with the details of the position.
In this point, the YF contract holds the pNFT, evidencing the user's liquidity position. Next, a new NFT (which we will call iNFT) is minted and sent to the user's address. A mapping between iNFT and pNFT is created and stored into the smart contract, where iNFT is associated to uniswap's pNFT's tokenId.
Next, the rebalancing strategy initiates, burning back pNFT to collect the fees generated from providing liquidity, and reinvesting into a new liquidity range as the price moves. This last action creates a new pNFT which is sent to YF's contract and mapped to the adequate user's iNFT. This process is repeated multiple times.
When the investor wishes to withdraw from the strategy, it sends back his iNFT to the YF contract. There, as the mapping with pNFT is known, the appropriate pNFT is burned and the fees are collected and transferred back to the investor.
Since the strategy is computationally heavy, it doesn't run on the blockchain. Instead, it runs in a separate server. This way, we can send heavy loads of blockchain data into the strategy, analyze it and backtest it without any problem and at fast speeds. Then, when appropriate, the server triggers the rebalancing function in the YF smart contract with the adequate parameters to keep a profitable position in the pool.
Fees
Fees generated and distribution
As mentioned above, in a ETH-USDC 0.3% pool for each 100 ETH swapped into USDC, the pool earns 0.3 ETH, which is then distributed to LP’s in the position. This means that the more swaps occur the better. This also means that the less LP’s in a pool, the better so that you can win more of this. (Coming soon our strategy will look for the pools where the strategy would run best!)
You can always keep track of your position in our dashboard, together with your position relative to other's using our strategy. You are able to see the fees your liquidity generated, risk measures, and more.
The fees generated are not used back into the strategy unless you withdraw your funds and open a new position.
Management fees
To account for transaction costs, we charge an initial fixed fee of 0.006 ETH (10USD) to cover for estimated gas fees. This value can range between 0.005 ETH and 0.01 ETH depending on the characteristics of the pool like the chain in which it is located.
We also charge a 40% fee over earnings to continue with YielldForge’s operations. We are confident our strategies are profitable and work seamlessly. You can see our live backtester for evidence of this!
Last updated