The lack of token specification in the allocateFunds function is a high severity issue that can lead to potential token mismatch, allocation ambiguity, and withdrawal issues. Implementing token specification, state tracking, and conducting thorough audits and testing are essential to address this issue and enhance the security and reliability of the contract.
The allocateFunds function in the Treasury contract does not specify which token is being allocated to the user. This can lead to a scenario where a user who deposited a specific token (e.g., USDC) may receive a different token (e.g., ETH) during withdrawal. The allocator can allocate funds without specifying the token, leading to ambiguity and potential misuse of funds. During withdrawal, the manager may withdraw a different token than what the user initially deposited, leading to potential financial loss and confusion.
Token Mismatch: Users may receive a different token than what they initially deposited, leading to potential financial loss and confusion.
Allocation Ambiguity: Lack of token specification can lead to ambiguity and potential misuse of funds.
Withdrawal Issues: Managers may withdraw a different token than what the user initially deposited, leading to potential financial loss and confusion.
manual review
Token Specification: Ensure that the allocateFunds function specifies the token being allocated to the user. This can be done by adding a token parameter to the function.
State Tracking: Implement state tracking to record the allocated amounts for each user and token.
Audit and Testing: Conduct a thorough audit and testing of the contract to ensure that the allocation and withdrawal logic are correctly implemented and secure.
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.