Position Lifecycle
1. Discover
The web app discovers a wallet's variable-rate lending positions and maps each borrowed asset/market to Interest Exchange pools. New fixed-rate legs can only open in expiries that have not matured.
2. Quote
The borrower requests signed backer quotes for a target maturity and notional. A quote specifies exact FRT notional, the rate (through its series key), and the VRT reserve the maker will add. It is not partially fillable.
3. Preview and Approve
QuoteMarket.previewTakeQuote returns:
- origination bond;
- initialization fee;
- minimum prepaid that keeps the borrower's expiry position live after the fill;
- total borrower cost;
- whether reserve capacity is sufficient; and
- whether QuoteMarket is already an operator for the borrower.
The borrower approves the loan token to QuoteMarket for the selected maximum cost. The first fill also grants InterestRatePool.setOperator(QuoteMarket, true). Optional extra prepaid uses a separate loan-token allowance to the pool.
4. Open
The wallet calls Bundler3 multicall. QuoteMarket.takeQuote(q, sig, prepaid, maxCost) deposits the maker's reserve, checks cost <= maxCost, and adds the leg to the borrower's position for that expiry. A second quote in the same expiry adds another leg to the same position and shares its prepaid.
5. Maintain
Every expiry position has one prepaid balance and one liquidation cell. A borrower can:
- call
supplyPrepaid(poolId, expiry, amount, onBehalf)to add prepaid; - call
withdrawPrepaidto remove prepaid the position does not need; - call
settlePositionto realize the position's cost to date; - enable keeper top-up, auto-repay, or rollover for the expiry; or
- roll one leg into another rate or expiry with
takeRollQuote(the bond and its vesting clock carry over, and there is no new opening fee).
6. Reduce or Close
burnFRT repays part or all of one leg. It returns that leg's share of the prepaid plus the vested part of its bond. exitFRT closes every leg of the expiry at once. Before the midpoint of the position's vesting window the bond refund is zero; after that it vests linearly and is fully refundable at expiry. Unvested bond is credited to the backers.
At and after expiry, new mints, VRT deposits, FRT moves, prepaid supply, and rolls are blocked. Settlement, burns, exits, VRT withdrawal, and prepaid withdrawal remain available.
Swept Positions
If the position's cell breaks, settlement sweeps it with every other position in that cell. borrowerPosition then reports swept = true, and the next action or settlePosition pays out what is left. See Liquidations and sweeps.
