Skip to content

Harsh-Goel-1/Lu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Lu - Decentralized Crowdfunding on Aptos

Transparent, secure, and efficient crowdfunding powered by Aptos blockchain with built-in escrow protection.

Aptos Move Next.js License

๐Ÿ“น Demo

1. Creating campaign with AI assist and backing campaigns

lu_demo.mp4

2. Refund/Claim when campaign fail/succeed

lu_demo_adv.mp4

๐Ÿš€ Why Aptos for Crowdfunding?

Ultra-Low Gas Fees

Aptos blockchain offers significantly lower transaction costs compared to Ethereum and other chains:

  • Creating a campaign: ~$0.002 USD
  • Making a pledge: ~$0.001 USD
  • Claiming funds/Refunds: ~$0.001 USD

This means more of your money goes to the actual cause, not transaction fees!

Lightning Fast Transactions

  • Sub-second finality (~0.4s)
  • High throughput (100K+ TPS)
  • Instant confirmation for backers

Secure Move Language

Move's resource-oriented programming prevents common vulnerabilities:

  • โœ… No reentrancy attacks
  • โœ… Built-in access control
  • โœ… Formal verification support
  • โœ… Type-safe asset handling

๐ŸŽฏ How It Works

For Campaign Creators

  1. Create Campaign - Set your funding goal and deadline
  2. Share - Campaign automatically added to global registry
  3. Wait for Funding - Backers pledge to your campaign
  4. Claim Funds - If goal reached after deadline, claim all funds

For Backers

  1. Browse Campaigns - Discover campaigns via "All Active Campaigns"
  2. Pledge - Support projects with any amount of APT
  3. Protected Funds - Your pledge locked in secure escrow
  4. Automatic Refund - Get full refund if campaign fails

Smart Contract Escrow

Pledge โ†’ Escrow (Smart Contract) โ†’ Success: Creator Claims
                                  โ†’ Failed: Backers Refund

All funds are held securely on-chain. No intermediaries, no fraud risk.


โœจ Key Features

  • ๐Ÿ”’ Secure Escrow - Funds locked in smart contract until goal reached
  • ๐ŸŒ Global Registry - All campaigns discoverable on-chain
  • ๐Ÿ’ฐ Full Refunds - Automatic refunds if campaign fails
  • ๐Ÿค– AI Descriptions - AI-powered campaign description generator
  • ๐Ÿ“Š Real-time Progress - Live funding progress tracking
  • ๐ŸŽจ Modern UI - Beautiful dark-themed interface
  • ๐Ÿ”— Wallet Integration - Petra & Martian wallet support
  • โšก Instant Updates - Real-time blockchain data

๐Ÿ› ๏ธ Tech Stack

Blockchain

  • Aptos - Layer 1 blockchain
  • Move - Smart contract language
  • Aptos SDK - Blockchain interaction

Frontend

  • Next.js 14 - React framework
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • Aptos Wallet Adapter - Wallet integration

Smart Contract

  • Resource-based storage - Campaign data stored on-chain
  • Event emission - Transaction history tracking
  • View functions - Gas-free data queries

๐Ÿ“ฆ Installation & Setup

Prerequisites

  • Node.js 18+
  • Aptos CLI
  • Petra or Martian wallet

Quick Start

# Clone the repository
git clone https://github.com/Harsh-Goel-1/Lu.git
cd Lu

# Install dependencies
cd frontend
npm install

# Configure contract address
# Edit frontend/lib/constants.ts with your deployed contract address

# Run development server
npm run dev

Visit http://localhost:3000 ๐Ÿš€

Detailed setup instructions available in frontend/README.md


๐Ÿ“ Project Structure

Lu/
โ”œโ”€โ”€ move/                      # Smart Contract
โ”‚   โ”œโ”€โ”€ sources/
โ”‚   โ”‚   โ””โ”€โ”€ crowdfund.move    # Main contract with registry
โ”‚   โ”œโ”€โ”€ Move.toml             # Move configuration
โ”‚   โ””โ”€โ”€ README.md             # Contract documentation
โ”‚
โ”œโ”€โ”€ frontend/                  # Next.js Frontend
โ”‚   โ”œโ”€โ”€ app/                  # App router pages
โ”‚   โ”œโ”€โ”€ components/           # React components
โ”‚   โ”œโ”€โ”€ lib/                  # Utilities & constants
โ”‚   โ”œโ”€โ”€ hooks/                # Custom React hooks
โ”‚   โ””โ”€โ”€ README.md            # Frontend setup guide
โ”‚
โ””โ”€โ”€ README.md                 # This file

๐ŸŽฎ Usage

Creating a Campaign

  1. Connect your wallet
  2. Click "Create Campaign"
  3. Fill in details:
    • Campaign title
    • Description (or use AI Suggest)
    • Funding goal in APT
    • Duration
  4. Sign transaction
  5. Your campaign is live!

Pledging to a Campaign

  1. Browse active campaigns
  2. Click on a campaign card
  3. Enter pledge amount
  4. Confirm transaction
  5. Track your contribution

Claiming Funds (Creator)

  1. Wait for deadline to pass
  2. Ensure goal was reached
  3. Click "Claim Funds"
  4. Receive funds in your wallet

Getting Refunds (Backer)

  1. Check if campaign failed
  2. Click "Get Refund"
  3. Receive full refund automatically

๐Ÿ” Security Features

Smart Contract Security

  • โœ… Reentrancy Protection - State updates before transfers
  • โœ… Access Control - Creator-only claim functions
  • โœ… Double-Action Prevention - Can't claim/refund twice
  • โœ… Escrow Safety - Funds locked until conditions met
  • โœ… Timestamp Validation - Deadline enforcement

Tested Scenarios

  • โœ… Successful campaigns (goal reached)
  • โœ… Failed campaigns (goal not reached)
  • โœ… Multiple pledges from same backer
  • โœ… Edge cases and error handling

๐Ÿ“Š Smart Contract Functions

Entry Functions

// Create a campaign
create_campaign(goal, deadline, metadata)

// Pledge to a campaign
pledge(campaign_address, amount)

// Claim funds (creator only)
claim_funds()

// Get refund (if campaign failed)
get_refund(campaign_address)

View Functions

// Get all campaigns
get_all_campaigns() โ†’ address[]

// Get campaign details
get_campaign_info(address) โ†’ CampaignInfo

// Check campaign status
is_campaign_active(address) โ†’ bool
is_campaign_successful(address) โ†’ bool

๐ŸŒŸ Why Choose Lu?

Feature Traditional Platforms Lu (Aptos)
Platform Fees 5-10% ~0% (only gas)
Transaction Fees 2-3% <$0.01
Fund Security Platform holds funds Smart contract escrow
Transparency Limited Fully on-chain
Refund Process Manual, slow Automatic, instant
Censorship Risk Platform controlled Decentralized

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Rise In - For sponsoring the aptos track
  • Amazon Web Services - For providing free access to AWS Lambda and Bedrock and much more
    • Aptos Labs - For the amazing blockchain infrastructure
  • Move Language - For secure smart contract development
  • Community - For feedback and support

๐Ÿšง Roadmap

  • Multi-chain support
  • Milestone-based funding
  • Campaign categories and tags
  • Social features (comments, updates)
  • Mobile app (iOS/Android)
  • Analytics dashboard
  • NFT rewards for backers

Made with โค๏ธ using Aptos & Move

โญ Star us on GitHub if you find this project useful!

Report Bug ยท Request Feature ยท Documentation

About

Crowdfunding dapp for sustainable initiatives built for aptos chain

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published