Skip to content

๐ŸŽฐ Plinko game ๐ŸŽฎ smart contract on the Solana blockchain using Anchor framework and Rust language. It is using VRF of orao oracle's latest version

Notifications You must be signed in to change notification settings

TopTrenDev/solana-plinko-game-smart-contract

Repository files navigation

๐ŸŽฒ Solana Plinko Game Smart Contract

This project implements a Plinko game smart contract on the Solana blockchain using Anchor framework. Players drop balls into a Plinko board, and rewards are determined based on the landing bucket. The game integrates randomness via the Orao VRF Oracle to ensure fairness and transparency.

Telegram Twitter Discord


๐Ÿš€ Features

  • ๐Ÿช™ On-chain Solana smart contract for Plinko gameplay.

  • ๐Ÿ”‘ Secure account management using PDAs (Program Derived Addresses).

  • ๐ŸŽฐ Verifiable randomness using Orao VRF Oracle.

  • ๐Ÿ“ˆ Track player stats (total won, buckets hit, etc).

  • ๐Ÿฆ House account logic for managing payouts and balance.

  • โšก Efficient SOL transfers using system instructions with PDA signing.

  • โœ… Tested and structured using Anchor framework.


โš™๏ธ How It Works

  • Start a game

The player calls play_game, placing a bet and specifying parameters (e.g., number of balls).

  • Request randomness

The contract makes a request to Orao VRF.

  • Fulfill randomness

Orao VRF provides random numbers; the contract processes them via fulfill_random_words.

  • Determine payouts

Based on bucket indexes, payouts are computed and distributed between player and house.

  • Update stats

Game, house, and user statistics are updated on-chain.


๐Ÿ“ธ Screenshot

App Preview


๐Ÿ”‘ Example Deployment

  • Build the program
anchor build
  • Deploy to localnet or devnet
anchor deploy
  • ๐Ÿงช Running Tests
anchor test --skip-build --skip-deploy

About

๐ŸŽฐ Plinko game ๐ŸŽฎ smart contract on the Solana blockchain using Anchor framework and Rust language. It is using VRF of orao oracle's latest version

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published