PeetBet Logo
PeetBet
HomeDashboardDocsAbout Us
Connect Wallet
OverviewHow It WorksConnect WalletProvably FairChainlink VRFNerd ZoneGamesCoin Flip RulesDice RulesContractsFees & EconomicsFree WithdrawalsReferral RulesFAQVerify & AuditScam AwarenessTerms & Conditions

Chainlink VRF Documentation

Verifiable Random Function

A comprehensive guide to how Chainlink VRF provides provably fair randomness for every bet on PeetBet. Understand the technology that makes true 50/50 odds possible.

What is Chainlink VRF?

Chainlink VRF (Verifiable Random Function) is a provably fair and cryptographically secure source of randomness designed specifically for smart contracts. Unlike traditional random number generators that can be manipulated, Chainlink VRF generates random numbers along with cryptographic proof that the randomness was generated correctly. This proof is verified on-chain before any random number can be used, ensuring complete transparency and fairness that anyone can verify.

Tamper-Proof

No one can predict or manipulate the random output — not even the oracle operators or PeetBet.

Cryptographic Proof

Every random number comes with a mathematical proof that can be verified on the blockchain.

Publicly Verifiable

Anyone can verify the randomness by checking the proof on-chain using a block explorer.

How Chainlink VRF Works

1

Request Initiated

When a game needs to be resolved, our smart contract sends a randomness request to the Chainlink VRF Coordinator contract. This request includes a unique nonce and the latest block hash to ensure unpredictability.

2

Oracle Selection

The VRF Coordinator routes the request to one of Chainlink's decentralized oracle nodes. These nodes are operated by independent, reputable entities that stake LINK tokens as collateral.

3

Random Number Generation

The selected oracle node uses its private key combined with the block hash and nonce to generate a verifiable random number. This process uses elliptic curve cryptography to ensure the output is unpredictable.

4

Proof Generation

Along with the random number, the oracle generates a cryptographic proof. This proof mathematically demonstrates that the random number was correctly generated from the input parameters.

5

On-Chain Verification & Callback

The random number and proof are submitted back to the blockchain. The VRF Coordinator verifies the proof on-chain, and only if valid, forwards the random value to our smart contract which then resolves the game.

Why Chainlink VRF Costs Money

Every randomness request costs real money. Unlike traditional casinos that use free (and manipulable) pseudo-random generators, we pay for genuine cryptographic randomness to ensure every game is provably fair.

LINK Token Payment

Each VRF request requires payment in LINK tokens to the oracle node that generates the randomness. This incentivizes honest behavior.

Ethereum Gas Fees

The callback transaction that delivers the random number and proof to our contract requires gas, which varies based on network congestion.

Oracle Infrastructure

Chainlink maintains a decentralized network of oracle nodes with redundancy and security measures that require ongoing operational costs.

Verification Computation

The on-chain proof verification is computationally intensive, adding to the gas cost but ensuring the randomness is legitimate.

We absorb all these costs because true fairness is non-negotiable. Your trust and the integrity of every game is worth far more than saving on randomness generation.

Technical Deep Dive

Random Number Generation Formula

The random number is generated using a combination of the oracle's private key, the block hash at the time of request, and a unique nonce. This combination ensures that the output is both unpredictable and verifiable.

randomness = VRF(privateKey, blockHash + nonce)

Cryptographic Proof

The proof uses Elliptic Curve VRF based on the secp256k1 curve (the same used by Ethereum). It mathematically proves that the random output was correctly derived from the inputs without revealing the oracle's private key.

On-Chain Verification

The VRF Coordinator contract contains the verification logic that checks the proof against the public key of the oracle. If the proof is invalid, the transaction reverts and the random number is never used.

Frequently Asked Questions

Can Chainlink nodes manipulate the random result?

No. The cryptographic proof ensures that even the oracle node operators cannot choose or predict the output. If they tried to manipulate the result, the proof would fail verification on-chain and the transaction would revert.

Can PeetBet manipulate the random result?

No. PeetBet has no control over the randomness generation. We simply request randomness and receive the result along with proof. The entire process is transparent and verifiable on-chain.

Why does randomness take 15-45 seconds?

The VRF process requires the oracle to generate the random number and proof, submit a transaction to the blockchain, and wait for confirmations. This delay ensures the randomness is secure and final.

How can I verify a game result?

Every game records the VRF request ID and the resulting random value on-chain. You can use Etherscan to trace the request to the Chainlink VRF response and verify the proof.

What happens if Chainlink fails to respond?

Our contracts have timeout mechanisms. If Chainlink doesn't respond within a certain time, the game can be cancelled and stakes refunded. This protects players from stuck funds.

External Resources

Chainlink VRF Official Documentation

docs.chain.link/vrf

Chainlink VRF Video Explainer

YouTube

PeetBet Logo

PeetBet

Decentralized peer-to-peer crypto betting with provably fair randomness.

Navigation

  • Dashboard
  • Play
  • Rooms
  • Leaderboard
  • Missions
  • Referrals
  • History
  • Transparency
  • Settings

Resources

  • About Us
  • Documentation
  • How It Works
  • Fees
  • Get Help
  • Discord

Follow Us on X

This is our main social media. Follow us there for updates, news, and community events!

@PeetBet →

Join Our Telegram

Join our community group for real-time discussions, support, and updates!

t.me/peetbet →

Get in Touch

For collaborations, marketing campaigns, bug reports, or if you want to work with us, reach out here.

peet.bet.global@gmail.com

Beta Version (Peet.bet v1.0.0)

This platform is in beta. Use at your own risk. Please read our Terms & Conditions

v1.0.0

Bug Hunter Program

Found a bug or vulnerability? Report it and get rewarded! Join our dev team and earn $$$.

Report Bug via Email

© 2026 PeetBet. All rights reserved.

Terms & Conditions|Disclaimer

Built on Ethereum