Skip to content

Contract Overview ​

InterestRatePool ​

The central state and accounting contract.

AreaMain functions
DiscoverygetPool, protocolFees, seriesFees, loanToken, seriesKey, borrowerPosition, legOf, legsOf, bookState, expiryState
PreviewpreviewMintFRT, previewBurnFRT, previewSupplyPrepaid, reserveRequirement, effectiveAssets, freeAssets, currentTick, riskPending
CreationcreatePool, createSeries
Settlementsettle, settlePosition, claimSpreadFees
FRTmintFRT, burnFRT, exitFRT, rollFRT, moveFRT, approveFRT
VRTdepositVRT, withdrawVRT, approveVRT
PrepaidsupplyPrepaid, withdrawPrepaid
AuthorizationsetOperator, isOperator
AdminsetFeeRecipient, setProtocolFees, setAdapterAllowed

Each pool has a rate grid (fixedRateSpacing ticks strictly below the cap, at most 16,383) and expiries. A borrower holds one position per expiry: several fixed-rate legs sharing one prepaid funding. A backer book holds liquidity at one rate of one expiry; its VRT uses in-contract ERC-6909-style balances. There is no separate FRT/VRT token contract.

Liquidation is grouped and loop-free. Positions sit in a (column, funding tick) cell, where the column is the position's average rate rounded up to the grid. settle(poolId, expiry, budget, recipient) sweeps broke cells found by a 4-ary kinetic tree over the columns, each sweep closing every position in the cell, within budget work units; the sweeper fee goes to recipient. settlePosition claims a swept position's refund.

Protocol fees are owner-controlled within hard maxima and snapshot into each expiry when it is created. A fee update advances the series-key epoch; an existing expiry keeps its snapshot and epoch.

QuoteMarket ​

Verifies maker-signed EIP-712 quotes and performs atomic two-sided fills.

  • previewTakeQuote and takeQuote open exact-notional FRT.
  • previewTakeRollQuote and takeRollQuote roll exact notional; the FRT owner and funding payer are distinct so KeeperBundler can fund a borrower-owned roll.
  • cancelQuote invalidates one hash.
  • raiseNonce invalidates all older maker-nonce quotes.

Execution is restricted to the immutable Bundler3. takeQuote uses Bundler3's initiator as the taker and enforces the wallet-provided maxCost.

KeeperBundler ​

Stores direct or Bundler3-initiated KeeperConfig values and executes keepTopUp, keepAutoRepay, and quote-backed, full-leg keepRollover. Third-party actions are limited by the user's configured thresholds, bands, and maximum keeper fee (hard-capped at 5%). Configs are keyed by (user, poolId, expiry). A keeper can atomically create the backer-selected series and consume its signed quote in one Bundler3 transaction; a roll moves one whole leg, and a roll to another expiry moves the policy with it.

Adapters ​

ICoreAdapter connects settlement and keeper debt operations to a lending market. Pools can only be created with owner-allowlisted adapters, and each pool pins its loan token at creation.

Approval Boundaries ​

PermissionSpender/operatorPurpose
Maker ERC-20 allowanceQuoteMarketPull vrtAmount when a quote fills
Taker ERC-20 allowanceQuoteMarketPull bond, fee, and initial prepaid up to maxCost
Borrower pool operatorQuoteMarketMint or roll FRT on behalf of the taker
Optional prepaid allowanceInterestRatePoolPull extra prepaid supplied to an expiry position
Optional keeper operatorKeeperBundlerRun configured maintenance actions

Bundler3 itself does not need a loan-token allowance or pool operator approval.

Interest Exchange Protocol