> For the complete documentation index, see [llms.txt](https://seahorsefi.gitbook.io/seahorsefi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seahorsefi.gitbook.io/seahorsefi/protocol/interest-rates/get-borrow-rate.md).

# Get Borrow Rate

#### Get Borrow Rate <a href="#get-borrow-rate" id="get-borrow-rate"></a>

This function returns the per second borrow rate as the decimal representation of a percentage scaled up by `10 ^ 18`. The formula for producing the borrow rate is:

```ini
## If the Utilization is less than or equal to the Kink parameter

BorrowRate = borrowPerSecondInterestRateBase + borrowPerSecondInterestRateSlopeLow * utilization

## Else

BorrowRate = borrowPerSecondInterestRateBase + borrowPerSecondInterestRateSlopeLow * borrowKink + borrowPerSecondInterestRateSlopeHigh * (utilization - borrowKink)
```

To calculate the borrow APR as a percentage, pass the current utilization to this function, and divide the result by `10 ^ 18` and multiply by the approximate number of seconds in one year and scale up by 100.

```solidity
Seconds Per Year = 60 * 60 * 24 * 365
Utilization = getUtilization()
Borrow Rate = getBorrowRate(Utilization)
Borrow APR = Borrow Rate / (10 ^ 18) * Seconds Per Year * 100
```

* `utilization`: The utilization at which to calculate the rate.
* `RETURNS`: The per second borrow rate as the decimal representation of a percentage scaled up by `10 ^ 18`. E.g. `317100000` indicates, roughly, a 1% APR.
