Skip to content

ReferandiumProject/Referandium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

╔═══════════════════════════════════════════════════════════╗
β•‘                                                           β•‘
β•‘    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—  β•‘
β•‘    β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•— β•‘
β•‘    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β•‘
β•‘    β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•‘
β•‘    β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ•‘
β•‘    β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•     β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•
β•‘                                                           β•‘
β•‘           REFERANDIUM - Policy Prescription Markets      β•‘
β•‘                                                           β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

The World's First Policy Prescription Market on Solana

Don't predict the future. Prescribe it.

Live Demo Solana Next.js TypeScript Anchor License

🌐 Live App β€’ πŸ“– Documentation β€’ 🐦 Twitter β€’ πŸ’Š RFRM Token


🎯 What is Referandium?

Referandium is NOT a prediction market. We don't ask you to gamble on outcomes.

Instead, Referandium is a Policy Prescription Market where communities signal what SHOULD happen, not what will happen. By depositing SOL into markets, users prescribe future outcomes while earning yield on their principal.

Key Differentiator:

  • ❌ Prediction Markets: Bet on outcomes, lose if wrong
  • βœ… Prescription Markets: Signal demand, principal always returned + yield share

Your SOL is locked in escrow, earns yield, and is returned 100% when the market closesβ€”plus your share of the yield earned.


✨ Key Features

🎯 Policy Prescription Markets

Signal YES or NO on future outcomes with SOL. Markets generate yield while your SOL is locked. Get your principal back + 45% of total yield.

πŸͺ Gookie NFT Auction System

Rent market manager NFTs by bidding RFRM tokens. Winners manage markets, promote them, and earn 30% of yield in RFRM.

πŸ’° Yield-Based Rewards

SOL locked in escrow earns yield automatically. When markets close, yield is distributed:

  • 45% to signal providers (you!)
  • 30% to Gookie managers (RFRM)
  • 20% to platform
  • 5% buyback & burn RFRM

πŸ”’ On-Chain Escrow

Three Solana smart contracts handle all transactions:

  • Market escrow for signals
  • Gookie auctions for NFTs
  • Learning Hub subscriptions

πŸŽ“ Learning Hub

Lock $25/month worth of RFRM to access premium courses, trading strategies, and market analysis. Unlock anytime.

🌍 Multi-Language & Dark Mode

Full support for English πŸ‡ΊπŸ‡Έ and Turkish πŸ‡ΉπŸ‡·. Beautiful dark/light theme with responsive design.


πŸš€ Deployed Smart Contracts

All contracts live on Solana Devnet:

Contract Program ID Network
Market Escrow Aby8pc1zLWbKUPgPzgh4ntbkTsbPaZWb6FyuxSwtkR8e Devnet
Gookie Auction 3VkzfA6GU6VhMdEnYRJywLLEQ454B9gmQoNh4ycVFFS5 Devnet
Learning Subscription FUTVzQF86UckN9KhyuRajM4xRsYS62f24hTbJqGkZxed Devnet

Built with: Anchor 0.32.1, Rust 1.91.1


οΏ½ RFRM Token

Mint Address: 8248ZQSM717buZAkWFRbsLEcgetSArqbpbkX638Vpump

Utility:

  • 🎫 Gookie Bids: Lock RFRM to bid on market manager NFTs
  • πŸŽ“ Learning Hub: Lock for premium content access
  • πŸ’³ Fee Payments: Pay platform fees with discounts (future)
  • πŸ”₯ Buyback & Burn: 5% of yield used to buy & burn RFRM

Tokenomics:

  • Total Supply: 1,000,000,000 RFRM
  • Trade on: pump.fun
  • Deflationary mechanism via buyback & burn

πŸ”„ How It Works

3 Simple Steps:

1️⃣  Connect Wallet
    ↓
    Connect Phantom, Solflare, or any Solana wallet

2️⃣  Signal Your Demand
    ↓
    Deposit SOL to signal YES or NO
    Your principal is locked safely on-chain

3️⃣  Earn Yield
    ↓
    Market closes β†’ Get your SOL back + 45% of yield earned
    No risk to principal!

πŸ’Έ Fee Distribution

When markets close, yield is distributed automatically:

Recipient Share Currency Purpose
Signal Providers 45% SOL Your share of the yield
Gookie Manager 30% RFRM Market operator reward (via Jupiter swap)
Platform 20% SOL Development & operations
Buyback & Burn 5% RFRM Permanent supply reduction

Example:

  • 100 SOL locked generates 5 SOL yield
  • You deposited 10 SOL β†’ Receive 10 SOL + 0.225 SOL yield back
  • Gookie earns 1.5 SOL worth of RFRM
  • Platform takes 1 SOL
  • 0.25 SOL buys & burns RFRM

πŸ›  Tech Stack

Category Technology
Frontend Next.js 14 (App Router), React 18, TypeScript
Styling Tailwind CSS, next-themes
Blockchain Solana, Anchor 0.32.1, @solana/wallet-adapter
Smart Contracts Rust 1.91.1, Anchor Framework
Database Supabase (PostgreSQL with Row-Level Security)
Token Swaps Jupiter Aggregator
Hosting Netlify (Frontend), Solana Devnet (Contracts)
Wallets Phantom, Solflare, Backpack

πŸš€ Getting Started

Prerequisites

1. Clone the Repository

git clone https://github.com/ReferandiumProject/Referandium.git
cd Referandium-Project

2. Install Frontend Dependencies

cd frontend
npm install

3. Set Up Environment Variables

Create .env.local in frontend/:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

# Solana
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com

4. Run Development Server

npm run dev

Open http://localhost:3000

5. Build & Deploy Smart Contracts (Optional)

cd backend
anchor build
anchor deploy --provider.cluster devnet

πŸ“ Project Structure

Referandium-Project/
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ components/       # UI components
β”‚   β”‚   β”œβ”€β”€ context/          # React contexts (Language, User, Theme)
β”‚   β”‚   β”œβ”€β”€ utils/            # Contract integrations & helpers
β”‚   β”‚   β”œβ”€β”€ market/[id]/      # Market detail pages
β”‚   β”‚   β”œβ”€β”€ gookies/[id]/     # Gookie auction pages
β”‚   β”‚   β”œβ”€β”€ learning/         # Learning Hub
β”‚   β”‚   └── admin/            # Admin dashboard
β”‚   β”œβ”€β”€ pages/docs/           # MDX documentation (Nextra)
β”‚   └── public/               # Static assets
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ programs/
β”‚   β”‚   β”œβ”€β”€ referandium/      # Main program (legacy)
β”‚   β”‚   β”œβ”€β”€ gookie/           # Gookie auction contract
β”‚   β”‚   β”œβ”€β”€ market_escrow/    # Market escrow contract
β”‚   β”‚   └── subscription/     # Learning subscription contract
β”‚   └── target/idl/           # Generated IDLs
β”œβ”€β”€ database/
β”‚   └── schema/               # Supabase migrations
└── README.md

πŸ“– Documentation

Comprehensive documentation available at referandium.com/docs:


οΏ½ Links


🀝 Contributing

Contributions are welcome! We're building the future of decentralized policy markets.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Areas for contribution:

  • Frontend UX improvements
  • Smart contract optimizations
  • Documentation updates
  • Bug fixes & testing
  • New market categories

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.


οΏ½ Acknowledgments

Built on the shoulders of giants:

  • Solana - High-performance blockchain
  • Anchor - Solana smart contract framework
  • Next.js - React framework for production
  • Supabase - Open-source Firebase alternative
  • Jupiter - Solana's liquidity aggregator

The future isn't predicted. It's prescribed.

Built with πŸͺ on Solana

Star on GitHub Follow on Twitter

About

The World's First Policy Prescription Market on Solana

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors