> 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/structs.md).

# Structs

This page details the data structures of a Cooler.

Cooler's have two data structures, the Request and the Loan.

Requests store terms for a potential loan.

```solidity
Request[] public requests;
struct Request { // A loan begins with a borrow request. It specifies:
    uint256 amount; // the amount they want to borrow,
    uint256 interest; // the percentage they will pay as interest,
    uint256 loanToCollateral; // the loan-to-collateral ratio they want,
    uint256 duration; // and the length of time until the loan defaults.
    bool active; // Any lender can clear an active loan request.
} 
```

Loans store terms for an active loan.

```solidity
Loan[] public loans;
struct Loan { // A request is converted to a loan when a lender clears it.
    Request request; // The terms of the loan are saved, along with:
    uint256 amount; // the amount of debt owed,
    uint256 collateral; // the amount of collateral pledged,
    uint256 expiry; // the time when the loan defaults,
    bool rollable; // whether the loan can be rolled over,
    address lender; // and the lender's address.
}
```
