Interest Rate Model
Osito Protocol uses a standard two-slope interest rate model commonly found in DeFi lending protocols. This model is designed to balance capital efficiency with liquidity risk in a predictable way.
Interest Rate Formula
The rate formula is straightforward:
function calculateRate(uint256 borrowed, uint256 available) internal pure returns (uint256 rate) {
// Avoid division by zero
if (available == 0) return MAX_RATE; // 10,000% APR
// Calculate utilization (in 1e18 format)
uint256 utilization = (borrowed * PRECISION) / available;
// If utilization is below or equal to MID_UTILIZATION (90%)
if (utilization <= MID_UTILIZATION) {
// Linear increase from 0% to MID_RATE (50%)
rate = (utilization * MID_RATE) / MID_UTILIZATION;
} else {
// Calculate the rate above 90% utilization
// Linear increase from MID_RATE (50%) to MAX_RATE (10,000%)
uint256 excessUtilization = utilization - MID_UTILIZATION;
uint256 maxExcessUtilization = PRECISION - MID_UTILIZATION;
uint256 excessRate = (excessUtilization * (MAX_RATE - MID_RATE)) / maxExcessUtilization;
rate = MID_RATE + excessRate;
}
return rate;
}
Key Points of the Interest Rate Curve
The interest rate curve has three critical points:
Utilization | Interest Rate | Purpose |
---|---|---|
0% | 0% APR | Base rate when utilization is minimal |
90% (kink) | 50% APR | Moderate rate at optimal utilization |
100% | 10,000% APR | Extreme rate to discourage full utilization |
This creates a predictable borrowing experience while still protecting the protocol from liquidity crises.
The Dual-Component Structure
Osito's interest rate has two components:
Global BERA Utilization Component
This component is based on the total BERA utilization:
global_rate = f(total_BERA_borrowed / total_BERA_available)
This ensures that BERA lenders receive yield proportional to utilization.
Token-Specific Utilization Component
This component is based on the specific token's utilization:
token_rate = g(token_borrowed / token_max_borrow)
This creates additional yield for token stakers where borrowing demand is highest relative to that token's calculated max borrow limit.
Interest Distribution
The interest is distributed among three groups:
- BERA Lenders: Receive interest proportional to their supplied BERA
- Token Stakers: Receive yield proportional to their staked tokens, weighted by token-specific utilization
- Protocol Treasury: A small portion (10%) is reserved for protocol maintenance
Relationship to Max Borrow Limits
While the interest rate model itself is standard, it works in conjunction with Osito's innovative max borrow limit mechanism. The max borrow limits (calculated using the mathematical security model) define the denominator in the token-specific utilization calculation, creating a connection between the protocol's security model and its economic incentives.
As token staking increases, it reduces dumpable supply, which increases the max borrow limit. This in turn affects token-specific utilization and the associated interest rates and yield distribution.