> For the complete documentation index, see [llms.txt](https://ag0.gitbook.io/cooler-loans/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ag0.gitbook.io/cooler-loans/views.md).

# 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.

```solidity
/// @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.

```solidity
/// @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.

```solidity
/// @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.

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