Skip to content

Conversation

@Samarth208P
Copy link

@Samarth208P Samarth208P commented Nov 3, 2025

Pyth Examples Contribution

Type of Contribution

  • New Example Project (Adding a new example to demonstrate Pyth integration)
  • Hackathon Submission (Submitting a project from a hackathon)

Project Information

Project/Example Name: JuryDAO – Decentralized Governance Through Random Jury Selection

Pyth Product Used:

  • Pyth Entropy

Blockchain/Platform:

  • Ethereum/EVM (Base Sepolia Testnet)

Description

What does this contribution do?

This contribution adds JuryDAO, a decentralized governance framework that replaces traditional token-based voting with provably random juries for each proposal.
It demonstrates how to use Pyth Entropy VRF for transparent and verifiable randomness in smart contract governance.

How does it integrate with Pyth?

  • JuryDAO requests randomness from Pyth Entropy whenever a proposal is created.
  • The callback function entropyCallback() receives the random number.
  • It then performs a Fisher–Yates shuffle to select jurors fairly and without bias.
  • The selection is logged on-chain for transparency.

What problem does it solve or demonstrate?

It showcases a practical governance application using verifiable randomness to combat:

  • Whale dominance in DAO voting
  • Low participation and voter fatigue
  • Lack of fairness and scalability in traditional DAOs

Directory Structure

entropy/jurydao/
├── contracts/           # Smart contracts (Solidity)
├── app/                 # Frontend (React + Vite)
├── assets/              # UI images and screenshots
├── scripts/             # Deployment and helper scripts
├── .env.example         # Sample environment variables
├── README.md            # Detailed project documentation
└── LICENSE

Testing & Verification

How to Test This Contribution

Prerequisites

  • Node.js v18+
  • Foundry (forge, cast, anvil)

Setup & Run Instructions

# Clone repo
git clone https://github.com/yourusername/pyth-examples.git
cd entropy/jurydao

# Install dependencies
npm install
forge install

# Run frontend
npm run dev

To Deploy Contracts

chmod +x redeploy.sh
./redeploy.sh

Deployment Information

Network: Base Sepolia
Contract Addresses:

  • Entropy Consumer: deployed dynamically via script
  • Entropy Provider: 0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344
  • Entropy Contract: 0x41c9e39574F40Ad34c79f1C99B66A45eFB830d4c

Demo URL: http://localhost:5173 (for local runs)


Checklist

Code Quality

  • Follows existing structure and naming conventions
  • Proper error handling for randomness callbacks
  • No hardcoded keys; .env-based configuration

Testing

  • Tested locally with Foundry
  • Pyth Entropy randomness verified on Base Sepolia

Additional Context

Screenshots/Demo

Dashboard
Proposal


Notes for Reviewers

This example demonstrates a complete DAO governance model powered by Pyth Entropy randomness.
It’s a solo hackathon project built by a developer from IIT Roorkee, and aims to showcase real-world governance improvements using decentralized randomness.


Thank you for contributing to Pyth Examples!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant