In situations where liquidity in the pool is exhausted, particularly for Token A, the system introduces a mechanism to ensure that swaps can still occur, even when Token A is unavailable in the swap pool.
Swap with Exhausted Liquidity
- Liquidity Depletion: When liquidity in the swap pool for Token A is fully consumed (i.e., there is no available Token A to complete a swap), the system allows swaps to continue through the use of lA tokens, which are the interest-bearing tokens derived from Token A in the lending pool.
- lA Tokens: The lA token is a tokenized form of Token A, which represents the interest-bearing version of Token A. These tokens are minted as part of the lending mechanism and can be used in place of Token A for swaps, even when Token A’s liquidity in the swap pool is exhausted.
- The lA token can be swapped just like Token A in the swap pool, ensuring that users are not blocked from executing their trades.
- The lA token continues to earn interest from the lending pool, which can be redeemed once liquidity in the pool is replenished.
Conversion Back to Token A
- Redeeming lA Tokens: Whenever liquidity for Token A is restored in the swap pool, users who hold lA tokens can redeem them back for Token A at any time, based on the current exchange rate between Token A and lA. This provides a way for users to always have access to Token A liquidity once it becomes available again.
- Dynamic Adjustment: The conversion rate between Token A and lA adjusts dynamically, ensuring that users redeem the correct amount based on the current value of lA tokens, which include accrued interest. This redemption mechanism ensures that users can switch back to Token A without losing out on the interest generated by the lending pool.
Special Considerations
- User Flexibility: The use of lA tokens ensures that users can still perform swaps even during liquidity shortages, improving the user experience and preventing transaction failures.
- Efficiency: This mechanism helps keep the system operational even during times of high demand, allowing the liquidity pool to recover while still providing an alternative form of liquidity via the lA token.

