hackquest logo

Lotto

A decentralized lottery on Flow blockchain with provably fair randomness. Create sessions, buy tickets with FLOW tokens, and win prizes through transparent on-chain distribution.

Videos

Description

Lotto is a transparent, provably fair lottery system built on the Flow blockchain. It enables users to create and participate in lottery sessions with automatic prize distribution.

How It Works

Session Creation:

  • Any user can create a lottery session by specifying:

    • Ticket price (in FLOW tokens)

    • Session duration (start and end time)

    • Prize distribution percentages

Participation:

  • Users purchase tickets during active sessions

  • Each ticket costs a fixed FLOW amount set by the creator

  • Multiple tickets can be purchased to increase winning chances

  • All ticket purchases contribute to the total prize pool

Prize Distribution:

  • When a session ends, it must be closed by calling the close function

  • The system uses Flow's secure on-chain randomness to select a winner fairly

  • Prize pool is distributed as follows:

    • Winner: Receives the majority of the pool (configurable percentage)

    • Creator: Receives a commission for hosting the session

    • Closer: Receives a small reward for triggering the session closure

  • Distribution percentages are set during session creation and stored immutably on-chain

Transparency:

  • All session data (participants, tickets, prize pool) is publicly visible

  • Session status updates in real-time (Active/Ended/Closed)

  • Winner selection is cryptographically verifiable

  • Complete transaction history available on Flow blockchain

The platform combines Flow's native token economics with provably fair randomness for a trustless lottery experience.

Tech Stack

React
cadence
Team Leader
Aamousavig
Sector
DeFiSocialFi