Security context

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

vesuxyz/vesu-v2
main @ e14d772
2
Fixes
0
CVEs
HIGH
Peak severity
100.0%
Coverage
Highlights
Auth Bypass: 1 prior fix. Scrutinize any change in this area.
src/common.cairo: most-fixed (1 issue). Treat as high-risk during review.
2 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: The VToken contract previously delegated invariant checks using the transaction caller's address instead of the contract's own address. This allowed external actors to bypass vital safety invariants, risking unauthorized state modifications or token drains.
Logic Error: Redundant multiplication scaling in mathematical helper functions like integer::u512_safe_div_rem_by_u256 can lead to unexpected overflows or division inaccuracies, breaking core collateral and pricing calculations.