Security context

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

aave/aave-v3-origin
main @ 5c2eb37
5
Fixes
0
CVEs
HIGH
Peak severity
75.0%
Coverage
Highlights
Access Control: 1 prior fix. Scrutinize any change in this area.
src/contracts/protocol/libraries/logic/ValidationLogic.sol: most-fixed (2 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: A previous revert removed the borrowingEnabled check, allowing borrows from non-borrowable reserves outside matching eMode; another commit added a similar isBorrowable check for eMode categories. These fixes are adjacent but distinct, leaving risk of incomplete re-application across paths.
Logic Error: Interest rate mode validation was tightened to only allow VARIABLE, deprecating STABLE/NONE and removing swapBorrowRateMode. This suggests prior confusion between stable and variable borrow modes leading to incorrect debt accounting.
Access Control: The totalSupply check for borrow/flashloan was incorrectly applied when virtual accounting was not active, potentially allowing over-borrowing or insolvency. The fix adds a conditional skip, indicating the check is only valid for reserves with virtual accounting.