πŸ₯‘
Swappi Docs
English
English
  • Intro
  • Getting Started
    • 1️⃣Choosing a Wallet
    • 2️⃣Connecting Your Wallet to Conflux eSpace
    • 3️⃣Getting CFX in Conflux eSpace
    • 4️⃣Bridging Your Tokens to Conflux eSpace
    • 5️⃣Adding Your Bridged Tokens to MetaMask
    • 6️⃣Connecting MetaMask to Swappi
    • 7️⃣Your First Swap!
    • 8️⃣Adding Liquidity to a Liquidity Pool
    • πŸ§‘β€πŸŒΎFarming Tasty Avocados
    • 🌠Boosting Your Rewards
    • ➑️What's Next?
  • Quick Reference
    • πŸ“ŒBridges to Conflux eSpace
    • πŸ“Token Contract Addresses
    • πŸ“Liquidity Pools Token Addresses
  • Transferring Assets to Conflux eSpace
    • πŸ—ΊοΈOverview
    • 🏦From Exchanges
      • Transferring eSpace CFX from KuCoin to MetaMask
      • Transferring eSpace CFX from Gate.io to MetaMask
    • πŸ›°οΈFrom Conflux Core Space
      • Bridging Assets From Conflux Core with Fluent
    • 🌐From Other Networks
      • Bridging Assets with Butter Bridge
      • Bridging Assets from Ethereum with cBridge
      • Bridging Stablecoins with Meson
      • Bridging from Binance SmartChain with the eSpace Bridge
  • Products
    • πŸ”„Exchange
      • Token Swaps
      • How to Trade
      • Liquidity Pools
      • Adding Liquidity to a Pool
      • Removing Liquidity from a Pool
    • πŸ§‘β€πŸŒΎYield Farming
      • Overview
      • Finding a Farm
      • Putting your LP Tokens into a Farm
      • Adding LP Tokens to a Farm
      • Removing LP Tokens from a Farm
      • Collecting Your Farming Rewards
      • Returning Your Farm to Harvest
      • How often should I harvest my Rewards?
    • 🌠Boosting
      • Boosting your PPI Rewards
    • πŸ’³Genesis Pass NFT
      • Transferring Your Swappi Genesis Pass NFT Using Confluxscan
    • 🎲Lottery
      • πŸ› οΈRules
      • 🎫Getting Your Ticket
      • 🎩How Are Winners Determined?
      • πŸ’°Claiming Your Prize
      • ❓F.A.Q.
    • πŸš€Launchpad
      • πŸ§‘β€πŸš€About Swappi Launchpad
      • πŸ’ΉParticipating in an IDO
      • ❓F.A.Q.
  • About Swappi
    • πŸ₯‘About PPI
    • πŸ“Swappi Contract Addresses
    • πŸ›£οΈProduct Roadmap
    • 🐞Bug Bounty Program
  • Wallets
    • πŸ’°Supported Wallets
    • πŸ”Using Your Ledger Hardware Wallet with Swappi
    • 🌊Connecting Fluent to Swappi
    • 🦊Using TokenPocket with Swappi
  • Get Help
    • Fixing Stuck Pending Transactions in Your Wallet
    • Checklist
    • General FAQ
    • Boost FAQ
  • Contact Us
    • Business Partnerships
    • Customer Support
    • Social Accounts and Communities
  • Brand & Logos
    • README
    • Downloads
Powered by GitBook
On this page
  1. Products
  2. Lottery

How Are Winners Determined?

PreviousGetting Your TicketNextClaiming Your Prize

Last updated 2 years ago

Lottery uses works as follows:

  1. After the on-going lottery round expires, two block numbers are selected: the latest one on the chain is obtained (Block A) and a future yet-to-be-produced block (Block B).

  2. A third random number, sss​ is selected as a salt.

  3. Block A and the salt s are chained together and hashed with SHA-3 to get a digest D.

  4. The digest D is put on-chain and the round for the lottery is closed to prohibit the purchase of new tickets.

  5. After Block B is mined, both Block A and the salt are uploaded to a random number contract, which verifies that the digest matches the uploaded block number and salt in step 3.

  6. The random number contract verifies that the digest matches the uploaded block number and salt and then takes the block hash and salt corresponding to the block number and does a SHA hash to calculate the final lottery result.

🎲
🎩