> For the complete documentation index, see [llms.txt](https://dev.init.capital/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.init.capital/contract-references/riskmanager.md).

# RiskManager

INIT risk manager contract.

## View Functions

### CORE

InitCore contract address.

```solidity
function CORE() external view returns (address initCore);
```

### getModeDebtShares

Get current mode debt shares.

```solidity
function getModeDebtShares(uint16 _mode, address _pool) external view returns (uint debtShares);
```

### getModeDebtAmtStored

Get mode debt amount without interest accrual. For interest accrual, use [getModeDebtAmtCurrent](#getmodedebtamtcurrent).

```solidity
function getModeDebtAmtStored(uint16 _mode, address _pool) external view returns (uint debtAmount);
```

### getModeDebtCeilingAmt

Get mode debt ceiling amount. Positions in a mode cannot have a total borrow more than the debt ceiling amount.

```solidity
function getModeDebtCeilingAmt(uint16 _mode, address _pool) external view returns (uint debtCeiling);
```

## External Functions

### getModeDebtAmtCurrent

Accrue interest and get mode debt amount.

```solidity
function getModeDebtAmtCurrent(uint16 _mode, address _pool) external returns (uint debtAmount);
```

Parameters:

| Name    | Type      | Description                     |
| ------- | --------- | ------------------------------- |
| `_mode` | `uint16`  | mode to get debt amount         |
| `_pool` | `address` | lending pool to get debt amount |

Returns:

| Name         | Type      | Description                                                |
| ------------ | --------- | ---------------------------------------------------------- |
| `debtAmount` | `uint256` | underlying token debt amount of mode after accrue interest |


---

# 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://dev.init.capital/contract-references/riskmanager.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.
