Security context

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

threshold-network/solidity-contracts
main @ 25e3b75
9
Fixes
0
CVEs
HIGH
Peak severity
87.5%
Coverage
Highlights
Access Control Bypass: 3 prior fixes. Scrutinize any change in this area.
contracts/staking/TokenStaking.sol: most-fixed (7 issues). Treat as high-risk during review.
5 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.

Access Control Bypass: Multiple functions lacked proper caller restrictions, allowing unauthorized staking providers or operators to perform owner-level actions.
Access Control: Owner-change functions (refreshKeepStakeOwner, refreshKeepManagedGrantOwner) were callable by unauthorized parties due to missing owner/stake-existence checks.
Authorization Bypass: All unstake paths (T, Keep, Nu, All) allowed withdrawal before the 24h cooldown, enabling premature fund access.