Skip to content

hollow-leaf/doro

Folders and files

NameName
Last commit message
Last commit date
Apr 20, 2024
Feb 26, 2024
Apr 28, 2024
Apr 19, 2024
Dec 11, 2023
Feb 1, 2024
Dec 11, 2023
Dec 11, 2023
Jan 19, 2024
Feb 1, 2024
Feb 26, 2024
Apr 2, 2024
Apr 20, 2024
Dec 11, 2023
Dec 11, 2023
Apr 2, 2024

Repository files navigation

Doro

The Future of Fair Lottery Systems

Relate Repo & Demo Link

Contracts

Problem & Solution

  • Secure and Participative: Doro revolutionizes lottery systems with advanced cryptographic technology. At its core is the ElGamal homomorphic encryption algorithm, ensuring absolute security and fairness.

  • How It Works: Each participant's entry is encrypted using ElGamal, a homomorphic encryption method. This encrypted data is then multiplied with a number on the blockchain. This unique process introduces a high level of randomness, making the lottery outcomes truly unpredictable.

  • Fairness and Transparency: Prior to the draw, no one knows the sequence of entries, guaranteeing a level playing field for all participants. Doro's use of Zero-Knowledge Proofs (ZKPs) alongside homomorphic encryption further enhances fairness and transparency, allowing for verifiable draws without compromising individual privacy.

  • User Engagement: Our system not only ensures fair play but also increases user engagement. Participants can trust the process, knowing their chances are as random and secure as the technology behind it.

  • Conclusion: Doro is more than a lottery system; it's a testament to how cryptography can transform user experience and trust in digital platforms. Join us in embracing a new era of fair, secure, and engaging lottery systems.

Tech Stack

  • Mina Protocal: Berkeley Contract
  • o1js-elgamal: for encrypt random value
  • react native: build hybrid mobile application
  • express: mobile interact with chain

Build & Infra

Doro is a monorepo managed using turbo. You can find the source code for each package in the apps and packages directory.

  • apps/backend
  • apps/serverless (not yet online)
  • packages/contract

Tech Architecture

Loading
sequenceDiagram
    actor A as Admin
    actor U as User
    participant C as O1js-Contract
    participant E as O1js-elgamal
    participant M as Mina

    %% Compile
    A ->> C: Compile Mental Contract
    C ->> M: Deploy Contract
    
    %% Contract
    A ->> E: Create Public Key and Secret
    E ->> C: Store Public Key on chain
    C ->> M: Prove and Write Data
    
    %% Shuffle
    C ->> U: Get Public Key
    U ->> E: Encrypt Secret Value
    U ->> C: Shuffle and change the random value

    %% Reveal
    A ->> C: Decrypt with secret
    C -->> A: Get Decrypt random value and choose the ans from public set