The LLMOracleCoordinator
contract includes a validation score calculation mechanism to reward oracles based on their alignment with an average score. However, this approach presents a vulnerability: it is susceptible to score manipulation by malicious validators. By colluding, validators can drive scores toward a specific mean, unfairly maximizing rewards. This vulnerability affects the integrity and trustworthiness of the validation system, as manipulated scores could undermine the validity of oracle responses.
The vulnerability exists in the finalizeValidation
function, specifically in the section where validators’ scores are used to calculate an “inner mean.” If a group of validators colludes, they can skew their scores, pulling the mean and standard deviation toward a target value. Because only scores close to the calculated mean receive rewards, malicious validators can systematically adjust scores to maximize their rewards while reducing fair reward distribution.
Here is the vulnerable code segment:
A test is created to simulate a scenario in which two colluding validators adjust their scores to manipulate the mean score of a generation, ensuring their scores are within one standard deviation of the mean, allowing them to maximize their rewards. The validators can submit similar scores across multiple generations, driving the mean value consistently in their favor.
Both validators receive rewards as their scores are set near the mean and within one standard deviation.
The test shows that validators can successfully manipulate the score by colluding, proving the vulnerability.
The vulnerability enables colluding validators to manipulate score distribution in their favor, undermining the integrity of the validation process and leading to potential financial losses for non-colluding validators. This manipulation could reduce trust in the oracle system and compromise the quality of content generated by the oracles.
Manual review.
Implement a requirement that validators’ scores are within a reasonable range of each other and increase the difficulty of colluding scores.
Discard extreme values on both ends when calculating the mean, ensuring collusion is less effective.
Use random sampling of validators to calculate mean scores or reward validators, making collusion harder to predict.
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.