Rules
Every duel is one player against one player. Both stakes are locked in the smart contract, the result is decided on chain, and the winner takes the pot minus a … fee. Rivl never plays against you.
How a duel works
- You create a duel: pick a game, ETH or USDG, a stake, and your side or move. Your stake is locked.
- Another player joins with the same stake. You can't join your own duel.
- You come back and reveal the secret your browser locked in when you created the duel. The contract checks it and decides the result on the spot. If you don't reveal in time, your rival wins.
- Winnings and draws are credited to your balance. Claim them any time from My duels.
Games
Coinflip
The creator calls Heads or Tails; the rival gets the other side. The creator locks in a secret salt, the rival adds a random seed, and randomWord = keccak256(salt, seed). The coin is randomWord % 2 (0 = Heads, 1 = Tails). No draws.
Dice Duel
Nobody picks anything. The random word comes from the creator's secret salt and the rival's seed, as in Coinflip, and gives both rolls: creator = uint128(randomWord) % 100 + 1, rival = (randomWord >> 128) % 100 + 1. Highest number wins. Same number is a draw: both stakes are returned with no fee.
Suit (rock, paper, scissors)
The creator commits a hidden move; the rival then picks openly. The creator reveals the move and salt, and the contract checks them against the commit. Paper beats Rock, Scissors beat Paper, Rock beats Scissors. Same move is a draw with no fee. If the creator doesn't reveal within … — or reveals an invalid move — the rival wins.
Fees
The fee is … of the pot, taken only when there is a winner. The winner receives 2 × stake − fee. Example: 100 USDG vs 100 USDG → winner gets 195 USDG, fee 5 USDG.
No fee on draws or cancelled duels. The fee is locked when a duel is created, and the contract caps it at 10%.
Time limits
The creator can cancel any time before someone joins, even after it expires.
All games. After that, anyone can settle the duel and the rival wins.
Stake limits per player
FAQ
›Can Rivl take or freeze my funds?
No. The contract has no function that lets the owner take player funds, and every waiting state has a deadline with an exit anyone can trigger. Pausing only stops new duels; cancelling, revealing, timeouts and claims keep working.
›How do I know a result was fair?
Every result comes from the two players: the creator's hidden secret and the rival's choice or random seed. There is no oracle or operator, so nobody — including Rivl — can pick or know the result in advance. Check any duel on the Provably fair page.
›Why do I have to come back after someone joins?
Your secret (and your move in Suit) is hidden as a hash so your rival can't see it. Only you have the salt that opens it, so you must reveal it after someone joins. If you don't reveal in time, your rival wins.
›What if I lose my secret?
Your secrets are saved in your browser. Back them up from My duels and restore the file on another device. Without them you can't reveal and you will lose by timeout.
›Where do my winnings go?
They are credited to your claimable balance in the contract. Use Claim on My duels to send them to your wallet. There is no expiry.
›Which tokens can I use?
ETH and USDG, within the stake limits above.
›Can I set my own limits?
Yes. Set a daily stake limit or take a break on My duels.