Dynamic LP on Uniswap V3
Liquidity Provision (LP)
Liquidity providers (LPs) play a critical role in decentralized exchanges (DEXs) like Uniswap by depositing assets into trading pools, enabling seamless token swaps for users. In return, LPs earn fees proportional to their share of the pool. However, traditional LP strategies often face challenges such as impermanent loss (temporary losses due to price volatility) and inefficient capital allocation.
Uniswap V3: Concentrated Liquidity
Uniswap V3 revolutionized decentralized finance (DeFi) by introducing concentrated liquidity, allowing LPs to allocate capital within custom price ranges instead of the entire price spectrum. This granular control empowers LPs to maximize fee generation by focusing liquidity where trading activity is most likely to occur. However, manually adjusting these ranges to respond to market volatility remains complex and time-sensitive.
Dynamic LP
Dynamic Liquidity Provisioning is an advanced strategy that automatically adjusts the position of liquidity based on market volatility. Instead of statically allocating liquidity within fixed price ranges, dynamic LP systems use real-time market data and statistical models to optimize the allocation and rebalance positions. The goal is to adapt to changing market conditions, adapt exposure during periods of high volatility, and maximize fee generation with dynamic price ranges (i.e. position width).
Almanak Strategy Framework
Almanak's Strategy Framework allows for an Agent to run such a strategy 24/7 by constantly monitoring the market conditions and automatically rebalancing its position(s) across one or several pool(s).
For the initial launch, we are limiting the framework to Uniswap V3 and on Base, Arbitrum, and Mainnet. More chains and protocols will be available shortly after the initial launch.
This use case, which represents a typical DeFi use case, is the perfect starting example to start showcasing our stack and its potential. It highlights:
- State Machine Robustness (with Sadflow handling)
- Action Abstraction (i.e. Intent)
- Onchain Transaction Automation
- Wallet Safety and Security via SAFE (customizable permissions)
Strategies
For the initial launch, we are introducing three variations of a Dynamic LP strategy, available as examples for users to explore on the Almanak Platform:
- Dynamic LP Degen: focusing on tail and degen assets.
- Dynamic LP Blue Chip: focusing on blue chip and stable assets.
- Dynamic LP Maxi: focusing on a single key asset based on the chain and its culture.
These strategies are fully automated, with Agents executing user-defined logic based on pre-configured parameters. Our Strategy Framework also offers robust error handling with smart retries compared to other frameworks stopping the workflow for any transaction not included in a block. The blockchain is a wild environment and our Agent & Strategy Framework is ready for it!
The platform encourages the following rules when developing a strategy: 1- The Strategy must never do anything stupid. 2- In doubt, refer to rule #1.
What it means is that the Agent will handle all errors it understands and will call for human intervention should any unknown situation occur.
Configuration
The Dynamic LP strategies offer similar configurations consisting of mainly:
- Data Source: source of information for market conditions (e.g. CoinGecko, Binance, etc.)
- Granularity: 1m, 5m, 30m, 1h, 1d, 1w, etc. and anything in between for maximum flexibility.
- Volatility Model: how to model volatility - could be as simple as std or using fancier models.
... and a multitude of other parameters! You will find more details for each of these strategies via the Strategy Library on the platform.