Reserves

SoftLink Reserves V0

Mechanism Design

Reserves are pretty straightforward.

In order for a reserve to exist one must create a reserve via the CoreReserveFactory:

struct CreateReserveParams { 
    CoreReserve.ReserveType reserveType; 
    bool isNativeTokenReserve; 
    address reserveToken; 
    uint256 reserveTokenInitialAmount; 
} 

function createReserve(CreateReserveParams calldata _params) external payable nonReentrant whenNotPaused returns (address)

Once a reserve is created, one can provide liquidity to the selected reserve via a deposit:

function deposit(uint256 _depositAmount, address _creationDepositor) external payable nonReentrant whenNotPaused

Whenever one is ready to withdraw liquidity, they can simply do so via a withdrawal:

function withdraw(uint256 _withdrawAmount) external nonReentrant whenNotPaused

Last updated