In the LLMOracleCoordinator contract, calling withdrawPlatformFees allows the owner to withdraw all of the contract’s balance, including funds that may be needed to cover the allowances promised to oracles and validators. This unrestricted withdrawal function could deplete the contract's balance, preventing oracles and validators from accessing their rewards despite their allowances. Given the importance of reward distribution to incentivize participation, this could lead to dissatisfaction among oracles and validators and a loss of trust in the platform.
The LLMOracleCoordinator contract allows oracles and validators to earn rewards in ERC20 tokens by completing and validating tasks. Upon task completion, _increaseAllowance sets an allowance for each oracle and validator, allowing them to withdraw their respective rewards. However, the withdrawPlatformFees function does not account for these outstanding allowances and permits the owner to withdraw the full contract balance, including funds intended for oracle and validator rewards. This lack of control over available funds could result in a scenario where the contract is left with insufficient funds to honor oracle and validator allowances.
Initial Setup:
An oracle completes a task and earns a reward, with _increaseAllowance granting them an allowance to withdraw the reward from the contract.
Execution:
The owner calls withdrawPlatformFees, withdrawing all funds in the contract without considering the oracle's allowance.
Outcome:
The contract has insufficient funds, preventing the oracle from withdrawing their reward despite their allowance.
Unpaid Rewards for Oracles and Validators: The lack of funds due to the full withdrawal depletes the rewards, which are critical for incentivizing oracle and validator participation.
Manual Review
To ensure that funds allocated for oracle and validator rewards remain available, modify the withdrawPlatformFees function to not allow accidental depletion of funds earmarked for task rewards, ensuring that oracles and validators can reliably access their earned compensation.
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.