Skip to main content

AssuranceOracle

AssuranceOracle

Exposes the target reserve to debt ratio (targetRTD) for the AssurancePool and a quote function intended to be overridden to convert deposit tokens to reserve tokens.

This contract is meant to be extended in order to serve the necessary data to the AssurancePool and CreditIssuer contracts to manage network credit risk.

Methods

assurancePool

function assurancePool() external view returns (contract IAssurancePool)

Returns

NameTypeDescription
_0contract IAssurancePoolundefined

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription
_0addressundefined

quote

function quote(address depositToken, address reserveToken, uint256 depositAmount) external view returns (uint256)

This function is called by the AssurancePool to quote the amount of reserve tokens that would be received for a given deposit token amount.

this function is meant to be overridden to convert deposit tokens to reserve tokens via on chain pricing data (ex. Uniswap, Chainlink, ect.)

Parameters

NameTypeDescription
depositTokenaddressaddress of the deposit token.
reserveTokenaddressaddress of the reserve token.
depositAmountuint256amount of deposit token to convert to reserve token.

Returns

NameTypeDescription
_0uint256amount of reserve tokens that would be received for the given deposit token amount.

renounceOwnership

function renounceOwnership() external nonpayable

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

setTargetRTD

function setTargetRTD(uint256 _targetRTD) external nonpayable

This function allows the risk manager to set the target RTD. If the target RTD is increased and there is an excess reserve balance, the excess reserve is reallocated to the primary reserve to attempt to reach the new target RTD.

Parameters

NameTypeDescription
_targetRTDuint256new target RTD.

targetRTD

function targetRTD() external view returns (uint256)

The target reserve to debt ratio (RTD) for the AssurancePool.

Returns

NameTypeDescription
_0uint256undefined

transferOwnership

function transferOwnership(address newOwner) external nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressundefined

Events

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined

TargetRTDUpdated

event TargetRTDUpdated(uint256 newTargetRTD)

Parameters

NameTypeDescription
newTargetRTDuint256undefined