Open hats-bug-reporter[bot] opened 4 hours ago
isFinalized
is called inside the stateFinalized
modifier on resultFor
the call tree is as follow:
resultForOnceSettled
calls resultFor
resultFor
has the modifier stateFinalized
stateFinalized
calls isFinalized
and reverts if the question is not finalized yet
Github username: -- Twitter username: -- Submission hash (on-chain): 0xbc97de7e82f2857a81317d45d211b61e0fab29b8612cdcd81c32af6a12945a6d Severity: high
Description: Description\
Issue resolver does not check if the issue is finalized.
Attack Scenario\
In RealityProxy, the contract is used to resolve the answer.
In ResolveMultiScalarMarket, the code does not convert the answer to payout
the code query realitio.resultForOnceSettled directly,
https://gnosisscan.io/address/0xE78996A233895bE74a66F451f1019cA9734205cc#code#L608
However, the question maybe pending for arbitration and not finalized yet.
https://gnosisscan.io/address/0xE78996A233895bE74a66F451f1019cA9734205cc#code#L131
the code does not check if the question is finalized or if the arbitration and dispute is completed.
https://gnosisscan.io/address/0xE78996A233895bE74a66F451f1019cA9734205cc#code#L589
Attachments
Proof of Concept (PoC) File
user A a create a question.
user B create a prediction market.
user C answer incorrect answer.
user C resolve the prediction market using incorrect answer.
user B create a arbitration and dispute and wants to modify the incorrect answer.
the incorrect answer is changed and overwritten to correct answer.
but user C already use the incorrect answer to resolve the prediction
because the code does not check if the question is finalized.