Views

This page details view functions on a Cooler.

Cooler's have four view functions that can assist third-parties. They are:

1) a function to compute required collateral for a loan amount at a given loan to collateral.

/// @notice compute collateral needed for loan amount at given loan to collateral ratio
function collateralFor(uint256 amount, uint256 loanToCollateral) public pure returns (uint256) {

2) a function to compute interest paid for a loan amount for a given duration at a given interest rate.

/// @notice compute interest cost on amount at given rate
function interestFor(uint256 amount, uint256 rate, uint256 duration) public pure returns (uint256) {}

3) a function to check if a loan is in default.

/// @notice check if given loan is in default
function isDefaulted(uint256 loanID) external view returns (bool) {}

4) a function to check if a loan Request is active.

/// @notice check if given request is active
function isActive(uint256 reqID) external view returns (bool) {}

Last updated