Protocol

Interest accounting

How a branch, its sixteen rates and their troves are stored, and how interest is settled exactly without touching every trove.

Plumb keeps exact integer accounts. Every unit of PLMB minted, burned or moved is accounted for, and the program's tests check that collateral and debt are conserved through every operation.

The accounts

Account One per Holds
Branch Collateral (JitoSOL) Totals, the stability pool's sixteen depositors, the redemption fee state, the per-rate ledger and a bitmap of which rates hold debt
Bucket Rate The rate's debt and collateral, its sixteen trove seats, and when its interest was last settled
Trove Wallet A pointer: which rate and which seat hold your position

Your debt and collateral live in your rate's bucket, not in your trove account. The trove account only says where to look. That is what lets a redemption or a liquidation adjust many troves while touching a handful of accounts.

Settling a rate

A bucket records its debt and the time it was last settled. Settling it computes the interest since then on the whole bucket at once, then splits it among its troves in proportion to their debt. Nothing is computed per trove per second, and no trove account is opened.

Splitting a sum in proportion rarely divides evenly. The program allocates whole units by largest remainder and carries each trove's fractional share forward to 18 decimal places, so repeated small settlements don't drift in anyone's favour.

Anyone can settle any rate with the public accrue instruction. It changes nothing but timing: interest is the same whether it is settled every minute or once a month, apart from the compounding described in Interest rates.

The branch ledger

The branch keeps a small ledger per rate: its debt as of its last settlement and the interest still owed since. With it the program can project the whole branch's debt at this second without loading every bucket, which is how the 180% branch check and the 10,000,000 PLMB ceiling include interest nobody has settled yet.

Why the limits

Solana transactions carry a bounded number of accounts and a bounded amount of compute. Plumb is built to stay inside both with room to spare:

  • A liquidation has to settle every rate that holds debt before it can redistribute, so it carries up to sixteen buckets.
  • A stability-pool deposit or withdrawal settles every active rate first, so no depositor can join just before interest is paid out.
  • Each bucket has sixteen seats and the pool sixteen depositors, so every allocation is over a fixed-size array.

The heaviest measured case, a liquidation across 256 troves and 16 depositors after a year of unsettled interest, uses about 1.2 million of the 1.4 million compute units a transaction may request.

Interest that compounds

Settled interest becomes debt, and the next settlement charges interest on it. The nominal rate is what you choose; the effective rate depends on how often your rate is settled and is bounded by continuous compounding.

© 2026 PlumbBorrowing against JitoSOL can end in liquidation. Read the risks before you open a trove.