hackquest logo

Flow Roll Club

The Flow Roll Club is a tokenized Dice Game Club that leverages the VRF innovation of Flow blockchain to create trustless, perpetual and ownable dice games. Now using Scheduled Transactions!

Videos

Description

Visit https://flowroll.club

https://x.com/flowrollclub

The Flow Roll Club is a tokenized Dice Game Club that leverages the VRF innovation of Flow blockchain to create trustless, perpetual and ownable dice games. Now using Scheduled Transactions with the Forte upgrade.

The Dice Games are NFT contracts with corresponding game logic. When the NFT is minted the parameters of the game must be specified and must be unique.

The goal is to democratize becoming the house when playing games online. The house always wins, then lets allow everyone to win!

The dice game contracts allow players to bet on numbers which are pulled in corresponding blocks. It follows commit-reveal scheme where the players make a bet and a reveal transaction will pull the number.

The reveal transaction is now using scheduled transactions which greatly simplify the UX.

The dice games are owned by the NFT holders who collect fees from the game play. This makes the Flow Roll Club an NFT club with Cash Flow and huge possibilities.

Flow specific features:
The use of CadenceRandomConsumer from solidity to request and fulfill randomness makes this a flow exclusive!

Scheduled transactions make the game play UX feel more simple while staying secure. The transaction that requests the randomness schedules a future tx that fulfills it.

The smart contracts are done and deployed on Flow Testnet.
https://github.com/Flow-Roll/FlowRoll_Contracts

It uses a mix of Solidity and Cadence, the important contracts are:

NFTSaleV2: "0x67E9A2e94DF5328F5b0DD97083EA15CCe71E17ED",
FlowRollNFT: "0x5219333BEeD9c98A0D0A625C9e5578A9DaAa94Ff"

Each game has it's own contract deployed when NFTs are sold.
Here is an example game page:

Game 0:

https://flowroll.club/games/0

https://evm-testnet.flowscan.io/address/0xF39C0C096AF556f95Caba4bDeFbE7a09EFb5F218

Game 1:

https://flowroll.club/games/1
https://evm-testnet.flowscan.io/address/0x2872A8AcF0F85EE4255AfFe2AC21a0aB25aD83b9

Game 4:

https://flowroll.club/games/4

https://evm-testnet.flowscan.io/address/0x8136246d6e0B5374a2F6940968f3a771Bfba8e8B

The game contract logic is implemented here:
https://github.com/Flow-Roll/FlowRoll_Contracts/blob/master/contracts/FlowRoll.sol

The NFT contracts are traditional ERC721
https://github.com/Flow-Roll/FlowRoll_Contracts/blob/master/contracts/FlowRollNFT.sol

NFTs are minted via the NFTSale contract:
https://github.com/Flow-Roll/FlowRoll_Contracts/blob/master/contracts/NFTSaleV2.sol

You can find the cadence transaction that places the bets and schedules a future tx here:
https://github.com/Flow-Roll/FlowRoll_Contracts/blob/master/cadence/transactions/BetFlowAndScheduleRevealBet.cdc

This here is the betting transaction handler:
https://github.com/Flow-Roll/FlowRoll_Contracts/blob/master/cadence/contracts/BettingTransactionHandler.cdc

When minting the NFT the sender must pay for it and configure it. Once configured it can't be changed. The dice games accept Flow or ERC20 tokens as deposits and collect bet deposits in a prizeVault. For now only Flow is supported on the UI.

On a winning bet, a percentage of the prize vault is paid out to winning players, with fees distributed to the NFT owner.

The NFT owner earns from the game play fees and can sell their NFT any time.
The flow roll club protocol itself is sponsored by the NFT sales and a small protocol fee on the house edge.

The players have a chance to win a percentage of the prize pool.

Progress During Hackathon

The front end for flow roll club is finished during the hackathon period. Adding support for scheduled transactions to allow betting and roll in a single signed transaction. Bet now schedules a future reveal.

Tech Stack

Web3

Fundraising Status

No Funds raised so far

Team Leader
SStrawberry!
Sector
DeFi