The Multiposition Concentrator
Introduction
In a series of educational articles, we are going to cover the main components of the WAGMI protocol to give you a better understanding of how everything works.
Decentralized finance (DeFi) is always evolving. The heart of our latest deployment is Wagmi, our CLAMM protocol. CLAMM is a foundational component that allows us to construct a variety of strategies on top of it. It’s like the first building block in a complex structure, providing the necessary flexibility for further development.
Evolving fragola
Our next step was to integrate upgraded versions of Popsicle into Wagmi. Popsicle’s Fragola contracts have been enhanced to better suit our needs. The integration process was complex but we had to ensure that the new versions of Fragola seamlessly fit into the Wagmi ecosystem, enhancing its functionality and expanding its capabilities.
The centerpiece of our development is the new version of Fragola, designed to create a multiposition concentrator. This innovative tool aims to offer competitive price execution based on historical volatility for a specific pair. The multiposition concentrator is a game-changer in the DeFi space, offering a more efficient and effective way to manage liquidity.
The concentrator
Unlike the traditional approach of having separate pools for each pair, such as ETH/DAI, the multiposition concentrator integrates a multi pool and multiposition embedded contract. This allows us to pull comprehensive historical data for all available pools on the network. For instance, if the Fantom chain generates 10m monthly volume of ETH/DAI trades, we can use this data to backtest the necessary liquidity to fulfill all trades with optimal price execution across various fee tiers.
Picture 1: Strategies page on Wagmi.com
The data acquired is then used to dynamically allocate liquidity and concentrate it in appropriate fee tiers. This ensures profitability for liquidity providers (LPers) while optimizing price execution based on market conditions. For example, when volatility affects a 0.05% position and a 0.3% position, we shift liquidity towards a 1% pool to protect LPers from fixing losses on the strategy. This strategy essentially creates four positions for each pair: a 0.05% wide position for small volatility capturing, a 0.3% position for day trading, and two single side 1% positions on both sides of a liquidity chart.
Rebalancing process
We’ve also revamped the rebalancing process. The new mechanism doesn’t rely on a single method to fix losses. Instead, rebalancing liquidity is achieved within the fee tiers and contract positions, especially when the market experiences a significant shift. A series of small limit orders are placed in the pool to offset the swap fees that LPers have to pay. If these micro orders are not filled, the pools undergo a partial rebalance through aggregators and their limit orders. If this approach fails, a just-in-time (JIT) transaction is triggered via the treasury to minimize losses for LPers during the rebalance process.
Maintaining liquidity depth
To ensure the necessary liquidity depth and offer attractive APY while safeguarding LPers from impermanent loss (IL), we’re implementing emissions in a limited number of strategies. This is done to maintain the required liquidity within certain ranges to meet market demand. For example, having 300k TVL (total value locked) in a pool may be sufficient for good price execution, but it would necessitate four rebalances in a month. On the other hand, with 500k TVL, we can sustain the volume with just one partial rebalance, resulting in higher fees for users and limiting emissions.
At Wagmi, we prioritize tracking and transparency. We’re introducing a number of tools to enable users to understand how their liquidity is being used and the profits they have obtained. These tools will provide users with real-time insights into their investments, allowing them to make informed decisions and maximize their returns.
Picture 2: Strategies page on Wagmi.com
We are looking forward to people using our liquidity depth framework to create optimal strategies and conduct independent backtesting.
Conclusion
In conclusion, the multiposition concentrator represents a significant step forward in the DeFi space. By leveraging the power of CLAMM, integrating upgraded versions of Popsicle into Wagmi, and introducing the new version of Fragola, we’re paving the way for more efficient and profitable DeFi strategies for our users.