Skip to content

ffffffffhugfadil/litducks

Repository files navigation

πŸ¦† LitDucks || Whitelist Management Platform for LitVM LiteForge

LitDucks LiteForge Chain ID License

The first native on-chain whitelist management platform on LitVM LiteForge.

Live App Β· Docs Β· Explorer Β· Twitter


πŸ“‹ Table of Contents

  1. Overview
  2. Problem Statement
  3. Solution
  4. Features
  5. Architecture
  6. Smart Contracts
  7. Technology Stack
  8. Installation
  9. Environment Variables
  10. Usage Guide
  11. Deployment
  12. Live Demo
  13. Repository Structure
  14. Contributing
  15. License

🌐 Overview

LitDucks is the first native whitelist management platform deployed on the LitVM LiteForge testnet (Chain ID: 4441).

The platform allows project creators to launch whitelist campaigns with customizable on-chain verification requirements, while users can register their wallets through a simple interface that automatically checks eligibility based on predefined criteria.

Built for the LiteForge Hackathon 2026 β€” Open Track.

"No more Google Forms. No more manual spreadsheets. Pure on-chain whitelist management." πŸ¦†


❌ Problem Statement

NFT projects and token sales on the LitVM testnet currently lack native tools to manage whitelists:

  • No wallet verification β€” Google Forms accept anyone without proof of wallet ownership
  • Sybil attacks β€” No way to prevent bots from filling up whitelist spots
  • Manual management β€” Spreadsheet-based systems are error-prone and time-consuming
  • No native tooling β€” Existing platforms (Premint, Atlas3) don't support LitVM natively
  • Fragmented workflow β€” Creators must juggle multiple tools to run a simple WL campaign

βœ… Solution

LitDucks provides a decentralized, on-chain whitelist management system where:

  • Project creators launch campaigns with configurable on-chain requirements
  • Users register directly with their connected wallets
  • All registrations are stored on-chain for full transparency
  • Verification happens automatically through smart contracts and blockchain data
  • Winners are selected on-chain via FCFS or provably fair Raffle

✨ Features

For Project Creators 🎨

Feature Description
Campaign Creation Name, description, banner image, social links
Slot Management Up to 100 slots free, unlimited with Pro tier
Selection Modes FCFS (First-Come-First-Served) or Raffle
Requirements Minimum tx count, wallet age, token/NFT holding
Dashboard Real-time registration monitoring
CSV Export Download all registered wallets as CSV
Merkle Root Generate Merkle root for gas-efficient minting

For Users πŸ‘€

Feature Description
Browse Campaigns Explore all active WL campaigns
Filter & Search Filter by status, mode, and project name
Auto Verification System checks wallet eligibility automatically
One-Click Register Register via connected wallet
Profile Page Track all whitelist registrations
Winner Status Check raffle results on-chain

Platform Features ⚑

Feature Description
On-Chain Verification All checks via blockchain data, no off-chain API
Anti-Sybil Combine multiple requirements for max protection
IPFS Support Decentralized banner image storage
Responsive Design Works on desktop and mobile
LiteForge Native Built specifically for Chain ID 4441

πŸ—οΈ Architecture

Smart Contract Pattern β€” Factory + Campaign

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        LitDucksFactory.sol                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  createCampaign() β†’ deploys new LitDucksCampaign         β”‚   β”‚
β”‚  β”‚  getAllCampaigns() β†’ registry of all campaigns           β”‚   β”‚
β”‚  β”‚  getCreatorCampaigns(address) β†’ per-creator index        β”‚   β”‚
β”‚  β”‚  getFeaturedCampaigns() β†’ featured list                  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚ deploys
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      LitDucksCampaign.sol (per campaign)        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  register() β†’ on-chain registration                      β”‚   β”‚
β”‚  β”‚  getRegistrants() β†’ all registered wallets               β”‚   β”‚
β”‚  β”‚  runRaffle(bytes32) β†’ random winner selection            β”‚   β”‚
β”‚  β”‚  setMerkleRoot(bytes32) β†’ set winner merkle root         β”‚   β”‚
β”‚  β”‚  getParams() β†’ campaign configuration                    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

Creator                  LitDucks Frontend             LiteForge Blockchain
     β•‘                             β”‚                               β”‚
     ╠═══ Fill campaign form ═════>β”‚                               β”‚
     β•‘                             ╠═══ deploy via Factory ═══════>β”‚
     β•‘                             <─── campaign address ──────────╒
     <─── campaign live! ══════════╣                               β”‚
     β•‘                             β”‚                               β”‚
═════════════════════════════════════════════════════════════════════════════
     β•‘                             β”‚                               β”‚
  User                             β”‚                               β”‚
     β•‘                             β”‚                               β”‚
     ╠═══ browse explore ═════════>β”‚                               β”‚
     β•‘                             ╠═══ read campaigns ═══════════>β”‚
     β•‘                             <─── on-chain data ─────────────╒
     <─── campaign list ═══════════╣                               β”‚
     ╠═══ click register ═════════>β”‚                               β”‚
     β•‘                             ╠═══ check requirements ═══════>β”‚
     β•‘                             <─── eligible ──────────────────╒
     ╠═══ confirm tx ═════════════>β”‚                               β”‚
     β•‘                             ╠═══ register() ═══════════════>β”‚
     β•‘                             <─── tx confirmed ──────────────╒
     <─── registered! ═════════════╣                               β”‚

Requirement Verification Flow

User connects wallet
        β”‚
        β–Ό
Check: wallet has min X transactions? ──── No ──▢ Show requirement not met
        β”‚ Yes
        β–Ό
Check: wallet age β‰₯ X days? ──────────────── No ──▢ Show requirement not met
        β”‚ Yes
        β–Ό
Check: holds required token/NFT? ─────────── No ──▢ Show requirement not met
(if set)β”‚ Yes / not required
        β–Ό
Show "Register for Whitelist" button βœ…

πŸ“œ Smart Contracts

LitDucksFactory.sol

Address: 0xdDC8255958463A7BF7dC19657800201a1f8a00B6

Network: LitVM LiteForge Testnet (Chain ID: 4441)

Explorer: View on LiteForge Explorer

Key Functions:

// Deploy a new campaign
function createCampaign(
    string memory _name,
    string memory _description,
    string memory _bannerImage,
    string memory _twitter,
    string memory _discord,
    string memory _website,
    uint256 _totalSlots,
    uint256 _deadline,
    uint8   _selectionMode,   // 0 = FCFS, 1 = Raffle
    uint256 _minTransactions,
    uint256 _minWalletAgeDays,
    address _requiredToken,
    uint8   _tokenType,       // 0 = none, 1 = ERC721, 2 = ERC20
    uint256 _minTokenBalance,
    uint256 _tokenId,
    bool    _isPro,
    bool    _isFeatured
) external payable returns (address campaignAddress)

// View all campaigns
function getAllCampaigns() external view returns (address[] memory)
function getCreatorCampaigns(address creator) external view returns (address[] memory)
function getCampaignsCount() external view returns (uint256)

LitDucksCampaign.sol

Per-campaign contract deployed by the factory.

Key Functions:

// Register wallet to whitelist
function register() external

// Run raffle (creator only, after deadline)
function runRaffle() external onlyCreator

// View functions
function getParams() external view returns (...)
function getRegistrants() external view returns (address[] memory)
function getWinners() external view returns (address[] memory)
function isRegistered(address user) external view returns (bool)
function isWinner(address user) external view returns (bool)
function isActive() external view returns (bool)
function slotsRemaining() external view returns (uint256)
function registrantCount() external view returns (uint256)

CampaignInfo Struct:

struct CampaignInfo {
    string name;
    string description;
    string bannerImage;       // IPFS CID or URL
    string twitter;
    string discord;
    string website;
    uint256 totalSlots;
    uint256 deadline;         // Unix timestamp
    uint8 selectionMode;      // 0 = FCFS, 1 = Raffle
    uint256 minTransactions;  // min tx count on LiteForge
    uint256 minWalletAgeDays; // min wallet age in days
    address requiredToken;    // 0x0 = none
    uint8 tokenType;          // 0=none, 1=ERC721, 2=ERC20
    uint256 minTokenBalance;
    uint256 tokenId;
    bool isPro;
    bool isFeatured;
    address creatorAddress;
    uint256 createdAt;
}

πŸ› οΈ Technology Stack

Layer Technology Version
Frontend React 18.3.1
Language TypeScript 5.6.3
Build Tool Vite 5.4.10
Styling TailwindCSS 3.4.14
Web3 Library Wagmi + Viem 2.12.7 + 2.21.0
State Management Zustand 4.5.5
Routing React Router DOM 6.26.2
Animations Framer Motion 11.12.0
Icons Lucide React 0.460.0
Date Utils date-fns 3.6.0
Smart Contracts Solidity 0.8.20
Blockchain LitVM LiteForge Chain ID: 4441
Deployment Vercel β€”

πŸš€ Installation

Prerequisites

  • Node.js v18 or v20 (not v24 β€” incompatible with Vite 5)
  • npm package manager
  • MetaMask or any EVM-compatible wallet
  • zkLTC from faucet for gas

Clone & Install

# Clone repository
git clone https://github.com/ffffffffhugfadil/litducks.git
cd litducks

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:5173 in your browser.

Build for Production

npm run build
npm run preview

Add LiteForge Network to MetaMask

Field Value
Network Name LitVM LiteForge
RPC URL https://liteforge.rpc.caldera.xyz/http
Chain ID 4441
Currency Symbol zkLTC
Block Explorer https://liteforge.explorer.caldera.xyz

πŸ” Environment Variables

Create a .env file in the root directory:

# LiteForge Testnet (Chain ID: 4441)
VITE_FACTORY_ADDRESS=0xdDC8255958463A7BF7dC19657800201a1f8a00B6
VITE_RPC_URL=https://liteforge.rpc.caldera.xyz/http

# Optional: Pinata IPFS for banner image uploads
VITE_PINATA_JWT=your_pinata_jwt_token_here
Variable Description Required
VITE_FACTORY_ADDRESS Deployed factory contract address βœ…
VITE_RPC_URL LiteForge RPC endpoint βœ…
VITE_PINATA_JWT Pinata JWT for IPFS uploads Optional

πŸ“– Usage Guide

For Project Creators

Step 1 β€” Connect Wallet

Connect MetaMask β†’ Switch to LiteForge (Chain ID: 4441) β†’ Get zkLTC from faucet

Step 2 β€” Create Campaign

/create β†’ Fill info β†’ Set requirements β†’ Deploy

Campaign Configuration:

Name           : Your project name
Description    : What users need to know
Banner Image   : IPFS CID or HTTP URL (optional)
Total Slots    : ≀100 = Free Tier | >100 = Pro Tier
Deadline       : Unix timestamp (future date)
Selection Mode : 0 = FCFS | 1 = Raffle
Min Tx Count   : Minimum transactions on LiteForge
Min Wallet Age : Minimum wallet age in days
Required Token : Token/NFT contract address (optional)

Step 3 β€” Share & Monitor

Share campaign link β†’ Monitor via /dashboard β†’ Export CSV/Merkle root

For Users

Step 1 β€” Browse β†’ /explore

Step 2 β€” Connect Wallet β†’ MetaMask on LiteForge testnet

Step 3 β€” Check Requirements β†’ System auto-verifies your wallet

Step 4 β€” Register β†’ Click register β†’ Confirm transaction

Step 5 β€” Track β†’ View registrations at /profile


🌐 Deployment

Deploy to Vercel

# 1. Push to GitHub
git add .
git commit -m "ready for deployment"
git push origin main

# 2. Connect to Vercel at vercel.com/new
# 3. Add environment variables
# 4. Deploy

Vercel Environment Variables:

Key Value
VITE_FACTORY_ADDRESS 0xdDC8255958463A7BF7dC19657800201a1f8a00B6
VITE_RPC_URL https://liteforge.rpc.caldera.xyz/http

vercel.json (already included):

{
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "framework": "vite",
  "installCommand": "npm install"
}

.nvmrc (already included):

20.17.0

πŸ”— Live Demo

Link URL
Live App https://litducks.xyz
Documentation https://litducks.xyz/docs
Explore Campaigns https://litducks.xyz/explore
Create Campaign https://litducks.xyz/create
Factory Contract https://liteforge.explorer.caldera.xyz/address/0xdDC8255958463A7BF7dC19657800201a1f8a00B6
GitHub https://github.com/ffffffffhugfadil/litducks
Twitter https://x.com/litducksnft

πŸ“ Repository Structure

litducks/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ duck-icon.svg           # App favicon/logo
β”‚   └── favicon.svg             # Website favicon
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ campaigns/
β”‚   β”‚   β”‚   β”œβ”€β”€ CampaignCard.tsx
β”‚   β”‚   β”‚   └── SkeletonCard.tsx # Loading state skeleton for campaigns
β”‚   β”‚   β”œβ”€β”€ create/
β”‚   β”‚   β”‚   β”œβ”€β”€ Step1.tsx       # Basic campaign info form
β”‚   β”‚   β”‚   β”œβ”€β”€ Step2.tsx       # WL slots & deadline settings
β”‚   β”‚   β”‚   β”œβ”€β”€ Step3.tsx       # Requirements configuration
β”‚   β”‚   β”‚   └── Step4.tsx       # Campaign review & deployment
β”‚   β”‚   β”œβ”€β”€ layout/
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.tsx      # Top navigation bar
β”‚   β”‚   β”‚   └── Footer.tsx      # Footer with links
β”‚   β”‚   β”œβ”€β”€ ui/
β”‚   β”‚   β”‚   └── FactoryAddressInput.tsx
β”‚   β”‚   └── wallet/
β”‚   β”‚       β”œβ”€β”€ ConnectButton.tsx # Wallet connection button
β”‚   β”‚       β”œβ”€β”€ NetworkBadge.tsx  # Network status indicator
β”‚   β”‚       └── NetworkGuard.tsx  # Network validation wrapper
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── contracts.ts        # Contract addresses & ABIs
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ useCampaign.ts      # Campaign data & operations
β”‚   β”‚   β”œβ”€β”€ useCreatorCampaigns.ts # Creator-specific campaigns data
β”‚   β”‚   β”œβ”€β”€ useFactory.ts       # Factory contract interactions
β”‚   β”‚   β”œβ”€β”€ useNetworkGuard.ts  # Network validation hook
β”‚   β”‚   └── useRequirements.ts  # Requirement verification logic
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ blockscout.ts       # Blockscout explorer integrations
β”‚   β”‚   β”œβ”€β”€ chain.ts            # Chain configuration
β”‚   β”‚   β”œβ”€β”€ merkle.ts           # Merkle Tree generation for whitelists
β”‚   β”‚   └── wagmi.ts            # Wagmi client setup
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ Home.tsx            # Landing page
β”‚   β”‚   β”œβ”€β”€ Create.tsx          # Campaign creation wizard
β”‚   β”‚   β”œβ”€β”€ Explore.tsx         # Browse all campaigns
β”‚   β”‚   β”œβ”€β”€ Campaign.tsx        # Single campaign detail
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx       # Creator management panel
β”‚   β”‚   β”œβ”€β”€ Analytics.tsx       # Campaign performance analytics data
β”‚   β”‚   β”œβ”€β”€ Profile.tsx         # User whitelist history
β”‚   β”‚   └── docs/
β”‚   β”‚       └── Overview.tsx    # Documentation Overview & Guide
β”‚   β”œβ”€β”€ store/
β”‚   β”‚   β”œβ”€β”€ useCampaignStore.ts # Zustand store for campaign state
β”‚   β”‚   └── useWalletStore.ts   # Zustand store for wallet state
β”‚   β”œβ”€β”€ types/
β”‚   β”‚   └── index.ts            # TypeScript type definitions
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── ipfs.ts             # IPFS gateway helper
β”‚   β”œβ”€β”€ App.tsx                 # Main app component
β”‚   β”œβ”€β”€ main.tsx                # Entry point
β”‚   β”œβ”€β”€ router.tsx              # React Router configuration
β”‚   └── index.css               # Global styles (Tailwind)
β”œβ”€β”€ contracts/
β”‚   β”œβ”€β”€ LitDucksFactory.sol     # Factory contract
β”‚   └── LitDucksCampaign.sol    # Individual campaign contract
β”œβ”€β”€ dist/                       # Production build output (Generated)
β”œβ”€β”€ node_modules/               # Installed npm packages (Ignored)
β”œβ”€β”€ vercel.json                 # Vercel deployment config
β”œβ”€β”€ package.json                # Dependencies & scripts
β”œβ”€β”€ package-lock.json           # Locked dependencies
β”œβ”€β”€ tsconfig.json               # TypeScript configuration
β”œβ”€β”€ tsconfig.node.json          # TypeScript Node config
β”œβ”€β”€ vite.config.ts              # Vite build configuration
β”œβ”€β”€ tailwind.config.js          # Tailwind CSS configuration
β”œβ”€β”€ postcss.config.js           # PostCSS configuration
β”œβ”€β”€ index.html                  # HTML entry point
└── README.md                   # Project documentation

πŸ† Hackathon Submission

Field Value
Event LiteForge Hackathon 2026
Track Open Track
Team @litducksnft
Live App https://litducks.xyz
GitHub https://github.com/ffffffffhugfadil/litducks

Why LitDucks fits "Hard Money Web3 alignment":

  • Built natively on LitVM LiteForge testnet
  • Serves the ecosystem β€” every LitVM project needs WL management
  • No centralized database β€” all data lives on-chain
  • Contributes real utility to the Litecoin ecosystem
  • First of its kind on LitVM β€” no competing solution exists

🀝 Contributing

This project was built for the LiteForge Hackathon.

For questions, feedback, or bug reports:


πŸ“„ License

MIT License β€” see LICENSE for details.


πŸ™ Acknowledgments

  • LiteForge Hackathon organizers and judges
  • LitVM team for building the testnet infrastructure
  • @circle_crypto (LitecoinVM Co-founder) for guidance
  • @LitecoinVM for supporting builders in the ecosystem
  • Dappit for AI-powered no-code development tools
  • Caldera for RPC and explorer infrastructure

Built with πŸ¦† for the LiteForge Hackathon 2026

LitVM LiteForge Testnet | Chain ID: 4441 | zkLTC

litducks.xyz Β· @litducksnft

About

Whitelist management platform for LitVM LiteForge

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors