The scoring mechanism in the finalizeValidation function of LLMOracleCoordinator.sol is vulnerable to manipulation by malicious validators who can skew the final scores and unfairly obtain validator rewards. This occurs because the function calculates rewards based on scores within a range defined by the mean and standard deviation of all scores, without robust protections against coordinated low scores. Malicious validators can take advantage of this flaw to drive down the mean, ensuring only their low scores fall within the valid range for rewards, while legitimate, higher scores are excluded.
tep-by-Step Attack Scenario
Prerequisites
Consider a task with the following parameters:
numValidations = 5 (5 validators required)
3 malicious validators
2 honest validators
Maximum score: 100
Attack Execution
Initial Setup
Task ID: 1
Maximum score: 100
Number of validators: 5
Validator fee: 1000 tokens
Honest Validators Submit First
Honest Validator 1 submits: 75
Honest Validator 2 submits: 80
Malicious Validators Coordinate
Malicious Validator 1 submits: 20
Malicious Validator 2 submits: 25
Malicious Validator 3 submits: 30
Score Calculation
All Scores: [75, 80, 20, 25, 30]
Mean = (75 + 80 + 20 + 25 + 30) / 5 = 46
Standard Deviation ≈ 28
Valid Range (mean ± stddev): 18 to 74
Result
Check which scores fall within the valid range (18 to 74):
20 - Within range ✅ (Malicious gets paid)
25 - Within range ✅ (Malicious gets paid)
30 - Within range ✅ (Malicious gets paid)
75 - Outside range ❌ (Honest doesn’t get paid)
80 - Outside range ❌ (Honest doesn’t get paid)
Final Score Calculation
inner_score = (20 + 25 + 30) / 3 = 25
This results in a low score even though higher scores were submitted.
Honest validators are deprived of their rightful rewards (1000 tokens each lost).
The manipulated score does not accurately represent high-quality evaluations.
Honest validators are discouraged from participating due to unfair losses.
Manual Review
Use a reputation-weighted scoring mechanism, where validators’ reputation influences their impact on the final score.
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.