Infrastructure

Technical details on how the dApp was built

Fully Decentralized Backend

At its core, the dice game is a smart contract living on the base chain. All game logic and bet settlements happen on-chain. This means that even if our website is down, you can still interact directly with the smart contract to place bets and withdraw tokens.

In addition, the dice game is provably fair. This means that each bet's outcome can be verified via a blockchain transaction. The random number for each dice roll is generated using Supra's VRF (Verified Random Function) and can be traced via the blockchain transaction that generates the RNG.

You will notice that after each bet, there is a transaction that can be verified. The verification occurs via a separate smart contract, which verifies the two-part signature against the function used to generate the request.

Frontend

The frontend of the dice game is built with React and Next.js 13. We use a database to store player stats, but we do not store any player's balances in the database. This means that even if the database were hacked, it wouldn't affect users' balances or their ability to withdraw their tokens.

Last updated