Links

Rock Paper Scissors

Probability

Rock Paper Scissors (RPS) uses the function _determineRPSResult which has three possible outcomes: 1, 2 and 3.
randomActions[i] = uint8(randomWords[i] % 3);
outcomes[i] = _determineRPSResult(game.action, randomActions[i]);
Player outcome
Probability
Rock
33.3%
Paper
33.3%
Scissors
33.3%

House Edge and Multiplier

A 2% fee is taken off the payout by multiplying with 1.98 on a win and can be found in the RockPaperScissors contract:
payout += (game.wager * 198) / 100;
payouts[i] = (game.wager * 198) / 100;
A 1% fee is taken off the wager by multiplying with 0.99 on a draw:
payout += (game.wager * 99) / 100;
payouts[i] = (game.wager * 99) / 100;
No fee is taken on a loss.
Player outcome
Fee
Multiplier
Win
2%
1.98x
Draw
1%
0.99x
Loss
0%
0x
Therefor, the house edge for RPS is 1% ((2+1+0)/3).

Odds

With the above in mind, the odds for RPS are:
Odds
Outcome
Decimal odds
0.99
Return to Player
99%
Probability odds
49.5%
Last modified 4mo ago