Open ACaiSec opened 3 years ago
@little-petrol I think you are right, meaning
The solution is not in the code but in "game theory", because the loser, being rational, will prefer to lose 1 eth and not 2. so it is better to get back the bond than to leave both the bond and the bet locked in the contract.
If you wanted to reduce the risk of a non rational actor you can add a public function that can only execute after some time has passed and which rewards all the balance to the non offending actor, however I think it is very elegant how you can get the losing party to cooperate post losing and not have to increase both contract and interaction complexity.
If a player not call the reveal( ) function or he forgets the number or blindingFactor after calling the play( ) function to set the commitment. The OddEven contract of odd_even_fixed.sol would be locked. I don't know if this situation is within your consideration. The above questions are only raised by me as a beginner. Thx