Skip to content

Kadia Lending: the borrowing cap

Each pool limits how much can be borrowed per short window of blocks. It bounds what anyone could borrow from a brief price push before the next window.

  • Windows are a fixed number of blocks: 15 on testnet, about 11 minutes at testnet’s block times. Planned for mainnet: 15 blocks, about 30 minutes at two-minute blocks.
  • The allowance is set at a window’s first pool transaction of any kind: a share of the pool’s value just before it. That’s 5% on testnet.
  • Each Borrow takes from the allowance. A Repay doesn’t add back to it, and a Supply during the window doesn’t raise it.
  • A new pool lends from the window after its first deposit, because its allowance is set before that deposit counts.
  • “Borrowable now” is what’s left of the current window’s allowance, before the other limits (cash, ceilings, your collateral).
  • When it’s used up, borrowing opens again at the next window’s first block. The app knows that height, so it can tell you when.

Repaying, adding collateral, Supply, Withdraw and liquidations aren’t capped.

Technical details

Source: kadia-lending main at commit a7bea30 (a7bea306537ae4ca4fb2a5ad1c4ff473127099eb, with the final review’s fixes): docs/specs/economic-model-v1.md (EM v1), the prototype’s docs/specs/economic-model.md (EM) for what v1 keeps, docs/specs/pause-and-upgrade.md, and testnet relaunch 2’s launch manifest for the testnet figures: its config, sha256 8f18494e… (8f18494ec1c6d4d44529e53025ac55e28ff1c4a5a8288144a736b6df604a8e9f), from kadia-lending deploy/v1-relaunch2 at 59f43eb, as the lending app pins it.