# Core Contracts

The following contracts are the main contracts for INIT:

* [InitCore](#initcore)
* [PosManager](#posmanager)
* [LendingPool](#lendingpool)
* [Config](#config)
* [RiskManager](#riskmanager)
* [Miscellaneous](#miscellaneous)

### InitCore <a href="#initcore" id="initcore"></a>

InitCore is the main entry point to interact with INIT. Users can lend and withdraw from lending pools, create positions, collateralize and de-collateralize, and borrow and repay on their positions. InitCore allows liquidity hooks to call external contracts via `callback` function.

### PosManager

PosManager stores positions created by InitCore. When users adjust their positions through InitCore, their actions update the position storages in PosManager.

### LendingPool

Lending pools, like other lending protocols, serve as the liquidity market for lenders and borrowers. Borrowers pay borrow interests while lenders earn lending interests configured by the pool's interest rate model.

Lending pools only accept ERC-20 tokens as their underlying tokens. Hence, native and rebase tokens must be wrapped into ERC-20 tokens before being transferred into the pools.&#x20;

### Config

Config stores parameters on all INIT contracts including lending pools, modes, token collateral and borrow factors, etc. The parameters can only be set by access controllers which are governed by INIT's guardian and governor roles.

### RiskManager

RiskManager oversees the risk on different modes of INIT. It disallows positions in a mode to borrow tokens more than the allowed debt ceiling from the lending pools.

### Miscellaneous

Other contracts that build up INIT such as a liquidation incentive calculator, lending pools' interest rate models, and oracles.


---

# 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://dev.init.capital/core-contracts.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.
