1.1 What is Revolution Pad?
Revolution Pad is a decentralized launchpad platform built on Binance Smart Chain (BSC) that enables users to:
Create professional ERC20 tokens in 60 seconds
Launch fair presale events
Manage token vesting and locks
Run referral competitions
Automatically lock liquidity
1.2 Key Features
Create tokens with mint, burn, custom tax (up to 25%), multiple recipients
Dynamic pricing based on market demand
Liquidity locked for configurable duration
Multi-level rewards with custom influencer rates
Competition-based prize distribution
Secure vesting with automatic release
BSC Mainnet (56) and Testnet (97)
1.3 Technology Stack
2. System Architecture
2.1 Overall Architecture
Token Creation Flow
Presale Purchase Flow
3. Frontend Application
3.1 Project Structure
Homepage (/)
Landing page with:
Statistics (total raised, active presales)
Navigation to create token/sale
Create Token (/create-token)
Token creation wizard. Use the stepper below for the flow.
Tax Configuration
Tax recipients (multiple)
Launchpad List (/launchpad)
Displays all presales with filters:
Each card shows:
Launchpad Detail (/launchpad/[id])
Comprehensive presale page with tabs:
Details Tab:
Tokenomics Tab:
Token allocation breakdown
Leaderboard Tab:
Buy Section:
Claim buttons (when finalized)
Withdraw button (when available)
3.3 State Management
Local State (useState)
Server State (Wagmi Hooks)
Global State (Context)
3.4 Responsive Design
Breakpoints:
Mobile Optimizations:
Authentication (/api/auth)
POST /api/auth
Set or update user nickname.
Token Management (/api/token)
GET /api/token
Fetch tokens by owner or all tokens.
POST /api/token
Create token record after deployment.
Project Management (/api/project)
GET /api/project
Fetch project by presale address or all projects.
POST /api/project
Create project record.
PATCH /api/project
Update project info (requires signature).
Deposit Tracking (/api/deposit)
POST /api/deposit
Record deposit for leaderboard.
Withdraw Tracking (/api/withdraw)
POST /api/withdraw
Remove deposit records after withdrawal.
Leaderboard (/api/leaderboard)
GET /api/leaderboard
Fetch leaderboard data for a project.
4.2 Error Handling
URL Validation:
YouTube URLs (strict regex)
Image URLs (must start with http/https)
Social media URLs (http/https required)
Address Validation:
EVM address format (/^0x[a-fA-F0-9]{40}$/)
Signature Verification:
Recover address from signature
Compare with contract owner
5. Database Layer
5.1 Database Schema
User Table
Token Table
Project Table
Comment Table
Deposit Table
Leaderboard Table
5.2 Database Operations
Prisma Client
5.3 Relationships
6. Smart Contracts
6.1 Contract Overview
Contract
Purpose
Key Features
Mintable, burnable, custom tax, multi-recipient
Deploy tokens, set taxes, manage collateral
Sales, referrals, leaderboard, finalization
Clone presales, manage allocations
Lock tokens, release schedules
6.2 RevolutionToken
Features
Mintable:
Enables flexible supply management
Burnable:
Anyone can burn their tokens
Permanently reduces supply
Tax System:
Tax Calculation:
Trade Toggle:
Owner can enable/disable trading
6.3 TokenFactory
State Variables
Token Deployment
Process:
Validate tax rates (≤ 25%)
Validate recipient percentages (sum to 100)
Mint totalSupply to creator
Collateral System:
State Variables
Purchase Function
Validation:
Presale active (not finalized/canceled)
Process:
Finalization
Conditions:
Hardcap reached OR time ended
Softcap reached (if time ended)
Process:
6.5 LaunchpadFactory
Clone Pattern (EIP-1167)
Gas Savings:
Full deployment: ~2,500,000 gas
Clone deployment: ~250,000 gas
Allocation Locks
Process:
6.6 TokenLocker
Lock Types
Pending Lock:
Active Lock:
Claim Function
Calculation:
7. Blockchain Integration
7.1 Network Configuration
7.2 Contract Addresses
Network-aware address selection:
7.3 Read Operations
7.4 Write Operations
8. Wallet Connection
8.1 Provider Setup
8.2 Supported Wallets
8.3 Connection Flow
8.4 Network Switching
Automatic network switching:
9.1 Token Creation Flow
Navigate to /create-token
Open the token creation wizard.
Recipients: [{ wallet: "0x...", percentage: "100" }]
Review & Deploy
Estimate gas (example: ~0.01 BNB)
Wallet confirmation
Pay collateral (example: 0.00123 BNB)
Pay gas (example: ~0.01 BNB)
9.2 Presale Creation Flow
Navigate to /launchpad/create
Open the presale creation page.
Balance: e.g. 1,000,000 RVL
Presale configuration
Rate: e.g. 1000 (1 BNB = 1000 RVL)
Lock Duration: e.g. 365 days
Referral settings (optional)
Leaderboard settings (optional)
Allocation breakdown (optional)
Team: e.g. 10% (locked 6 months)
Marketing: e.g. 5% (unlocked)
Description, logo URL, media (YouTube/image)
Website, Twitter, Telegram
Token requirements calculation
Presale Tokens, Liquidity Tokens, Allocation Tokens
Total required tokens example: 17,000 RVL
Approve token spend
Approve required tokens to LaunchpadFactory (example: 17,000 RVL)
Pay creation fee (example: 0 BNB)
Gas estimate (example: ~0.5 BNB)
Presale created
Presale address displayed
Share link provided (example: rvl.network/launchpad/0x...)
9.3 Purchase Flow
Open presale page
URL: rvl.network/launchpad/[presale-address]
Verify eligibility
Whitelist: Approved (if private)
Click "Buy Tokens"
Initiates the purchase transaction.
Wallet confirmation
Pay purchase amount + gas
9.4 Claim Flow (After Finalization)
Open presale page
Status: Completed
View available claims
Referral rewards (if any)
Leaderboard prizes (if applicable)
Click "Claim Tokens"
Triggers claim transaction.
Wallet confirmation
Pay gas (example: ~0.01 BNB)
Tokens received
Tokens transferred to wallet
10. Admin Panel
Admin panel (/admin) provides platform statistics and contract management.
10.2 Dashboard Sections
Statistics View:
Contract Information:
PancakeSwap Router address
Contract Cards: Each contract displays:
Address (with copy button)
TokenFactory Card:
LaunchpadFactory Card:
TokenLocker Card:
Governance: Decentralized
10.3 Admin Features
View real-time data (auto-refresh every 3s)
Manage contracts (view details, copy addresses, open BSCScan)
11. Launchpad System
11.1 Presale Lifecycle
11.2 Status Definitions
Status
Trigger
User Actions
startTime ≤ currentTime ≤ endTime
ended && raised < softcap
11.3 Presale Types
Standard Presale
Fixed rate presale with predetermined pricing.
Formula:
Fair Launch
Dynamic pricing based on total raised.
Formula:
11.4 Finalization Process
Successful Finalization (Softcap Reached)
Calculate liquidity (BNB & tokens)
Add liquidity to PancakeSwap
Lock LP tokens in TokenLocker
Enable trading on RevolutionToken
Failed Finalization (Softcap Not Reached)
Users can refund via refund()
12. Token Factory
12.1 Token Creation Process
Step 1: User Input
Step 2: Validation
Step 3: Contract Deployment
Step 4: Database Record
12.2 Tax System
Tax Configuration
Setting Recipients
Tax Collection on Transfer
13. Referral System
13.1 System Overview
Multi-level referral system with:
Level 1: Direct referrals (default 5%)
Level 2: Indirect referrals (default 3%)
13.2 Referral Structure
13.3 Reward Calculation
Standard Referral
Custom Influencer Rate
13.4 Referral Configuration
13.5 Threshold Validation
13.6 Anti-Ghost Reward Fix
Previous Bug: Users could claim rewards that weren't actually generated.
Fix: Track actual rewards generated vs. rewards claimed.
14. Leaderboard System
Competition-based system where top referrers share a prize pool.
14.2 Prize Pool Calculation
14.3 Winner Selection
Proportional Distribution
Example Distribution
14.4 Setting Winners
14.5 Claiming Prizes
15. Security Architecture
15.1 Smart Contract Security
Access Control
Reentrancy Protection
Input Validation
Safe Math
Solidity 0.8+ has built-in overflow protection.
15.2 Frontend Security
URL Validation
Address Validation
Signature Verification
15.3 Backend Security
SQL Injection Prevention
Prisma ORM prevents SQL injection:
Rate Limiting
Consider implementing rate limiting for API endpoints.
CORS
16.1 Local Development
16.2 Production Build
16.3 Smart Contract Deployment
16.4 Environment Variables
16.5 Server Deployment
With PM2:
With Docker:
17. Mathematical Algorithms
17.1 Token Requirements
Standard Presale
Fair Launch
17.2 Progress Calculation
17.3 Referral Rewards
17.4 Leaderboard Distribution
17.5 Token Vesting
17.6 Tax Distribution
17.7 Liquidity Addition
Contract Addresses (Mainnet)
0xe646cD6f07CbBC7e275b264B9c33A2b1b5eb8091
0xE44bD842eeA5D58bb70581D757220e0834f5f82B
0x4e702C466f130127f675E83C6be0CC3970C38FDB
0x10ED43C718714eb63d5aA57B78B54704E256024E
Contract Addresses (Testnet)
0xa82ec4078AF406b8e044A3094628B96292B7D18E
0x9F387ED44F1afCaa9cE1235Fd1966b7aA4300987
0xB0a49Ea3CDB859F1bea9a7340b60C8c4a84A4f8E
0xD99D1c33F9fC3444f8101754aBC46c52416550D1
Website: https://rvl.network
BSCScan (Mainnet): https://bscscan.com
BSCScan (Testnet): https://testnet.bscscan.com
Documentation Version: 1.0.0
Last Updated: January 2026
Platform: Revolution Pad on BSC