Skip to content

The House is a Smart Contract in this Blackjack dApp that utilizes Chainlink VRF for cryptograhically-guaranteed randomized deck shuffling. Built for Chainlink's Spring '23 Hackathon.

License

Notifications You must be signed in to change notification settings

Andy-Waine/smartcontract-blackjack

Repository files navigation

🃏 Smart Contract Blackjack ♦️ ♠️ ♥️ ♣️

The House is a Smart Contract in this Blackjack dApp that utilizes Chainlink VRF for cryptograhically-guaranteed randomized deck shuffling.

Demonstration .gif of the Application

📁 Table of Contents

ℹ️ General Information

  • Start playing blackjack NOW with Smart Contract blackjack to cut out the middleman and avoid storing your money in a centralized escrow.
  • Greater shuffling randomization than traditional methods is achieved through Chainlink VRF's cryptographically guaranteed random number issuance.
  • This project was built for and submitted to the Spring '23 Chainlink Hackathon.

💻 Technologies Used

  • chainlink
  • React
  • solidity
  • web3.js
  • truffle
  • ganache

🔧 Setup

  • Ensure the latest recommended version of Node and npm are installed on your machine.
  • Clone this repository and run npm install to download all dependencies.
  • Run npm run start to serve the application locally (localhost:3000)
  • If the application throws a build error on main, try the demo branch to test the game and the application's UI (see 'Challenge' below for more details):

🧗‍ Challenge 🧗‍

Currently, we are working to overcome the challenge of obtaining a VRF response prior to dealing. When building locally on `main`, the most up-to-date logic for VRF shuffling throws a build error. We have provided a `demo` branch for game testing with hardcoded values in place of the response. This is our highest-priority item, but we will wait until the judging period for the Spring '23 Hackathon is over to continue work on this.

📈 Advantages Over TradFi Blackjack

No Escrow Required Trustless Randomization Instant Payouts No Middleman Plug & Play
DeFi ✅ The only 'escrow' made is for your current hand's wager. You do not need to entrust a third party with any other funds. ✅ Utilizes transparent methods of cryptographically guaranteed randomness from Chainlink VRF for card deals and draws. ✅ Payouts are distributed with each hand as you play. ✅ The Smart Contract is automated and requires little overhead to remain operational. ✅ No account creation necessary. The user can begin playing instantly with a funded MetaMask account.
TradFi ❌ To bet, you must entrust your bankroll to an escrow account with a third party (the House). ❌ Methods of Randomization are not publicly available, requiring the user to trust the house is acting in good faith. ❌ Payouts are distributed asynchronously and may take several business days ❌ The House takes a sizable cut ('rake') from every hand and has high operational expenses. ❌ The user must create and verify an account, provide their banking information, and wire funds to begin playing.

🤓 Explainer: VRF-Based Shuffling Method

Shuffling Process Visualization

👋 Meet the Team

Dev Profile Picture: Andy       Dev Profile Picture: Rahul

Andy Waine                                   Rahul Guha

About

The House is a Smart Contract in this Blackjack dApp that utilizes Chainlink VRF for cryptograhically-guaranteed randomized deck shuffling. Built for Chainlink's Spring '23 Hackathon.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published