Adaptive Linear Kink IRM
In the Adaptive Linear Kink IRM, the IRM hyperparameters update during each query of the borrow rate, so that the hyperparameters gradually update and don't require manual maintenance.
Features
Optional
gracePeriodin seconds for marketsOptional minimum
interactionCountnumber of interactions for seeding protections
struct AdaptiveConfig {
uint256 targetUtilization; // Target utilization (in wad, e.g., 0.8e18 for 80%)
uint256 initialRateAtTarget; // Starting rate at target utilization (in wad per second)
uint256 minRateAtTarget; // Minimum rate at target utilization (in wad per second)
uint256 maxRateAtTarget; // Maximum rate at target utilization (in wad per second)
uint256 adjustmentSpeed; // Speed of adaptation (in wad per second)
uint256 curveParameter; // Controls curve steepness (in wad, e.g., 2e18 for 2x)
uint48 gracePeriod; // Grace period for new markets (in seconds)
uint48 minUpdateInterval; // Minimum time between updates (in seconds)
uint256 maxRateChange; // Maximum rate change per update (in wad, e.g., 0.1e18 for 10%)
}
/// @notice Current adaptive state for a specific market tranche.
struct AdaptiveState {
uint128 rateAtTarget; // Current adaptive rate at target utilization
uint64 lastUtilization; // Previous utilization for trend analysis
uint48 lastUpdate; // Timestamp of last update
uint48 creationTime; // Market creation timestamp for grace period
uint16 interactionCount; // Number of interactions (for seeding protection)
}Last updated