Open hats-bug-reporter[bot] opened 1 month ago
contract MaliciousMarket {
function questionIds() {
bytes[] memory questionIds = new bytes[](1);
questionIds[0] = bytes("will there be another dispute");
return questionsId();
}
function numOutComes() {
return 10;
}
function low() {
return 1;
}
function high() {
return 2;
}
}
You can create malicious markets, but if you resolve them, you will not end up to the questionId of a correct market as all market params are used in the hash creating the questionId.
Note that you could copy a valid market, but then all you'd be doing would just be resolving a valid market correctly.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x3042e2237782830148e5ccffedd66c5158d7ec707a9d551333a30781fe591209 Severity: high
Description: Description\
Market resolve missing access control
Once the issue is resolved, the Market#resolve is not callable and revert.
because the question id is already reported to conditional token.
combining with the fact that user can create a malicious market to resolve and report incorrectly payout because the report payout only has question id parameter,
yet a malicious market may have the same question id, as the valid one.
Attack Scenario\ Describe how the vulnerability can be exploited.
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)