Inspiration

The game is inspired by the classical Russian Roulette game. In the same spirit, the game is meant to be an "all-or-nothing" play. At each round, the game could end just like that - there's no telling. It's 50/50.

What it does

This is a two-player zero-sum game built using Chainlink's Verifiable Random Function (VRF) as its random number generator (RNG). The game uses the Axelar network to give it cross-chain functionality. Players on both the Ethereum network and Binance can access it.

The goal of each player is to guess if the bullet chamber is loaded or not. Each player sends $6 worth of ETH to the contract address (address payable). The winner takes it all. However, the game creator retains a 10% charge.

If after 6 rounds there's no winner, the contract generates 3 random numbers and then randomly chooses one of the two players to make the first guess on whether the majority of the 3 numbers is even or odd.

Whatever the first player chooses (odd or even), the opposite is automatically assigned to the other player. The contract then chooses the winner and assigns them the prize.

How we built it

Technologies Used:

  • VRF Generator
  • Chainlink's VRF Subscription method
  • Axelar's General Message Passing (GMP) function

Challenges we ran into

  • When testing the new contracts (after debugging), we would at times forget to add our contract to the VRF subscription
  • At times the Georli network was very slow

Accomplishments that we're proud of

We managed to prove that our idea is feasible!

What we learned

  • Very important to modularize your smart contract code. When gas estimation errors come up, it becomes easy to identify which particular area is causing the problem

What's next for Roulette

The classical game is for people with a taste for danger & high stakes. We hope to build it further to attract "high rollers" who are looking at playing at amounts like $600 or $6,000.

Built With

Share this project:

Updates