AssurancePool.sol
function primaryBalance() public view returns (uint256)
Fetch the primary reserve balance.
Return Values
Type | Description |
---|---|
uint256 | The primary reserve balance |
function peripheralBalance() public view returns (uint256)
Fetch the peripheral reserve balance.
Return Values
Type | Description |
---|---|
uint256 | The peripheral reserve balance |
function excessBalance() public view returns (uint256)
Fetch the excess reserve balance.
Return Values
Type | Description |
---|---|
uint256 | The excess reserve balance |
function reserveBalance() public view returns (uint256)
Fetch the total reserve (primary + peripheral) balance.
Return Values
Type | Description |
---|---|
uint256 | total reserve balance |
function RTD() public view returns (uint256)
Return Values
Type | Description |
---|---|
uint256 | The current RTD value of the reserve |
function targetRTD() public view returns (uint256)
Return Values
Type | Description |
---|---|
uint256 | The targetRTD value of the reserve |
function hasValidRTD() public view returns (bool)
Return Values
Type | Description |
---|---|
bool | Whether the current RTD is greater than or equal to the primary balance. |
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. |
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 |
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 |
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 |
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 |
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. |
Last modified 1mo ago