In the LLMOracleCoordinator::withdrawPlatformFees function, the admin has the ability to withdraw all tokens held by the contract. This capability poses significant risks, as the admin could deplete the contract's funds, preventing validators and generators from withdrawing their due rewards.
Consider the following scenario:
The contract owner withdraws all token amounts from the contract.
A validator attempts to withdraw their earned fees.
With no funds left in the contract, the validator is unable to receive their reward for validating generator responses.
Potentially leading to decreased participation and trust in the system.
The admin's ability to drain the contract can result in validators and responders losing trust in the system because they can't withdraw their funds.
Manual Review
Addressing this vulnerability is crucial, and while the fix is not trivial, a viable solution involves implementing a mechanism to track fees allocated to validators and responders.
Here's a proposed modification to the withdrawPlatformFees function:
This ensures that the owner can only withdraw funds that do not affect the rewards due to validators and responders, preserving the integrity of the contract and its ecosystem.
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.