# Overview

<figure><img src="/files/EltvAkXJnZHnSMYzF1Kx" alt=""><figcaption></figcaption></figure>

## Main contracts

{% hint style="info" %}
Both `LendPoolAddressesProvider` and `LendPoolAddressesProviderRegistry` control the upgradeability of the protocol, including asset listings and changes to protocol parameters. Unlockd token holders govern both contracts through the Unlockd Protocol Governance.
{% endhint %}

The primary contracts in Unlockd and their purposes are:

### LendPool

The LendPool contract is the main entry point into the Unlockd Protocol. Most interactions with Unlockd will happen via the LendPool, including the following functions:

* [deposit() ](/unlockd-for-devs-v1/the-core-protocol/lendpool.md#deposit)
* [withdraw()](/unlockd-for-devs-v1/the-core-protocol/lendpool.md#withdraw)
* [borrow()](/unlockd-for-devs-v1/the-core-protocol/lendpool.md#borrow)
* [repay()](/unlockd-for-devs-v1/the-core-protocol/lendpool.md#repay)
* [auction()](https://devs.unlockd.finance/unlockd-for-devs-v1/)
* [buyout()](/unlockd-for-devs-v1/the-core-protocol/lendpool.md#buyout)
* [redeem()](/unlockd-for-devs-v1/the-core-protocol/lendpool.md#redeem)
* [liquidate()](https://devs.unlockd.finance/unlockd-for-devs-v1/)

### LendPoolAddressesProvider

The \`LendPoolAddressesProvider\` contract serves as the main addresses register of the protocol. Developers should retrieve the latest contract addresses from this contract by making the appropriate calls.

### LendPoolAddressesProviderRegistry

This contract contains a list of `LendingPoolAddressProvider` addresses.

### uTokens

uTokens are the yield-generating, tokenized deposits used throughout the Unlockd protocol. They implement most of the standard EIP-20/ERC20 token methods with slight modifications, as well as Unlockd-specific methods, including:

* `scaledBalanceOf()`
* `getScaledUserBalanceAndSupply()`
* `scaledTotalSupply()`
* `mintToTreasury()`
* `transferUnderlyingTo()`

### Debt Tokens

Debt Tokens are the tokenized borrow positions used throughout the Unlockd protocol. Most standard EIP-20/ERC20 methods are disabled since debt tokens are non-transferable.

For more information, refer to the [Debt Tokens](/unlockd-for-devs-v1/the-core-protocol/debt-tokens.md) section.

## Supporting contracts

These contracts should generally not be interacted with directly but are used throughout the Unlockd Protocol via contract calls.

### LendPool Configurator

The LendPool Configurator contract provides configuration functions for the `LendPool` contracts. It also has several important functions:

* Activating / Deactivating reserves
* Enabling / Disabling borrowing for an NFT
* Enabling / Disabling using an NFT as collateral
* Freezing / Unfreezing reserves
* Updating a reserve's decimals
* Updating an NFT's Loan to Value (LTV)
* Updating an NFT's liquidation threshold
* Updating an NFT's liquidation bonus
* Updating an NFT's redeem duration
* Updating an NFT's auction duration
* Updating an NFT's min bid fine
* Updating a reserve's interest rate strategy address
* Activating / Deactivating all functions of a LendPool in emergencies

For all the above functions, relevant events are emitted on the blockchain. Developers can monitor these events to track changes in values or when values have been added or removed.

### Interest Rate Strategy

The Interest Rate Strategy contract 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. There is a mathematical function that determines the interest rate of each asset pool, with the interest rate changing based on the amount of borrowed funds and the total liquidity (i.e., utilization) of the asset pool.

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.

### Reserve Price Oracle Provider

The Reserve Price Oracle Provider contract provides reserve price data required throughout the Unlockd protocol, using Chainlink. More details can be found on the [Reserve Oracle](/unlockd-for-devs-v1/the-core-protocol/reserve-oracle.md) page.

### NFT Price Oracle Provider

The `NFT Price Oracle Provider` contract provides NFT price data required throughout the Unlockd protocol, using Upshot. Prices are monitored externally by the Unlockd team. More details can be found on the [NFT Oracle](/unlockd-for-devs-v1/the-core-protocol/nft-oracle.md) page.


---

# 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://devs.unlockd.finance/unlockd-for-devs-v1/the-core-protocol/overview.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.
