The LLMOracleCoordinator contract works as follows.
Each request creates a task. Each task has three states - PendingGeneration, PendingValidation, Completed.
When creating a task, the creator enters a commission. validatorFee for all validator ratings, generatorFee for all generation of response to request, platformFee.
After the end of all stages - in general, the following situation occurs.
Generators with the best responses are given approve on generatorFee
validators with the best scores are given approve. on validationFee
.
Since the user pays for all generation and validation, some of the funds remain unnecessary.
Now consider the withdrawal function for the owner.
This function simply removes all funds from the contract.
This approach certainly allows for proper consideration of protocolFee and the balance of commissions described in paragraph 3, but it completely violates paragraphs 1 and 2 because now the validators and generators have only allowances on tokens, but there is no actual ability to issue them until the new tokens appear on the contract.
In the absolutely unfair conditions will be the validators/ generators in the following cases.
If the validator/generator does not immediately remove its in the same transaction, access to its means may be blocked in the future due to such a mechanism of withdrawal for owners.
Moreover, if he does withdraw the funds, he will block for a time the possibility of withdrawal for other validators.
If owner displays rewards when there is a taskId that is not yet completed - then the validators/generators of such taskId will not receive their rewards, because they will display them as owner.
If owner displays rewards when there is a taskId that is not yet completed - then the validators/generators of such taskId will not receive their rewards, because they will display them as owner.
Severity: High
Manual Review
Fix withdraw mechanism. Add counters for owner share in total contract balance.
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.