Web3 Market
HomeLaunch & Token SalesPresale / ICO ScriptsBSC Token Presale with Randomized Alloca...

BSC Token Presale with Randomized Allocation - Chainlink VRF Powered

A ready-to-deploy token presale system for BNB Smart Chain

$299.00
Last Updated 30 days
•Demo

Description

BSC Token Presale with Randomized Allocation — Chainlink VRF Powered

A ready-to-deploy token presale system for BNB Smart Chain that adds a twist to the standard sale format: buyers don't get a fixed token amount. Instead, they pick a price tier and receive a random number of tokens within that tier's range, determined by Chainlink VRF on-chain randomness. Payments go straight to the project owner's wallet — nothing sits in the contract.

What It Does

Buyers connect their wallet, choose a tier (e.g. Bronze, Silver, Gold), enter a BNB amount, and hit buy. The contract verifies the payment falls within the tier's USD range using a live Chainlink BNB/USD price feed, forwards the BNB to the owner immediately, and requests a random number from Chainlink VRF v2.5. A few seconds later, the random result comes back on-chain and the buyer receives their tokens — somewhere between the tier's minimum and maximum. Every result is verifiable on-chain. No one can predict or manipulate the outcome.

The frontend presents this as a slot-machine-style spin. Numbers roll while waiting for the VRF response, then decelerate and lock in the final amount. It's a more engaging way to run a token sale compared to a flat-rate presale.

What's Included

Smart Contracts (Solidity 0.8.28, Foundry)

  • FunOffering presale contract with tiered pricing, Chainlink VRF v2.5 integration, and Chainlink price feed for BNB/USD conversion
  • Configurable purchase tiers — set USD price ranges and token allocation ranges per tier, add or update tiers after deployment
  • BNB payments with live USD conversion via Chainlink price feed
  • Stablecoin payment support — whitelist any stablecoin (USDT, USDC, etc.) with automatic decimal normalization
  • Total distribution cap to limit the presale supply
  • Pause/unpause functionality for emergency control
  • Owner functions to withdraw funds, adjust VRF parameters, and manage tiers
  • Test ERC-20 token contract for development and testing
  • Deployment scripts for BSC Testnet (with mainnet addresses documented)
  • Full test suite — unit tests, integration tests, fuzz tests, access control tests

Frontend (React, TypeScript, Vite)

  • Single-page presale widget with wallet connection via Reown AppKit (WalletConnect, MetaMask, Coinbase Wallet, and others)
  • Slot machine animation that spins while waiting for the VRF result and decelerates to reveal the final token amount
  • Tier selection with live pricing pulled directly from the contract
  • BNB amount input with quick-fill buttons (min, 50%, max) and live USD conversion
  • Transaction history panel showing past purchases for the connected wallet
  • Confetti and sound effects on successful purchases (sounds are synthesized, no audio files)
  • Progress bar showing total distribution vs. cap
  • Dark theme with a cyber/terminal aesthetic
  • Iframe embedding support — drop it into any website with a single embed tag, with optional contract address override via URL parameter
  • Responsive design, works on mobile

Documentation

  • Self-contained HTML documentation page served at /docs/ on the deployed frontend
  • Covers everything: deployment, tier configuration, VRF setup, frontend customization, Vercel deployment, contract administration, and network addresses for both BSC Testnet and Mainnet

Technical Details

  • Solidity 0.8.28 with OpenZeppelin v5 (ReentrancyGuard, Pausable, SafeERC20)
  • Chainlink VRF v2.5 for provably fair randomness
  • Chainlink Price Feed for real-time BNB/USD conversion
  • Foundry for compilation, testing, and deployment
  • React 19, TypeScript, Vite 7, Tailwind CSS 4
  • wagmi v2 + viem v2 for contract interactions
  • Reown AppKit for wallet connectivity
  • No external databases or backend — everything runs on-chain and client-side

How Tiers Work

Each tier defines a USD price range and a token range. For example:

TierBuy-in (USD)Token Range
Bronze$10 – $501,000 – 5,000
Silver$50 – $2005,000 – 20,000
Gold$200 – $1,00020,000 – 100,000

The owner can add up to any number of tiers, update ranges, or disable tiers at any time after deployment. USD values are checked against the live BNB price so tier bounds stay consistent regardless of BNB price movement.

What You Need to Deploy

  • A BNB Smart Chain wallet with BNB for gas
  • A Chainlink VRF v2.5 subscription funded with LINK tokens
  • An ERC-20 token to distribute (or use the included test token)
  • A Reown project ID (free) for wallet connectivity
  • Foundry installed for contract compilation and deployment
  • Node.js for the frontend
Documentation

Disclaimer: Web3.Market is a marketplace platform that facilitates the sale of digital products between independent sellers and buyers. We do not develop, endorse, or guarantee any product listed on this platform. All products are provided by third-party sellers and are sold "as is." Web3.Market assumes no responsibility or liability for the functionality, security, legality, or any use or misuse of products purchased through this platform. Buyers are solely responsible for evaluating the suitability of any product for their intended purpose and for ensuring compliance with all applicable laws and regulations. By purchasing, you acknowledge that Web3.Market shall not be held liable for any direct, indirect, incidental, or consequential damages arising from the use of any product.

$299.00USD

One-time payment • Lifetime access

Source codeLifetime updatesCommercial license
Pay with:
BTC
ETH
USDT
SOL
BNB
+20

Product Info

CategoryLaunch & Token Sales
TypePresale / ICO Scripts
Blockchainbsc
Last Updated30 days
VimLabs
VimLabsAuthor

RPC Providers

Need a reliable RPC endpoint for your dApp? Get started with these trusted providers:

QuickNode
QuickNode
Fast blockchain infrastructure
Tatum
Tatum
Web3 development platform
$299.00

Your Code Belongs on Web3

Ship smarter dApps, plug into our marketplace, and grow with the next wave of the internet.

Web3 Market

The leading marketplace for Web3 products

Popular

  • Presale / ICO Scripts
  • Launchpad Scripts
  • Airdrop & Claim Portals
  • Token Generators
  • Liquidity Lockers
  • DEX Scripts
  • Staking Scripts
  • Telegram Buy Bots

Developer Tools

  • RPC & Nodes
  • Smart Contracts
  • Security & Auditing
  • Oracles & Data Feeds
  • Wallets & Auth
  • Analytics
  • Account Abstraction
  • Documentation
  • Browse All Tools

Company

  • About Us
  • News
  • Web3 Jobs
  • Become a Developer
  • Affiliate Program
  • Free Smart Contract Audit
  • Contact Us

Legal

  • Terms of Service
  • Privacy Policy
  • License Agreement
  • Refund Policy

© 2026 Web3.Market. All rights reserved.

Built with ♥ for the Web3 community