Skip to content

Latest commit

Β 

History

60 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hodl.fun - Universal Token Launchpad

A truly universal token launchpad platform built on Push Chain, featuring token creation, marketplace listing, and bonding curve mechanics for liquidity provision. Launch, trade, and manage ERC20 tokens with enterprise-grade security and automated price discovery from any supported chain.

Version License Solidity Next.js

🚨 Problem Statement

Current Challenges in Token Launches

🧩 Fragmented Liquidity

  • Token launches are isolated to single blockchains
  • Liquidity is split across multiple networks
  • Users can't participate if they don't have assets on the specific chain

πŸ”— Cross-Chain Friction

  • Users must bridge assets between chains (expensive & time-consuming)
  • Network switching creates poor UX
  • High barriers to entry for new users
  • Gas fees on multiple chains

πŸšͺ Limited Accessibility

  • Users locked out if they only hold assets on different chains
  • Complex setup required (wallets, bridges, gas tokens)
  • Fragmented user base across ecosystems

πŸ’Έ Inefficient Capital

  • Liquidity trapped on single chains
  • Arbitrage opportunities but high friction
  • Suboptimal price discovery

πŸ’‘ Solution: Hodl.fun

Hodl.fun is a universal token launchpad that enables users to launch and trade tokens using any asset from any chain β€” without bridging or network switching.


βš™οΈ How It Works

🌐 Universal Asset Support

  • Launch tokens and accept payments in ETH, SOL, or any supported asset
  • Users trade with whatever assets they already hold
  • No need to bridge or acquire specific chain tokens

πŸ“ˆ Automated Bonding Curve

  • Fair launch mechanism with automated market making
  • Price discovery through bonding curve mathematics
  • Liquidity bootstrapping without upfront capital

πŸ”€ Cross-Chain Abstraction

  • Built on Push Chain's universal account system
  • Single wallet works across all chains
  • Seamless multi-chain experience

⚑ Instant Settlement

  • No waiting for bridge confirmations
  • Real-time trading execution
  • Native cross-chain liquidity

πŸ”‘ Key Features

πŸ§‘β€πŸ’» For Token Creators

🎯 One-Click Token Launch

  • Deploy ERC20 tokens with metadata (name, symbol, logo, description)
  • Automatic marketplace listing
  • Built-in bonding curve liquidity

βš–οΈ Fair Launch Mechanism

  • No pre-mine or insider allocation
  • Bonding curve ensures fair price discovery
  • Configurable reserve ratio (10–90%)

πŸ’§ Automated Liquidity

  • Bonding curve provides instant liquidity
  • No need for initial liquidity provision
  • Automatic graduation to full trading at 100 ETH market cap

🧾 Rich Token Metadata

  • IPFS-stored metadata (logo, description, social links)
  • Professional token pages
  • Social integration (Twitter, Telegram, Website)

πŸ’Ή For Traders

🌍 Universal Trading

  • Trade with any asset (ETH, SOL)
  • No bridging required
  • Single wallet for all chains

πŸ“Š Real-Time Price Discovery

  • Bonding curve pricing
  • Live market data
  • Price charts and analytics (coming soon)

πŸ’Ό Portfolio Management

  • Track all your token holdings
  • View profit/loss
  • Transaction history (coming soon)

πŸͺ Platform Features

🧭 Token Marketplace

  • Browse all launched tokens
  • Filter by market cap, holders, age
  • Search by name/symbol
  • Real-time updates

⚑ Instant Trading

  • Buy/sell tokens directly
  • Slippage protection
  • Gas-optimized transactions

πŸ“ˆ Analytics Dashboard

  • Price charts with OHLC candles (In Development)
  • Trading volume metrics
  • Total portfolio value
  • Asset details

πŸ“ Project Structure

hodl.fun/
β”œβ”€β”€ frontend/              # Next.js 15 frontend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/          # Next.js app router pages
β”‚   β”‚   β”œβ”€β”€ components/   # React components
β”‚   β”‚   β”œβ”€β”€ hooks/        # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ lib/          # Utility libraries
β”‚   β”‚   β”œβ”€β”€ config/       # Contract ABIs and addresses
β”‚   β”‚   └── contexts/     # React context providers
β”‚   └── package.json
β”‚
└── smart-contract/       # Foundry smart contracts
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ LaunchpadToken.sol      # ERC20 token implementation
    β”‚   β”œβ”€β”€ TokenMarketplace.sol    # Bonding curve marketplace
    β”‚   β”œβ”€β”€ TokenFactory.sol        # Token creation factory
    β”‚   β”œβ”€β”€ interfaces/             # Contract interfaces
    β”‚   └── utils/                  # Utility libraries
    β”œβ”€β”€ test/                       # Comprehensive test suite
    β”œβ”€β”€ script/                     # Deployment scripts
    └── foundry.toml

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm/yarn/pnpm
  • Foundry for smart contract development
  • Git for version control

Installation

  1. Clone the repository
git clone https://github.com/yourusername/Hodl.fun.git
cd hodl.fun
  1. Install frontend dependencies
cd frontend
npm install
  1. Install smart contract dependencies
cd ../smart-contract
forge install

Running Locally

Frontend Development Server

cd frontend
npm run dev

Open http://localhost:3000 to view the application.

Smart Contract Development

cd smart-contract

# Compile contracts
forge build

# Run tests
forge test

# Run tests with verbosity
forge test -vvv

πŸ”§ Configuration

Frontend Environment Variables

Create a .env file in the frontend directory:

# Push Chain RPC URLs
NEXT_PUBLIC_RPC_URL=https://evm.rpc-testnet-donut-node1.push.org/
NEXT_PUBLIC_RPC_URL_ALT=https://evm.rpc-testnet-donut-node2.push.org/

# Contract Addresses (update after deployment)
NEXT_PUBLIC_FACTORY_ADDRESS=0x...
NEXT_PUBLIC_MARKETPLACE_ADDRESS=0x...

# Chain Configuration
NEXT_PUBLIC_CHAIN_ID=42101
NEXT_PUBLIC_CHAIN_NAME=Push Chain Testnet

Smart Contract Environment Variables

Create a .env file in the smart-contract directory:

# Deployment Configuration
PRIVATE_KEY=your_private_key_here
FEE_COLLECTOR=0x_your_fee_collector_address

# RPC URLs
RPC_URL=https://evm.rpc-testnet-donut-node1.push.org/

# BlockScout API (for verification)
ETHERSCAN_API_KEY=blockscout

πŸ“Š Smart Contract Architecture

Core Contracts

Contract Description Size Gas Cost
TokenFactory Creates and deploys new tokens ~12KB 2.8M
TokenMarketplace Handles bonding curve trading ~20KB 3.5M
LaunchpadToken ERC20 token with enhanced features ~15KB 2.7M

Contract Flow

User Request
    ↓
TokenFactory.createToken()
    ↓
Deploy LaunchpadToken
    ↓
Auto-list on TokenMarketplace
    ↓
Bonding Curve Trading
    ↓
Liquidity Threshold (100 ETH)
    ↓
Full Trading Enabled

🎨 Frontend Stack

Technologies

  • Framework: Next.js 15.5.4 with App Router
  • Language: TypeScript 5
  • Styling: TailwindCSS 4
  • UI Components: Radix UI + shadcn/ui
  • Web3: ethers.js 6.15.0
  • Wallet: @pushchain/core & @pushchain/ui-kit
  • Icons: Lucide React
  • Retro UI: pixel-retroui

Test Coverage: 11/11 tests passing (100%)

Test Categories

  • βœ… Token creation and validation
  • βœ… Marketplace trading mechanics
  • βœ… Bonding curve calculations
  • βœ… Access control enforcement
  • βœ… Fee collection and distribution
  • βœ… Edge cases and error handling

πŸ“„ License

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

About

An universal token launchpad platform built on Push Chain.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages