Wundaflip

A coin flip game with a twist on BNB Chain and Polygon.

Coin flip games are common, with Degen Coin Flip probably being one of the most widely known in the crypto space. The premise is simple, the user stakes an amount and guesses the outcome of the coin flip (heads or tails). If the user guesses correctly they win double their stake (minus the house rake), if they guess incorrectly then they lose the stake entirely.

All coin flip games suffer from the same problem though; they're a bit boring. Each game is the same and eventually, after a loss there's not much incentive to continue.

Wundaflip is different.

Returns on an individual winning coin flip are slightly less than your typical game at 196%, BUT the extra fees go straight into the prize pool. The prize pool inflates with every play and a jackpot win takes home 50% of the pool. We modeled millions of plays and estimate that jackpots could reach a huge $400,000 USD!

Winning the jackpot is simple, although easier said than done - just guess 12 correct coin flips in a row.

But wait, there's more:

  • Choose your path, to jackpot or no jackpot. To continue a winning streak you must stake at least 10% more than your previous flip.

  • Get a win streak boost, free! 1% of plays randomly gain a free win streak boost, meaning one less guess to hit that jackpot.

  • Earn extra lives through playing regularly. Only one extra life can be used during any single winning streak and only be played on a win streak of 4+ flips (played automatically if available).

  • Guaranteed on-chain payouts. There is zero reliance on Wundalab to fulfill distribution of winnings.

This game uses random outcomes but is not a game of chance as the timing of your flip will directly influence the result. Read more about how Wundaverse games fulfill randomness to maintain balance between gameplay and low gas fees.

Wundaflow integration

Coinflip is built entirely on-chain and can even be played on the command-line if desired. However, to provide the best UX possible, the web UI and back-end utilize Wundaflow extensively.

When a gameplay is initiated, a workflow creates a dedicated websocket for the wallet address. A second workflow listens for contract method calls on Polygon and turns them into events that are delivered as a stream via the websocket. The UI (built using Svelte) handles inbound events in real-time and updates various parts of the game space accordingly.

For flips using on-chain randomness, a third workflow automatically calls the fulfillRandomWordsNoVRF() method after the result block has been mined. While this can be called manually by the player (if playing via console, for example), an automated workflow ensures the player does not incur further gas fees.

Finally, a fourth workflow allocates extra lives to players that play regularly, this is triggered via the wundaflip back-end ingesting webhooks. Extra lives add a further element of skill to the game as you must time when they're played with great strategic precision.

Last updated