ReadonlyaddressesReadonlychainReadonlycontractsReadonlyfixedThe bundled fixed constants (synchronous, no network).
addColl(hints) payable, top up collateral.
adjustTrove(...), combined collateral ± and/or debt ± (validated).
Liquidate several Troves in one call.
withdrawMUSD(amount, hints), borrow more (mint).
claimCollateral(), claim surplus; a safe no-op when there is none.
closeTrove(), full payoff (needs entireDebt − 200 MUSD; returns 200 + collateral).
Project entire debt with simple time-based interest. Pure.
The insertion-hint ritual → { upperHint, lowerHint, nicr } for a position of the given shape.
(collateral × price) / entireDebt (== contract computeCR). Pure.
Price at which a position hits MCR = (MCR × entireDebt) / collateral. Pure.
Nominal collateral ratio (collateral × 1e20) / entireDebt (pure, no network).
Largest valid draw (ICR ≥ binding ratio, netDebt ≥ minNetDebt).
Read + cache the governable constants on first use, returned together with the fixed ones. Also runs verifyDeployment once.
Protocol-wide live state ({ tcr, isRecoveryMode, price }).
Liquidate one Trove; throws NothingToLiquidate if it isn't liquidatable.
openTrove(debt, hints) payable, opens a Trove with hints absorbed.
Preview opening a Trove: fee, debt, ICR, liquidation price, and the floor/RM flags.
Redeem MUSD for BTC (hints + governable fee + truncation surfaced).
refinance(hints), move to the current global rate (adds a refinancing fee).
repayMUSD(amount, hints), reduce debt (no approval needed).
withdrawColl(amount, hints), take collateral out.
The
createMusdClientsurface: live reads, preview math, hints, lifecycle writes, and the redemption/keeper functions, all bound to one chain + clients.