The allocateFunds function in the Treasury contract allows allocators to allocate amounts exceeding the current treasury balance. There is no validation to ensure that allocated amounts are within available funds, which could lead to over-allocation and potential fund distribution issues.
Vulnerable code:
Allocators can allocate more funds than available in treasury
Multiple allocators could collectively over-allocate funds
No tracking of total allocated vs available funds
Could lead to failed withdrawals
Potential for "bank run" scenarios where not all allocations can be fulfilled
Add balance validation:
Manual code review
Foundry Testing Framework
Static analysis
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.