GitHunt
AS

asseph/monad-launchpad-bondingcurve-smartcontract

Monad BondingCurve smart contract repository on GitHub. Full-featured crypto smart contract suite for token sales, launches, and blockchain trading automation.

Monad Launchpad - Bonding Curve Token Factory

A production-ready smart contract suite for launching tokens with automated bonding curve mechanics and Uniswap V2 liquidity migration on the Monad blockchain.

Overview

The Monad Launchpad is a decentralized token launch platform that implements a bonding curve mechanism for fair token distribution. When tokens reach their bonding curve target, liquidity is automatically migrated to Uniswap V2, enabling seamless transition to decentralized exchange trading.

Key Features

  • Automated Token Launch: Deploy ERC20-compatible tokens with a single transaction
  • Bonding Curve Mechanics: Fair price discovery through constant product formula (x * y = k)
  • Automatic Liquidity Migration: Seamless transition to Uniswap V2 at bonding curve completion
  • Built-in Fee System: Configurable trading fees with admin fee collection
  • Reentrancy Protection: OpenZeppelin ReentrancyGuard implementation for secure transactions
  • Upgradeable Architecture: Owner-controlled parameter adjustments without redeployment

Smart Contract Architecture

PumpCloneFactory

The main factory contract that manages token launches and trading operations.

Core Functions:

  • launchToken(string name, string symbol) - Deploy a new token with initial bonding curve
  • buyToken(address token) - Purchase tokens through the bonding curve
  • sellToken(address token, uint256 amount) - Sell tokens back to the bonding curve
  • claimFee(address to) - Owner-only fee withdrawal

Bonding Curve Parameters:

  • Virtual ETH Reserve: 0.015 ETH
  • Virtual Token Reserve: 1,073,000,000 tokens
  • Real Token Reserve: 793,100,000 tokens
  • Trading Fee: 1% (100 BPS)
  • Liquidity Migration Fee: 0.018 ETH

PumpToken

Lightweight ERC20 implementation optimized for gas efficiency.

Features:

  • Standard ERC20 interface (transfer, approve, transferFrom)
  • Factory-controlled minting for bonding curve operations
  • 18 decimal precision
  • Minimal gas overhead

Technical Stack

  • Solidity: ^0.8.28
  • Framework: Hardhat ^2.22.19
  • Dependencies:
    • OpenZeppelin Contracts ^5.3.0
    • Ethers.js ^6.13.5
  • DEX Integration: Uniswap V2 Router
  • Testing: Hardhat Toolbox with TypeScript

Installation

Prerequisites

  • Node.js >= 16.0.0
  • npm or yarn package manager
  • Git

Setup

# Clone the repository
git clone https://github.com/yourusername/monad-launchpad-bondingcurve-smartcontract.git
cd monad-launchpad-bondingcurve-smartcontract

# Install dependencies
npm install

# Create environment configuration
cp .env.example .env
# Edit .env with your private keys and RPC URLs

Configuration

Create a .env file in the root directory:

PRIVATE_KEY=your_private_key_here
MONAD_RPC_URL=your_monad_rpc_url
ETHERSCAN_API_KEY=your_etherscan_api_key (optional)

Usage

Compile Contracts

npx hardhat compile

Run Tests

npx hardhat test

Deploy to Monad Network

npx hardhat run scripts/deployPump.ts --network monad

Verify Contract

npx hardhat verify --network monad DEPLOYED_CONTRACT_ADDRESS

Hardhat Development Commands

# Display available commands
npx hardhat help

# Run tests with gas reporting
REPORT_GAS=true npx hardhat test

# Start local Hardhat node
npx hardhat node

# Deploy using Hardhat Ignition
npx hardhat ignition deploy ./ignition/modules/Lock.ts

Contract Interaction Examples

Launch a New Token

const factory = await ethers.getContractAt("PumpCloneFactory", FACTORY_ADDRESS);
const tx = await factory.launchToken("MyToken", "MTK", { value: ethers.parseEther("0.1") });
await tx.wait();

Buy Tokens

const tx = await factory.buyToken(TOKEN_ADDRESS, { value: ethers.parseEther("0.05") });
await tx.wait();

Sell Tokens

const token = await ethers.getContractAt("PumpToken", TOKEN_ADDRESS);
await token.approve(FACTORY_ADDRESS, amount);
const tx = await factory.sellToken(TOKEN_ADDRESS, amount);
await tx.wait();

Security Considerations

  • ✅ Reentrancy protection via OpenZeppelin's ReentrancyGuard
  • ✅ Ownable pattern for admin functions
  • ✅ Safe math operations (Solidity ^0.8.0 built-in overflow protection)
  • ✅ Input validation on all public functions
  • ⚠️ Recommended: External security audit before mainnet deployment

Bonding Curve Mathematics

The platform uses a constant product bonding curve formula:

x * y = k (constant product)

Where:

  • x = ETH reserve
  • y = Token reserve
  • k = Constant product

Price increases as more tokens are purchased, following the curve until the real token reserve is depleted, triggering Uniswap migration.

Gas Optimization

  • Minimal storage operations
  • Efficient loop-free implementations
  • Optimized ERC20 token implementation
  • Batch operations where possible

Roadmap

  • Multi-chain deployment support
  • Advanced bonding curve models
  • Token metadata extension (IPFS integration)
  • Web3 frontend interface
  • Analytics dashboard

Contributing

Contributions are welcome! Please follow these guidelines:

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

License

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

Support

For questions and support:

Acknowledgments

  • OpenZeppelin for secure smart contract libraries
  • Uniswap for DEX integration
  • Hardhat team for the development framework
  • Monad blockchain community

Keywords: Monad blockchain, token launchpad, bonding curve, smart contract, DeFi, Uniswap integration, ERC20, token factory, automated market maker, liquidity migration, Solidity development, Hardhat