# Casten Protocol Contract Architecture

![](/files/knoPU17jb5dEVy4t1OuR)

**Lender Contracts overview**

* New users on Casten protocol need be whitelisted by completing KYC. Each eligible investor is then added to a mapping list housed in Whitelist.sol. The whitelist contract also houses the user -> position mappings.&#x20;
* After a user is whitelisted, the user enters an epoch and places a supply order on the tranche.&#x20;
* The Epoch controller computes all the supply and redeem orders and executes orders accordingly.&#x20;
* The SeniorTranche pool behaves like a credit line to the borrower, with suppliers adding capital upto the pool limit, and borrowers accessing funds based on loan agreement terms, and collecting interest.&#x20;
* PoolReserve is a reserve pool which holds cash for supply and redeem orders.&#x20;
* PoolFactory is the factory contract which deployes new pools for a new or existing borrower, with pool terms like interest rate, maturity, loan amount as parameters.
* Auditor houses the logic for computing interst and penalties in case of delayed interest payments. It also contains the loan asset value calculations for the NAV feed.&#x20;
* NAV feed contract acts as an oracle for each pools senior and junior ERC20 tokens for composibilty and data utilities.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://casten.gitbook.io/untitled/casten/protocol-smart-contracts/casten-protocol-contract-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
