Open hats-bug-reporter[bot] opened 1 month ago
You can indeed still mint tokens after resolution (this can be particularly useful if those are used in a conditional market). You can't get any advantage from it, as to get 1 token of the winning outcome, you need to put 1 token of the underlying. So when you redeem, you just get back your underlying. You can get tokens of losing outcome for free, but those are worthless and can't be redeemed.
Not my issue, but will add a comment here:
@Rassska I couldn't understand your comment.
@Rassska Unique ERC20 are minted for every new market even if the questionId is same. It is not possible to mint another market's token like this.
Github username: -- Twitter username: -- Submission hash (on-chain): 0xbce63405f7b51aa96cd6142461a65720a7129699b0b3a12b14c1eb43adeb3db1 Severity: high
Description: Description
After a successfull market resolution, the holders of a winning outcome tokens can redeem them for xDAI. This logic is done inside
GnosisRouter.sol
andRouter.sol
. However the users can still buy any outcome tokens after the market has been resolved. Users can callGnosisRouter::splitFromBase()
and mint outcome tokens in exchange for xDAI. This leads to a huge advantage because at this stage(after market resolution), the answer of the PM is known. The winning outcome tokens, bought after the resolution guarantee a reward. This is possible because nowhere is checked if the market has been resolved before buying outcome tokens.Attack Scenario\
GnosisRouter::splitFromBase()
Attachments
POC
GnosisRouter.test.ts
Tests logs:
Forbid the user to mint new outcome tokens after the PM has been resolved.