You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
loser can always tell they are the loser if they wait to reveal second (the number is a transaction parameter)
loser can avoid change to the state after learning that they lost (they already know their number, and now the other party number)
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
The text was updated successfully, but these errors were encountered: