Security
Security architecture
The invariants Kronos is built around, each covered by a test.
| Invariant | Enforced in | Test |
|---|---|---|
| Reserves ≥ $1 per KRONOS | Treasury.deposit, mintRewards | test_mintRewardsBoundedByExcess |
| Bonds never lower backing per token | Treasury.deposit | test_depositCannotLowerBacking |
| Floor sales raise liquid backing | Treasury.sellToFloor | test_sellToFloorRaisesNav |
| Staking holds enough KRONOS for every sKRONOS | KronosStaking | testFuzz_stakingSolvency |
| Hub supply + Σ bridgedOut = total wsKRONOS claim | WsKronos | test_homeToRemoteAndBack |
| Inbound credit ≤ bridgedOut for that route | WsKronos._credit | test_forgedInboundCannotExceedBridgedSupply |
| Nothing leaves a Credit Account while it has debt | Withdrawals, adapters, multicall value check | test_borrowedFundsCannotLeaveAccount |
| Value × weight ≥ debt and leverage ≤ 3× after every action | CreditManager._requireSolvent | test_spendingBorrowedFundsIsBoundByWeight |
| Pool share price never drops on borrow or repay | LendingPool | testFuzz_poolSharePriceNeverDropsOnBorrowRepay |