src/ (~1,600 LOC), tests, config and deploy scripts.An independent reviewer examined the contracts, ran the Foundry suite, and reported findings; a follow-up re-audit confirmed every finding was resolved in the updated code, with new regression tests added. Full reports: initial review ↗ · re-audit ↗.
| # | Severity | Status | Finding |
|---|---|---|---|
| H-01 | High | Resolved | Collateral oracle accepted stale prices indefinitely (no heartbeat). Now validates heartbeat, positive/complete/non-future answer, and staleness; factory rejects a feed configured without a heartbeat. |
| M-01 | Medium | Resolved | Fee & liquidation conversions ignored the configured collateral price (assumed $1). A shared _usdToCollateral() helper now inverts the valuation with upward rounding across mint/stability fees, seizure, and principal. |
| M-02 | Medium | Resolved | Rewards could be lost when the last staker exited (zero-staker window). Last-staker withdrawal checkpoints earned rewards, freezes the stream, and records/recovers the unvested amount. |
| L-01 | Low | Resolved | Overnight market-hours weekday boundary. Morning portion checks the previous day; evening portion checks the current day. |
The updated source compiled with solc 0.8.24 and the full Foundry suite passed - 40 passed, 0 failed across five suites, including two stateful solvency invariants (64 runs and 2,048 calls each) and new regression coverage for stale/future collateral data, non-$1 fee scaling, last-staker reward handling, and overnight boundaries.
A broader internal security review (AUDIT.md) was also
performed during development, covering additional hardening (oracle-outage tolerance, XSS escaping,
timelock/multisig governance tooling, an insurance backstop, and a fuzz + invariant campaign).