The Treasury contract's fund allocation system contains issues that could lead to over-allocation of funds, double-allocation attacks, and permanent allocation locks. The system lacks essential validation checks and proper allocation lifecycle management.
The vulnerabilities manifest in several areas:
Missing Total Allocation Validation
No check if total allocations exceed available funds
Multiple allocators can over-allocate the same funds
No tracking of total allocated amounts per token
Allocation State Management Issues
No mechanism to remove or expire allocations
Allocations persist even if funds are withdrawn
No tracking of allocation status (pending/active/completed)
Token-Specific Allocation Problems
Allocations are not tied to specific tokens
No validation against token balances
Generic amount allocation without token context
Multiple allocators can allocate the same funds
Total allocations can exceed available treasury funds
No protection against double-allocation attacks
No way to safely remove outdated allocations
Permanent allocation records even after fund withdrawal
Difficulty in tracking real available funds
Example Attack Scenarios
Scenario 1: Over-allocation Attack
Scenario 2: Withdrawal-Allocation Race
Add Allocation Lifecycle Management:
solidity
enum AllocationStatus { PENDING, ACTIVE, COMPLETED, CANCELLED }
struct Allocation {
uint256 amount;
AllocationStatus status;
uint256 expiryTime;
}
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.