AssurancePool.sol
View Functions
primaryBalance
Fetch the primary reserve balance.
Return Values
Type | Description |
---|---|
uint256 | The primary reserve balance |
peripheralBalance
Fetch the peripheral reserve balance.
Return Values
Type | Description |
---|---|
uint256 | The peripheral reserve balance |
excessBalance
Fetch the excess reserve balance.
Return Values
Type | Description |
---|---|
uint256 | The excess reserve balance |
reserveBalance
Fetch the total reserve (primary + peripheral) balance.
Return Values
Type | Description |
---|---|
uint256 | total reserve balance |
RTD
Fetch the current Reserve to Debt ratio of the reserve.
Return Values
Type | Description |
---|---|
uint256 | The current RTD value of the reserve |
targetRTD
Fetch the target Reserve to Debt ratio of the reserve.
Return Values
Type | Description |
---|---|
uint256 | The targetRTD value of the reserve |
hasValidRTD
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
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
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
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
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
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
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 updated