loomnetwork / plasma-cash

Plasma Cash Contract & Client. ERC721, ERC20, and ETH compatible
https://loomx.io/developers
Other
271 stars 62 forks source link

Multiple challenges and bonds #110

Closed gakonst closed 6 years ago

gakonst commented 6 years ago

Now that the contracts support multiple challenges, if an exit has N challenges, and X bond, the first challenge will get the whole bond, and potentially the slashBond function in line 390 during the finalization of an exit will revert.

1 possible countermeasure is to just split the slash in N equal parts and award the challengers. Other approach is to just reward the first challenger

(need to write a test that illustrates this potential exploit to verify its existence, and then a countermeasure).