Security context

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

BeanstalkFarms/Basin
master @ ecf6923
3
Fixes
0
CVEs
HIGH
Peak severity
66.7%
Coverage
Highlights
Access Control: 1 prior fix. Scrutinize any change in this area.
src/Well.sol: 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.

Access Control: The upgrade function lacked an owner-only restriction, allowing any caller to trigger a contract upgrade and potentially take over the contract.
Reentrancy: View functions like getReserves and getSwapOut could be re-entered during state-changing operations, allowing attackers to manipulate returned values and exploit the contract.
Integer Overflow: Division rounding down in calcReserve could lead to small reserve discrepancies, which over many operations could be exploited for economic gain.