Skip to main content
POST
Builds the setRateMode transaction that changes how the market prices borrowing. It targets the market’s interest model, not the market, and only the model owner can sign it. That is the issuer the lender of record named at adoption, unless ownership has moved since. Get Rate Mode shows the current mode and modelOwner. The model brings the market’s interest accrual up to date under the old mode before switching, so the elapsed time is charged at the rate that actually ran.
A clamp reaches every open variable-rate loan from the next accrual, not only new loans. Only a FIXED stamp is limited to new loans. Under FIXED, loans opened before the switch keep accruing on the raw, unclamped curve.

Path Parameters

string
required
Market ID.

Body Parameters

string
required
CURVE, CLAMPED or FIXED.CURVE is the utilization curve and takes no bounds. CLAMPED holds that curve between a floor and a cap. FIXED stamps one rate onto each new loan, and that rate does not move for the life of the loan.
integer
default:"0"
Lower bound for CLAMPED. Integer, 0 to 50000.
integer
Upper bound for CLAMPED, and required by it. Integer, 1 to 50000, and at least rateFloorBps.
integer
The stamped rate for FIXED, and required by it. Integer, 1 to 50000. It cannot exceed the market’s maxFixedRateBps when a ceiling is recorded.
string
Hash of the transaction you broadcast for this operation. Send it to confirm the transaction and record the result. Omit it to receive the calldata. When txHash is present, every other field is ignored.
The three modes do not mix. A bound that belongs to another mode is refused rather than dropped, and so is any bound sent with CURVE.

Switch to a Fixed Rate

FIXED is refused with FIXED_RATE_REQUIRES_TERMS until the market runs a maximum loan duration, set with Set Term Config. A terminal due date alone does not satisfy it. A fixed rate removes the curve’s pull toward repayment, and the term clock replaces it. A stamped loan keeps its rate through every later change, including a switch back to CURVE. It cannot draw more: Borrow More refuses it with FIXED_RATE_LOAN, so a further draw is a new loan at the terms then in force. While the model stamps a fixed rate, loan terms cannot be switched off. A clamp never blocks a borrow. Once the raw curve crosses rateCapBps the rate stays at the cap, and liquidity alone limits the borrow.

Confirm the Change

Send the mined hash back to this path as { "txHash": "0x..." }. The API checks that the transaction called setRateMode on the market’s interest model. It then reads the offering back from the chain and updates the market record.

Response Fields

The calldata response carries the transaction twice. transaction holds to and data. The same to and data also sit directly on data, and that is where the chainId and value binding lands, so sign from those four fields.
object

Error Codes

Confirming with txHash can also return any transaction verification error.