Description: Design a mechanism that tracks how long a user has provided liquidity and guarantees them a minimum return (offsetting impermanent loss) if they stay in the pool longer than 90 days.
Context / Motivation: Impermanent loss is the biggest deterrent to DeFi liquidity. By utilizing a protocol treasury to insure long-term LPs, TradeFlow can capture "sticky" liquidity that won't flee during market downturns.
Acceptance Criteria: - [ ] Record the precise ledger timestamp and asset ratio upon LP deposit.
Description: Design a mechanism that tracks how long a user has provided liquidity and guarantees them a minimum return (offsetting impermanent loss) if they stay in the pool longer than 90 days.
Context / Motivation: Impermanent loss is the biggest deterrent to DeFi liquidity. By utilizing a protocol treasury to insure long-term LPs, TradeFlow can capture "sticky" liquidity that won't flee during market downturns.
Acceptance Criteria: - [ ] Record the precise ledger timestamp and asset ratio upon LP deposit.
Technical Pointers: The math for IL requires calculating square roots. You may need to implement a basic Babylonian square root algorithm in Rust, as Soroban does not have native floating-point math.