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