Open sherlock-admin4 opened 4 months ago
1 comment(s) were left on this issue during the judging contest.
0xmystery commented:
forecastValue can be set to any value due to duplication
The protocol team fixed this issue in the following PRs/commits: https://github.com/allora-network/allora-chain/pull/449
volodya
High
forecast-implied inferences can be set to any value due to ForecastElements is not filtered by duplicate.
Summary
forecast-implied inferences can be set to any value due to ForecastElements is not filtered by duplicate.
Vulnerability Detail
The function
InsertBulkWorkerPayload
doesn't have any authentication. There is no validation for duplicates inside the input variableworkerDataBundle.InferenceForecastsBundle.Forecast.ForecastElements
msg_server_worker_payload.go#L164
.ForecastElements
is being used insideCalcForecastImpliedInferences
to calculate forecast-implied inference value.Impact
forecastValue can be set to any value due to duplication
Code Snippet
Tool used
Manual Review
Recommendation
Filter out duplicates inside workerDataBundle.InferenceForecastsBundle.Forecast.ForecastElements inside
verifyAndInsertForecastsFromTopForecasters
before saving viams.k.InsertForecasts(