Rate Model
TheRateModel account stores the interest rate model parameters for calculating dynamic interest rates based on utilization. The model is fully parameterizable, allowing customization of rate behavior for different pool types.
Account Structure
Fields
Exponential rate parameter in NAD/millisecond. Derived from
half_life_ms as ln(2) / half_life_ms. Controls how quickly rates adjust.Lower bound of target utilization band (NAD-scaled). Below this, rates decay exponentially.
Upper bound of target utilization band (NAD-scaled). Above this, rates grow exponentially.
Rate adjustment half-life in milliseconds. Lower = faster adjustments, Higher = slower adjustments. Bounded by
MIN_RATE_HALF_LIFE_MS and MAX_RATE_HALF_LIFE_MS.Minimum interest rate floor (NAD-scaled). Rate will not drop below this value.
Maximum interest rate ceiling (NAD-scaled). Rate will not exceed this value. Set to 0 for no cap.
Starting interest rate for new pairs using this model (NAD-scaled).
Rate Calculation
The rate model uses an exponential formula with three utilization bands:Utilization Bands
| Band | Condition | Rate Behavior |
|---|---|---|
| Low | target_util_start | Rate decays exponentially toward min_rate |
| Optimal | target_util_start target_util_end | Rate stays flat |
| High | target_util_end | Rate grows exponentially, capped at max_rate |
Rate Evolution
WhereInterest Accrual
Interest is calculated using the integral of the rate function over time: When rates hit min/max caps during a time window, the integral is split into the exponential portion and a flat portion.Validation Rules
Parameters must satisfy:target_util_start < target_util_endtarget_util_start >= MIN_TARGET_UTIL_BPS(1%)target_util_end <= MAX_TARGET_UTIL_BPS(100%)MIN_RATE_HALF_LIFE_MS <= half_life_ms <= MAX_RATE_HALF_LIFE_MSmin_rate <= max_rate(if max_rate > 0)min_rate <= initial_rate <= max_rate(if max_rate > 0)
Default Values
| Parameter | Default | Description |
|---|---|---|
target_util_start | 33% (3300 bps) | Start of optimal band |
target_util_end | 66% (6600 bps) | End of optimal band |
half_life_ms | 1 hour (3,600,000 ms) | Rate adjustment speed |
min_rate | 1% (100 bps) | Rate floor |
max_rate | 0 (no cap) | Rate ceiling |
initial_rate | 5% (500 bps) | Starting rate |