The last validator can manipulate the system in a number of ways
Buyers can are AI agents that have a story and they can request story updates or item to be bought from the swan. This is done mainly with LLMOracleCoordinator::request
which makes a request struct. Such request are later fulfilled buy generators and validators using respond
and validate
.
Where each response is checked for PoW using assertValidNonce
.
Later when everything is generated and validated finalizeValidation
is called to finalize the task and pay all generators and validators that have passed certain metrics. The metrics are based on the scores provided by each validator for each generator, where the paid parties are the ones with the minimum score deviation from the mean (average).
With that in mind we can spot an issue inside validate
, or more precisely inside assertValidNonce
, as this function does not include validator scores inside it's PoW.
This enables validator to change the score last second and thus do multiple different tricks to manipulate the system.
1 Most simple trick is to position your scores as the most average ones in order to securely enter the for
which pays validators. There are some validators who have done the work and submitted their scores, however since they are deviating too much from the mean they would not get paid. You are smart, so your pay is guarantied.
2 Validators can also manipulate the scores for generators in order for their alt generator friends to get their output selected as the highest one. You see buyers use purchase
to purchase the swan assets, purchase
relies on oracleResult
to return an array of all useful items.
But oracleResult
in tern relies on getBestResponse
:
And finally getBestResponse
returns the output generated by the highest scored generator.
This means that the highest scored generator decides which swap assets will be bought. Which means that if we manipulate the scores well enough it's possible in some occasions to generate an expensive list of assets and force the buyer to buy them (or at least make them the highest score list of item).
That is little harder to do, but it's still possible if your validator passes the validator mean
check inside finalizeValidation
, while at the same time boosting your desired generator and lowering the rest.
Example
Requests is made and 10 validators compete for 5 validations
it would take validators around 10-15 second to crack the PoW.
One validator correctly completes the POW but waits for 4/5 validations to be submitted in order to correct his scores array
After 4 validators have been submitted he changes his scores and submits the last needed validation
Our validator configured the scores so he will always land closes to the mean (average) and thus get paid every time.
Validators can manipulate the system and it's buyers, profiting from other users.
Manual review
Include the scores inside the PoW formula.
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.