EVM-compatible Launchpad System inspired by pump.fun featuring zero-liquidity launches and automated price discovery through an exponential bonding curve. Designed for secure, transparent, and efficient token distribution.
- Key Features
- Architecture
- Bonding Curve Mathematics
- Getting Started
- Deployment
- Testing
- Security
- Contributing
- License
- Gas-Optimized Deployment: reduction in deployment costs through minimalistic clone contracts
- Upgradeable Logic: Separate storage and logic contracts for future improvements
- Standardized Launches: Uniform contract structure across all launched tokens
- Instant Liquidity: No pre-locking required - liquidity forms as users buy
- Fair Price Discovery: Algorithmic price adjustment based on market activity
- Seamless Uniswap Transition: Migrates liquidity to Uniswap V2 at threshold
- LP Token Distribution: Fair LP allocation to token holders
- Price Continuity: Smooth transition from bonding curve to AMM
graph TD;
A[Factory Contract] -->|Deploys| B[Proxy Contract];
B -->|References| C[Logic Contract];
C -->|Interacts With| D[Bonding Curve];
D -->|Migrates LP| E[UniswapV2Router];
T: Tokens received
S: Current ETH supply (contract balance)
E: ETH amount sent
k: Curve steepness parameter
Pโ: Initial price per token
S': New ETH supply after sale
T_total: Total token supply
T_in: Tokens being sold
- Foundry (latest version)
- ETH RPC URL (for deployment)
- ETHERSCAN API KEY (for deployment)
# Clone repository
git clone https://github.com/kirilradkov14/launchpad-contracts.git
cd launchpad-contracts
# Install dependencies
forge install
# Setup environment
cp .env.example .env
Update .env with your settings:
RPC_URL="https://eth-mainnet.alchemyapi.io/v2/your-key"
PRIVATE_KEY="your_wallet_private_key"
ETHERSCAN_API_KEY="your_etherscan_key"
# Compile contracts
forge build
# Run all tests
forge test -vvv
# Run specific test suite
forge test --match-contract LaunchpadTests
./deploy.sh mainnet
./deploy.sh holesky
# Start local node
anvil
# In anvil terminal
forge script script/LaunchpadFactory.s.sol:LaunchpadDeployerScript --rpc-url http://localhost:8545 --broadcast
forge coverage --report debug
Current Coverage:
- unit tests: 60%
- fuzz tests: 25%
- Thorough Testing: Always test on testnets with equivalent conditions
- Parameter Validation: Carefully configure curve parameters (k, Pโ)
- Migration Thresholds: Set appropriate liquidity migration triggers
- Frontrunning Protection: Consider implementing commit-reveal schemes
If (by any chance) you want to contribute:
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add some amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
If you find this useful, please consider:
- Giving a โญ๏ธ on GitHub
- Contributing to development
- Following me for more trending projects
Happy launching! ๐