ReSource
Search
K

AssurancePool.sol

View Functions

primaryBalance

function primaryBalance() public view returns (uint256)
Fetch the primary reserve balance.
Return Values
Type
Description
uint256
The primary reserve balance

peripheralBalance

function peripheralBalance() public view returns (uint256)
Fetch the peripheral reserve balance.
Return Values
Type
Description
uint256
The peripheral reserve balance

excessBalance

function excessBalance() public view returns (uint256)
Fetch the excess reserve balance.
Return Values
Type
Description
uint256
The excess reserve balance

reserveBalance

function reserveBalance() public view returns (uint256)
Fetch the total reserve (primary + peripheral) balance.
Return Values
Type
Description
uint256
total reserve balance

RTD

function RTD() public view returns (uint256)
Fetch the current Reserve to Debt ratio of the reserve.
Return Values
Type
Description
uint256
The current RTD value of the reserve

targetRTD

function targetRTD() public view returns (uint256)
Fetch the target Reserve to Debt ratio of the reserve.
Return Values
Type
Description
uint256
The targetRTD value of the reserve

hasValidRTD

function hasValidRTD() public view returns (bool)
Fetch the RTD (Reserve to Debt ratio) state of the reserve.
Return Values
Type
Description
bool
Whether the current RTD is greater than or equal to the primary balance.

neededReserves

function neededReserves() public view returns (uint256)
Fetch the needed amount of reserve tokens to reach the target RTD.
Return Values
Type
Description
uint256
The amount of reserve tokens needed to reach the target RTD.

Mutative Functions

depositIntoPrimaryReserve

function depositIntoPrimaryReserve(uint256 amount) public
Deposit provided amount of reserve tokens into to the network's primary reserve.
Call Params
Name
Type
Description
amount
uint256
amount of reference currency to deposit

depositIntoPeripheralReserve

function depositIntoPeripheralReserve(uint256 amount) public
Deposit provided amount of reserve tokens into to the network's peripheral reserve.
Call Params
Name
Type
Description
amount
uint256
amount of reference currency to deposit

depositIntoExcessReserve

function depositIntoExcessReserve(uint256 amount) public
Deposit provided amount of reserve tokens into to the network's excess reserve.
Call Params
Name
Type
Description
amount
uint256
amount of reference currency to deposit

deposit

function deposit(uint256 amount) public
Deposit provided amount of reserve tokens into either the primary reserve, or excess reserve depending on the reserve's current RTD.
Call Params
Name
Type
Description
amount
uint256
amount of reference currency to deposit

withdraw

function withdraw(uint256 amount) public
Withdraws the provided amount of reserve tokens from the excess reserve.
Call Params
Name
Type
Description
amount
uint256
amount of reserve tokens to withdraw from the excess reserve.