DOCUMENTATION

1. Platform Overview

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

Feature
Description

Token Factory

Create tokens with mint, burn, custom tax (up to 25%), multiple recipients

Fair Launch

Dynamic pricing based on market demand

Standard Presale

Fixed rate token sales

Automated Liquidity

Liquidity locked for configurable duration

Referral System

Multi-level rewards with custom influencer rates

Leaderboard

Competition-based prize distribution

Token Locker

Secure vesting with automatic release

Multi-Network

BSC Mainnet (56) and Testnet (97)

1.3 Technology Stack


2. System Architecture

2.1 Overall Architecture

2.2 Data Flow

Token Creation Flow

Presale Purchase Flow


3. Frontend Application

3.1 Project Structure

3.2 Key Pages

Homepage (/)

Landing page with:

  • Platform introduction

  • Live presales list

  • Statistics (total raised, active presales)

  • Navigation to create token/sale

Create Token (/create-token)

Token creation wizard. Use the stepper below for the flow.

1

Basic Info

  • Token name

  • Symbol

  • Total supply

  • Decimals

2

Tax Configuration

  • Buy tax (0-25%)

  • Sell tax (0-25%)

  • Tax recipients (multiple)

3

Features

  • Mintable (yes/no)

  • Burnable (yes/no)

  • Ownable (yes/no)

  • Trade enabled (yes/no)

4

Review & Deploy

  • Show all parameters

  • Gas estimate

  • Deploy button

Launchpad List (/launchpad)

Displays all presales with filters:

  • All

  • Live

  • Upcoming

  • Ended

Each card shows:

  • Project logo

  • Token name/symbol

  • Status badge

  • Start/end time

  • Progress bar

  • Raised/Hardcap

Launchpad Detail (/launchpad/[id])

Comprehensive presale page with tabs:

Details Tab:

  • Project description

  • Video/image media

  • Token info

  • Social links

Tokenomics Tab:

  • Token allocation breakdown

  • Lock durations

Leaderboard Tab:

  • Top referrers

  • Prize pool

  • User ranking

  • Claim prizes

Buy Section:

  • BNB input

  • Buy button (when active)

  • Claim buttons (when finalized)

  • Withdraw button (when available)

3.3 State Management

Local State (useState)

  • Form inputs

  • Modal visibility

  • Active tab

  • Error messages

Server State (Wagmi Hooks)

Global State (Context)

  • Theme (dark/light)

  • User authentication

  • Network switching

3.4 Responsive Design

Breakpoints:

  • Mobile: < 768px

  • Tablet: 768px - 1024px

  • Desktop: > 1024px

Mobile Optimizations:

  • Stacked layouts

  • Touch-friendly buttons

  • Simplified navigation

  • Optimized gas estimates


4. Backend API

4.1 API Routes

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

4.3 Validation

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}$/)

  • Contract existence check

Signature Verification:

  • Recover address from signature

  • Compare with contract owner

  • Authorize update


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

RevolutionToken

Token template

Mintable, burnable, custom tax, multi-recipient

TokenFactory

Token creation

Deploy tokens, set taxes, manage collateral

Presale

Presale template

Sales, referrals, leaderboard, finalization

LaunchpadFactory

Presale creation

Clone presales, manage allocations

TokenLocker

Token vesting

Lock tokens, release schedules

6.2 RevolutionToken

Features

Mintable:

  • Only owner can mint

  • Enables flexible supply management

Burnable:

  • Anyone can burn their tokens

  • Permanently reduces supply

Tax System:

Tax Calculation:

Trade Toggle:

  • Owner can enable/disable trading

  • Prevents early trading

6.3 TokenFactory

State Variables

Token Deployment

Process:

  1. Validate tax rates (≤ 25%)

  2. Validate recipient percentages (sum to 100)

  3. Deploy RevolutionToken

  4. Mint totalSupply to creator

  5. Set tax recipients

  6. Record payment

Collateral System:

6.4 Presale

State Variables

Purchase Function

Validation:

  • Presale active (not finalized/canceled)

  • Within time range

  • Above minBuy

  • Below maxBuy

  • Whitelisted (if private)

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

  • Savings: ~90%

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

  • MetaMask

  • Trust Wallet

  • Coinbase Wallet

  • WalletConnect

  • Ledger

  • Rabby

  • OKX Wallet

  • Rainbow

8.3 Connection Flow

8.4 Network Switching

Automatic network switching:


9. User Flows

9.1 Token Creation Flow

1

Open the token creation wizard.

2

Enter token details

  • Name: e.g. "Revolution"

  • Symbol: e.g. "RVL"

  • Supply: e.g. "1000000"

  • Decimals: e.g. "18"

3

Configure taxes (optional)

  • Buy Tax: e.g. 5%

  • Sell Tax: e.g. 5%

  • Recipients: [{ wallet: "0x...", percentage: "100" }]

4

Select features

  • Mintable: yes/no

  • Burnable: yes/no

  • Ownable: yes/no

  • Trade Enabled: yes/no

5

Review & Deploy

  • Show summary

  • Estimate gas (example: ~0.01 BNB)

  • Click "Create Token"

6

Wallet confirmation

  • Pay collateral (example: 0.00123 BNB)

  • Pay gas (example: ~0.01 BNB)

7

Token created

  • Token address displayed

  • Tokens minted to wallet

  • Record saved to database

8

Next steps

  • View on BSCScan

  • Create presale

  • Configure tax recipients

9.2 Presale Creation Flow

1

Open the presale creation page.

2

Select token

  • Choose from "My Tokens"

  • Token: RVL (0x...)

  • Balance: e.g. 1,000,000 RVL

3

Presale configuration

  • Hardcap: e.g. 10 BNB

  • Softcap: e.g. 5 BNB

  • Rate: e.g. 1000 (1 BNB = 1000 RVL)

  • Liquidity %: e.g. 60%

  • Lock Duration: e.g. 365 days

  • Start Time / End Time

  • Min Buy / Max Buy

4

Referral settings (optional)

  • Enable: yes/no

  • Mode: Standard

  • Level 1: e.g. 5%

  • Level 2: e.g. 3%

  • Threshold: e.g. 0.1 BNB

5

Leaderboard settings (optional)

  • Enable: yes/no

  • Prize Pool %: e.g. 5%

  • Top Count: e.g. 10

6

Allocation breakdown (optional)

  • Team: e.g. 10% (locked 6 months)

  • Marketing: e.g. 5% (unlocked)

  • Public Sale: e.g. 70%

  • Liquidity: e.g. 30%

7

Project info

  • Description, logo URL, media (YouTube/image)

  • Website, Twitter, Telegram

8

Token requirements calculation

  • Presale Tokens, Liquidity Tokens, Allocation Tokens

  • Total required tokens example: 17,000 RVL

9

Approve token spend

  • Approve required tokens to LaunchpadFactory (example: 17,000 RVL)

10

Create presale

  • Pay creation fee (example: 0 BNB)

  • Gas estimate (example: ~0.5 BNB)

11

Presale created

  • Presale address displayed

  • Share link provided (example: rvl.network/launchpad/0x...)

9.3 Purchase Flow

1

Open presale page

URL: rvl.network/launchpad/[presale-address]

2

Verify eligibility

  • Status: Active Sale

  • Wallet: Connected

  • Whitelist: Approved (if private)

3

Enter amount

  • Input: e.g. 1 BNB

  • Receive: e.g. 1,000 RVL

4

Optional referral code

  • From URL: ?ref=0x...

  • Or manual entry

5

Click "Buy Tokens"

Initiates the purchase transaction.

6

Wallet confirmation

  • Pay purchase amount + gas

7

Transaction confirmed

  • Tokens purchased

  • Investment recorded

  • Referrer rewarded

  • Leaderboard updated

9.4 Claim Flow (After Finalization)

1

Open presale page

Status: Completed

2

View available claims

  • Tokens available

  • Referral rewards (if any)

  • Leaderboard prizes (if applicable)

3

Click "Claim Tokens"

Triggers claim transaction.

4

Wallet confirmation

  • Pay gas (example: ~0.01 BNB)

5

Tokens received

  • Tokens transferred to wallet


10. Admin Panel

10.1 Overview

Admin panel (/admin) provides platform statistics and contract management.

10.2 Dashboard Sections

Statistics View:

  • Total tokens created

  • Total presales launched

  • Total BNB raised

  • Active presales count

Contract Information:

  • TokenFactory address

  • LaunchpadFactory address

  • TokenLocker address

  • PancakeSwap Router address

Contract Cards: Each contract displays:

  • Address (with copy button)

  • Owner (if applicable)

  • Key metrics

  • View on BSCScan button

TokenFactory Card:

  • Collateral amount

  • Tax duration

  • Router address

LaunchpadFactory Card:

  • Creation fee

  • Implementation address

  • Total presales count

TokenLocker Card:

  • Type: Escrow

  • Governance: Decentralized

10.3 Admin Features

  • View real-time data (auto-refresh every 3s)

  • Investment tracking

  • Token balances

  • Manage contracts (view details, copy addresses, open BSCScan)


11. Launchpad System

11.1 Presale Lifecycle

11.2 Status Definitions

Status
Trigger
User Actions

Upcoming

currentTime < startTime

View project, wait

Active

startTime ≤ currentTime ≤ endTime

Buy tokens, withdraw

Ended

currentTime > endTime

Wait for finalization

Completed

finalized = true

Claim tokens/rewards

Failed

ended && raised < softcap

Refund investment

Canceled

canceled = true

Refund investment

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)

  • Owner calls finalize

  • Validate conditions

  • Calculate liquidity (BNB & tokens)

  • Add liquidity to PancakeSwap

  • Lock LP tokens in TokenLocker

  • Enable trading on RevolutionToken

  • Emit Finalized event

  • Users can claim tokens

Failed Finalization (Softcap Not Reached)

  • Presale ends

  • Status becomes Failed

  • Users can refund via refund()

  • Tokens returned to owner


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%)

  • Custom influencer rates

  • Threshold requirement

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

14.1 Overview

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. Deployment

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


Appendix

Contract Addresses (Mainnet)

Contract
Address

TokenFactory

0xe646cD6f07CbBC7e275b264B9c33A2b1b5eb8091

LaunchpadFactory

0xE44bD842eeA5D58bb70581D757220e0834f5f82B

TokenLocker

0x4e702C466f130127f675E83C6be0CC3970C38FDB

Router (PancakeSwap)

0x10ED43C718714eb63d5aA57B78B54704E256024E

Contract Addresses (Testnet)

Contract
Address

TokenFactory

0xa82ec4078AF406b8e044A3094628B96292B7D18E

LaunchpadFactory

0x9F387ED44F1afCaa9cE1235Fd1966b7aA4300987

TokenLocker

0xB0a49Ea3CDB859F1bea9a7340b60C8c4a84A4f8E

Router (PancakeSwap)

0xD99D1c33F9fC3444f8101754aBC46c52416550D1

  • Website: https://rvl.network

  • BSCScan (Mainnet): https://bscscan.com

  • BSCScan (Testnet): https://testnet.bscscan.com

  • Documentation: This file

Documentation Version: 1.0.0 Last Updated: January 2026 Platform: Revolution Pad on BSC