Static Rate Policy
The Static Rate Policy defines a fixed rate curve that controls how renewal auction pricing changes over time. It stores up to 8 immutable rate points with linear interpolation between them. The Migration Ratifier reads the curve as the acceptable rate for a renewal take.
For example, a borrower can configure a renewal to start bidding at 3% APR the moment the renewal window opens, ramp up to 6% APR over the next 24 hours, and stay at 6% until a lender takes the offer. The rate curve is flat, then linear, then flat, and the policy interpolates the current rate at every take attempt.
Rate curve
The rate curve is defined at deployment as an array of (rate, duration) points. Between points, the rate is linearly interpolated. The curve is stored as immutable packed values in bytecode for gas efficiency.
Rate behavior by elapsed time:
- At or before the first point: Returns the first point's rate.
- Between two points: Linear interpolation between the two rates.
- Past the last point: Returns the last point's rate.
Constraints:
- Maximum 8 rate points.
- Durations must be strictly increasing.
- Rates are specified per second in WAD precision.
Rate calculation
When the ratifier calls getRate, the policy:
- Computes
elapsed = max(block.timestamp - renewalPeriodStart, 0)from the renewal period start provided by the ratifier. - Finds the segment of the rate curve containing
elapsed. - Returns the linearly interpolated rate at that point.
Example rate curves
Simple linear ramp (2 points):
- Point 0: rate = 0, duration = 0s (start at 0%)
- Point 1: rate = 3.17e8 (1% APR), duration = 86400s (1 day)
- Result: rate increases linearly from 0% to 1% APR over the first day, then stays at 1%.
Step function with plateau (3 points):
- Point 0: rate = 1.58e8 (0.5% APR), duration = 0s
- Point 1: rate = 1.58e8 (0.5% APR), duration = 43200s (12 hours)
- Point 2: rate = 6.34e8 (2% APR), duration = 86400s (1 day)
- Result: flat at 0.5% for 12 hours, then ramps to 2% over the next 12 hours.
Pausable variant
PausableStaticRatePolicy is a pausable subclass shipped alongside the static policy. When paused, getRate() reverts with IsPaused(), which causes any ratifier's rate check to revert and blocks every renewal take that points at this policy. Use it as a per-route circuit breaker: pointing a user's slot at a PausableStaticRatePolicy instance gives a designated pauser the ability to halt renewals for that intent without touching the ratifier itself. A pause only blocks renewal takes that point at the policy: it cannot move, freeze or seize assets or change existing positions, and it is not a guarantee of protection. A borrow position that is not renewed can still be liquidated at maturity. See Pausable functions.
- Any designated pauser address can call
pause(). - Only the owner can
unpause().
The owner is not automatically a pauser. The owner must call setPauser(ownerAddress, true) to grant themselves pause ability. The owner can always unpause regardless of pauser status.
Default Tenor policies
The Tenor app defaults to a pausable rate policy: a renewal route set up in the app points at one of the two PausableStaticRatePolicy instances described below, which Tenor deployed. You can choose a different policy, including a non-pausable one or one with a different pauser, in the app or through the API. Onchain, the policy is the slot's interestRatePolicy, set with setParams; the pauser belongs to the policy instance, so a different pauser means pointing the slot at a pausable policy whose owner designated that pauser. The rate curves of the two default instances are immutable; their pause state is not. Each renewal take must also satisfy the user's own limitRatePerSecond (a floor when the user's offer is a buy offer, a ceiling when the user's offer is a sell offer), which the Migration Ratifier checks alongside the policy rate.
Borrow renewals (ascending, 8h steps)
The default for v2v2Borrow and v1v2Borrow renewals. The rate starts at 0% APR and climbs over 24 hours: the longer a borrow renewal sits unfilled, the more attractive it becomes to a taker.
| Elapsed | Rate (APR) |
|---|---|
| 0 | 0% |
| 8h | 3% |
| 16h | 10% |
| 24h | 20% |
Lend renewals (descending, 4h steps)
The default for v2v1Borrow, v1v2Lend, and v2withdrawableLend renewals. The rate starts at 20% APR and falls over 12 hours: the longer a lend renewal sits unfilled, the more attractive it becomes to a taker.
| Elapsed | Rate (APR) |
|---|---|
| 0 | 20% |
| 4h | 10% |
| 8h | 3% |
| 12h | 0% |
The rate curves above are immutable once deployed; only the pause state of either policy can change: a designated pauser can pause the policy, and only the owner can unpause the policy. No dedicated policy is deployed for the v2→v1 lend renewal flow at launch.