💛
BETFIN DOCS
ABOUT BETFIN
ABOUT BETFIN
  • ⭐INTRO
  • 🎯TERMS & CONDITIONS OVERVIEW
  • 📗FAQ OVERVIEW
  • TOKENOMY
    • 🪙BET Token
      • 💛Buy BET token
    • 📊BET initial distribution
      • 📊Team Pool
      • 📊Partners Pool
      • 📊Airdrop Pool
      • 📊Affiliate Pool
      • 📊Bonus Pool
    • 💹Vesting & Unlock plan
    • 🔏Liquidity and lockups
      • Community lockup
      • Team.finance lockups
    • 📗Tokenomy FAQ
  • BETFIN GOVERNANCE
    • 📄Betfin Contract Addresses
      • 👀Verify contracts
    • 🏩Betfin governance
      • ⚙️Timelock Principle
      • ⚙️Multisignature (multisig) Principle
    • 👁️‍🗨️Internal Wallets & External Contracts
    • 📗General FAQ
  • SMARTCONTRACTS DESCRIPTION
    • 🌍Contracts Overview
    • 🤖Core
      • 🤖Partner
      • 🤖Tariff
    • 🤖Conservative Staking
      • 🤖Conservative Staking Pool
    • 🤖Dynamic Staking
      • 🤖Dynamic Staking Pool
    • 🤖Pass Contract
      • 🤖Affiliate Member
    • 🤖Affiliate Contract
      • 🤖Affiliate Fund
    • 🖥️Game Interface
    • 🖥️Bet Interface
    • 📟Predict Contract
      • 📟Predict Game
    • 📟Roulette
      • 📟Roulette Bet
    • 🐞Error Codes
  • AUDITS & BUG BOUNTY
    • ☢️Betfin security audits
    • 🔰Bug Bounty
    • 👷Report an Issue
  • For Developers
    • 💻Web Template
    • 📑Smart Contract Template
Powered by GitBook
On this page
  • Key Features
  • Functions
  1. SMARTCONTRACTS DESCRIPTION

Roulette

PreviousPredict GameNextRoulette Bet

Last updated 1 year ago

The Roulette smart contract is a part of a decentralized gaming platform, specifically designed to handle the logic and operations related to playing a game of roulette. It leverages the Ethereum blockchain for transparency, fairness, and security. The contract employs Chainlink's Verifiable Random Function (VRF) to ensure the randomness of roulette spins, integrates with a dynamic staking system, and adheres to the game interface standard defined within the platform.

Key Features

  • Implements for provably fair randomness.

  • Integrates with a Dynamic staking mechanism for handling bets and payouts.

  • Enforces betting limits and validates bet data.

  • Non-reentrant to prevent re-entrancy attacks.

  • Emits events for key actions: bet placement, spin result, etc.

Variables

  • REQUIRED_FUNDS_COEFFICIENT: Multiplier for validating sufficient balance.

  • subscriptionId, vrfCoordinator, keyHash: Chainlink VRF configuration.

  • limits: Struct mapping defining minimum and maximum bet sizes.

  • staking, core: Addresses for the staking and core contracts.

Functions

Public and External

  • getPossibleWin: Calculates the maximum possible win for given bet data.

  • placeBet: Initiates a roulette spin request for a player. Validates bet data, requests randomness, and records the bet.

  • getAddress, getVersion, getFeeType, getStaking: Interface implementations providing contract details.

  • setLimit: Updates minimum and maximum bet sizes for a specific bet type.

Events

  • Rolled: Emitted when a roulette spin is requested.

  • Landed: Emitted with the result of a roulette spin.

  • LimitChanged: Emitted when bet limits are updated.

📟
Chainlink VRF