> For the complete documentation index, see [llms.txt](https://docs-v4.venus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v4.venus.io/technical-reference/reference-isolated-pools/interest-rate-models/two-kinks-interest-rate-model.md).

# TwoKinksInterestRateModel

[`TwoKinksInterestRateModel`](https://github.com/VenusProtocol/isolated-pools/blob/v4.4.0/contracts/TwoKinksInterestRateModel.sol) has three utilization segments separated by `KINK_1` and `KINK_2`. Signed slope inputs allow a segment to rise or fall, while the returned borrow rate is floored at zero.

## Constructor

```solidity
constructor(
    int256 baseRatePerYear,
    int256 multiplierPerYear,
    int256 kink1,
    int256 multiplier2PerYear,
    int256 baseRate2PerYear,
    int256 kink2,
    int256 jumpMultiplierPerYear,
    bool timeBased,
    uint256 blocksPerYear
)
```

`baseRatePerYear` and `baseRate2PerYear` cannot be negative, and the kinks must satisfy `0 < kink1 < kink2`. Annual rates are divided by the implementation's slots/year value and stored in immutable per-block-or-second fields. A time-based deployment requires `blocksPerYear = 0`; a block-based deployment requires a nonzero value.

## Public parameters

* `BASE_RATE_PER_BLOCK_OR_SECOND`, `MULTIPLIER_PER_BLOCK_OR_SECOND`, and `KINK_1`
* `BASE_RATE_2_PER_BLOCK_OR_SECOND`, `MULTIPLIER_2_PER_BLOCK_OR_SECOND`, and `RATE_1`
* `KINK_2`, `JUMP_MULTIPLIER_PER_BLOCK_OR_SECOND`, and `RATE_2`
* inherited `isTimeBased()` and `blocksOrSecondsPerYear()`

All rate and utilization values use `1e18` mantissa scaling. `RATE_1` and `RATE_2` are precomputed constructor values used to keep the three curve segments continuous.

## Rate functions

```solidity
function getBorrowRate(
    uint256 cash,
    uint256 borrows,
    uint256 reserves,
    uint256 badDebt
) external view returns (uint256);

function getSupplyRate(
    uint256 cash,
    uint256 borrows,
    uint256 reserves,
    uint256 reserveFactorMantissa,
    uint256 badDebt
) public view returns (uint256);

function utilizationRate(
    uint256 cash,
    uint256 borrows,
    uint256 reserves,
    uint256 badDebt
) public pure returns (uint256);
```

The model is immutable. Identify the exact deployed address and constructor values returned by a market's `interestRateModel()`; a model family name is not enough to reproduce the curve.


---

# 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://docs-v4.venus.io/technical-reference/reference-isolated-pools/interest-rate-models/two-kinks-interest-rate-model.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.
