The Treasury's withdraw() function lacks protection for allocated funds, allowing managers to withdraw funds that are already allocated as guarantees to external addresses.
The issue is that the withdraw() function only checks the total balance, not accounting for funds that have been allocated through allocateFunds(). This means:
When funds are allocated as guarantees, they remain withdrawable by managers
Allocated recipients could be left without their guaranteed funds
No protection for allocated funds against manager withdrawals
Example:
Treasury has 1000 tokens
800 tokens are allocated as guarantees to recipient X
Manager can still withdraw all 1000 tokens, breaking allocation guarantees
There is no guarantee that allocated funds will be available in the future for recipients as they are not accounted for in withdraw(). Some recipients can be left out with no funds to withdraw after working freelance for the protocol.
Manual
Add a global counter of total allocated funds that is checked in withdraw()
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.