The Treasury
contract's allocation system lacks critical checks and accounting, allowing allocations without specifying tokens and without validating against actual balances.
The allocateFunds function only tracks allocations without any token or balance validation:
High: The allocation system is broken in several places, posing risks such as loss of allocation accounting data, conflicting allocations, failed withdrawals and broken core functionality.
Issues:
Allocations can exceed available balances
No tracking of which token is being allocated (the deposit
function can interact with multiple token addresses)
Previous allocations can be silently overwritten
withdraw
does not account for allocations
Allocations are stale as they do not reflect actual available funds
Update allocateFunds
to include token specification and balance checks. When withdrawing funds, the allocations should be updated to reflect the withdrawn amount.
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.