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

# Architecture

#### Pool

The main entry point into the Aave Protocol. Most interactions with Aave will happen via the Pool, including:

* deposit()
* borrow()
* repay()
* setUserUseReserveAsCollateral()
* withdraw()
* flashloan()
* liquidationCall()

#### PoolAddressesProvider

The main addresses register of the protocol, for particular markets. The latest contract addresses should be retrieved from this contract by making the appropriate calls.

#### PoolAddressesProviderRegistry

Contains a list of active PoolAddressesProvider addresses, for different markets.

#### aTokens

The yield-generating, tokenized representation of supplies used throughout the Aave protocol. They implement most of the standard EIP-20/ERC20 token methods with slight modifications, as well as Aave-specific methods including:

* scaledBalanceOf()
* getScaledUserBalanceAndSupply()
* scaledTotalSupply()

All aTokens also implement EIP-2612, which via the permit() function enables single transaction approve + actions.

#### Variable Debt Tokens

The tokenized borrow positions used throughout the Aave protocol. Most of the standard EIP-20/ERC20 methods are disabled since debt tokens are non-transferrable.

#### Supporting Contracts

The following contracts should generally not be interacted with directly, but are used throughout the Aave Protocol via contract calls.

**PoolCollateralManager**

Using delegatecall via the Pool contract, the PoolCollateralManager implements actions involving the management of collateral in the protocol, including:

* liquidationCall()

This function should only be called via the main Pool contract.

**Pool Configurator**

Provides configuration functions for the Pool contracts. It has a number of important functions, such as:

* Activates / Deactivates reserves
* Enables / Disables borrowing for a reserve
* Enables / Disables using a reserve as collateral
* Enables / Disables stable rate borrowing for a reserve
* Freezes / Unfreezes reserves
* Updates a reserve's Loan to Value
* Updates a reserve's liquidation threshold
* Updates a reserve's liquidation bonus
* Updates a reserve's decimals
* Updates a reserve's interest rate strategy address
* Activates / Deactivates all functions of a Pool in emergencies

For all of the above functions, relevant events are emitted to the blockchain. Anyone can monitor these changes to know when values have been modified or added/removed.

**Interest Rate Strategy**

Holds the information needed to calculate and update the interest rates of specific reserves. Each contract stores the optimized base curves using the corresponding parameters of each currency. The parameters for the optimized base curves are:

* baseVariableBorrowRate
* variableRateSlope1
* variableRateSlope2
* stableRateSlope1
* stableRateSlope2

The interest rates are calculated depending on the available liquidity and the total borrowed amount.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://lenditavax.gitbook.io/docs/lendit/architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
