Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

term-structure/termmax-contract-v2
main @ e314f3f
26
Fixes
0
CVEs
HIGH
Peak severity
16.7%
Coverage
Highlights
Auth Bypass: 6 prior fixes. Scrutinize any change in this area.
contracts/tokens/AbstractGearingToken.sol: most-fixed (5 issues). Treat as high-risk during review.
19 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Auth Bypass: Multiple instances of missing or incorrect authorization on debt augmentation and flash repay operations, allowing unauthorized users to manipulate loans or steal collateral.
Access Control Bypass: Inconsistent role requirements, missing caller authorization in callbacks, and a flawed proxy check allow unauthorized configuration changes and direct calls bypassing intended restrictions.
Logic Error: Incorrect debt accounting and collateral transfer logic in repayment and flash repay paths can lead to incorrect loan state and potential theft of collateral.