3️⃣Liquidity Management

One of the cornerstones of RogueX's uniqueness is its ability to unused funds within Uniswap-v3-type liquidity pools. These reserves, which typically sit idle, are strategically deployed to optimize liquidity and improve capital efficiency. RogueX's smart contracts are designed to identify these untapped assets and allocate them in a way that benefits both liquidity providers (LPs) and traders.

By actively utilizing reserve funds, RogueX enhances liquidity in a manner that ultimately providing traders with more favorable trading conditions. At the same time, LPs benefit from increased yield potential, making their participation in RogueX's liquidity provision even more rewarding.

3.1.Reserve Fund Allocation

RogueX’s smart contracts actively monitor the price movement within the trading pair. When a user initiates a trade that falls within a particular price tick, RogueX’s system identifies this and allocates a portion of the reserve funds to that tick. This allocation ensures that the most relevant liquidity is readily available to execute trades at competitive prices.

3.2.Trading Fee Distribution

Trading fees generated from trades executed within a specific reserved tick range are allocated proportionally to the liquidity providers who have placed their assets within that tick range. LPs who have strategically positioned their assets in high-demand price ranges receive a higher share of the trading fees. This incentivizes LPs to concentrate their liquidity where it is most needed, improving trading conditions for users.

3.3. Profit and Loss Allocation

RogueX also considers the profit and loss status within each price tick. When traders make profits or incur losses within a specific tick, the corresponding LPs share in those gains or losses proportionally. This creates a direct link between LP performance and trading activity within their selected price ranges.

3.4 Dynamic Liquidity Management

RogueX’s system continuously adjusts the allocation of reserve funds, transaction fees, and P&L based on the shifting demand and market conditions. This dynamic approach ensures that liquidity remains agile and responsive to the ever-changing DeFi landscape.

3.5 Automated Liquidity Management

RogueX ALM - Automated Liquidity Management is a system that automates the management of liquidity, drawing inspiration from the Gamma protocol. Users first deposit funds into a contract, which then aggregates these funds for liquidity management within a predefined range.

Price Range & Reset Bond: Upon the creation of the first stake transaction, an initial Price Range is set (upper limit: market price * (1+80%); lower limit: market price / (1+80%)), along with a Reset Bond (upper limit: market price * (1+40%); lower limit: market price / (1+40%)).

Rebalance Trigger: A rebalance is triggered when the price exceeds the Reset Bond. The liquidity's Price Range and Reset Bond are then reset according to the latest market price. Initially, each trigger requires a user to perform a deposit or withdrawal. Future updates may include automated rebalancing by bots at scheduled intervals.

Adaptive Price Range: After three consecutive rebalance triggers, the Price Range will expand by 20%. For example, if the initial range was 80%, it will increase to 96%, meaning the new Price Range would be market price * (1+96%) and market price / (1+96%). If there is no rebalance trigger for nine consecutive days, the Price Range will contract by 20%. For instance, if the initial range was 80%, it will decrease to 64%, setting the new Price Range to market price * (1+64%) and market price / (1+64%).

3.6. Liquidity Calculation

When a user adds liquidity to a position, the initial position value (IPV) and Position Profit and Loss (PPnl) is recorded based on the amount of liquidity provided and the accumulated profit and loss of the assets in the pool. Positive PPnL indicates that a liquidity position is profitable, which can incentives LPs to continue providing liquidity to that position. Negative PPnl reflects losses incurred, which might encourage LPs to reconsider their position or risk management strategies.

In uniswap V3:

Δx=Δ1PL\Delta x = \Delta \frac{1}{\sqrt{P}} \cdot L (1)

while in rogueX, when user add or remove liquidity, the formulas that describe the relationship between LL and Δx\Delta x is:

Δx=nrange(ΔP)Δ1PnLn\Delta x = \sum_n^{\text{range}(\Delta P)}{\Delta \frac{1}{\sqrt{P}_n} \cdot L_n } (2)

Last updated