3 - Liquidity

Liquidity Pool and Queue Contracts

Queue

To interact with the liquidity pool contract, users must use functions from the Queue contract.

For user to deposit/withdraw liquidity need to wait in a FIFO queue system, where their queue is waiting to be processed to interact with LP contract.

The amounts in deposit/withdraw queue can also be reduced if the user does not want to wait for his order to be processed

Add Liquidity

To deposit liquidity , the deposit amount will wait in a queue contract for X seconds (set to 1 days, and fetched by function epochDuration()) until it is processed and transferred to the LP contract.

Queue Contract =>

/// @notice Adds liquidity to the queue for the next epoch
/// @param _amount The amount of liquidity to add
function addLiquidity(uint32 epochId, uint256 _amount) external

epochId, should be fetched by the function currentEpochId()

_amount , is in the decimals of the token used for deposits

Remove Liquidity

function removeLiquidity(uint32 epochId, uint256 _shares)

Reduce

Users can reduce amount deposited into queue, after they

Last updated