PacksDrop0%

boot

PacksDrop

docs

PacksDrop documentation

Everything you need to launch a pack collection with an on-chain bonding curve on Base Sepolia — from wallet setup to mint, burn, and contract addresses.

Overview

PacksDrop is a pack constructor for creators who want a bonding-curve market around a fixed card supply. You configure metadata and curve parameters, deploy a dedicated PackCurve contract, and traders mint or burn pack tokens by sending ETH along the curve.

The app is a static Next.js frontend. It talks to Base Sepolia over RPC and uses your wallet (via RainbowKit) to sign transactions — no private keys in the browser bundle.

  • Chain: Base Sepolia (chain id 84532)
  • Explorer: basescan.org (Sepolia)
  • Production site: packsdrop.xyz

How it works

End-to-end flow in three layers:

  1. Factory (once) — PackFactory is deployed once per network. It stores the platform fee recipient and spawns new pack contracts.
  2. Pack (per collection) — via Launch wizard, you call createPack. Each pack is its own ERC-20–style curve token with immutable parameters.
  3. Trading — on the homepage dashboard, anyone can mint (send ETH, receive pack tokens) or burn (return pack tokens, receive ETH) according to the curve state.

After a successful launch, the pack contract address is saved in your browser (localStorage) and shown in the contract banner on the homepage. You can also set a default pack via NEXT_PUBLIC_CONTRACT_ADDRESS.

Bonding curve

Each pack uses an exponential bonding curve. Two ideas work together: how much supply exists for a given amount of ETH deposited, and what the marginal price is at that point.

Supply (cumulative ETH в†’ tokens):
supply = maxSupply Г— (1 в€’ e^(в€’k Г— eth))

Spot price (ETH per token):
price = basePrice Г— e^(m Г— eth)

Parameters (set at deploy, cannot be changed later):

  • maxSupply — hard cap on pack tokens (card count in the wizard).
  • k — how fast supply approaches the cap as ETH flows in (higher = faster issuance early).
  • basePrice — starting price scale at zero cumulative ETH.
  • m — how aggressively price rises as the pool grows.

The launch wizard preview chart shows supply vs ETH and live mint/burn quotes. On-chain, getMintQuote / getBurnQuote use the same math with fixed-point (WAD) precision.

Price impact — larger trades move along the curve, so average fill price differs from the spot price shown before the trade. The dashboard displays estimated impact for preview amounts.

Launch wizard

Open /launch and walk through four steps:

  1. Basics — collection name, optional description, card count (8–10,000). Card count becomes maxSupply on chain.
  2. Art — upload up to 12 images for preview (stored locally in the browser only; not written to chain in the current version).
  3. Curve — adjust k, m, basePrice with sliders and see the curve update in real time.
  4. Review & deploy — connect wallet, confirm createPack on Base Sepolia. After confirmation, a success modal shows the new pack address and a link to Basescan.

Requirements: wallet on Base Sepolia, a small amount of test ETH for gas, and a configured factory address (NEXT_PUBLIC_FACTORY_ADDRESS).

Dashboard & trading

The homepage dashboard loads the active pack contract and shows:

  • Bonding curve chart with current position
  • Issuance bars (tokens released per ETH bucket)
  • Supply, market / mint / burn prices
  • Mint and burn panels — send transactions from your wallet

Mint — send ETH to the pack contract; receive pack tokens per mint().

Burn — approve and burn pack tokens; receive ETH per burn().

If no pack is selected, deploy one via the launch wizard or set NEXT_PUBLIC_CONTRACT_ADDRESS for a default demo pack.

Base Sepolia testnet

PacksDrop currently targets Base Sepolia for development and demos.

  1. Add Base Sepolia to your wallet (chain id 84532, RPC https://sepolia.base.org).
  2. Get test ETH from a Base Sepolia faucet (search "Base Sepolia faucet" — official Base docs list options).
  3. Connect on the site via the wallet button (top right).
  4. Deploy or trade. Verify transactions on sepolia.basescan.org.

Factory deployment instructions for operators: /admin/deploy.

Smart contracts

Core contracts (Solidity 0.8.x, Foundry):

  • PackFactory — createPack(name, symbol, maxSupply, k, basePrice, m) deploys a new curve and emits PackCreated.
  • PackCurve — ERC-20 token with mint() payable and burn(); tracks cumulativeEth for quotes.
  • BondingMath — shared fixed-point curve math library.

Pack tokens use 18 decimals on chain. The UI passes human-readable numbers; the frontend converts to WAD before calling the factory.

To deploy the factory yourself: install Foundry, configure contracts/.env with a deployer key (never commit), run the deploy script, then set NEXT_PUBLIC_FACTORY_ADDRESS in the app env.

Fees

A platform fee (default 1%, max 10% at factory deploy) is applied on mint only. The fee is sent to the feeRecipient set when the factory was deployed.

Burn returns ETH net of the curve state; no additional platform fee on burn in the current implementation. You still pay network gas for every transaction.

FAQ

Launch failed or reverted? Check you are on Base Sepolia, have test ETH, factory address is set, and parameters are valid (non-empty name/symbol, maxSupply > 0). Open the transaction on Basescan for the revert reason.

I deployed but don't see my pack on the homepage? The latest deployed address is stored in this browser. Open the site in the same browser or copy the address from the success modal. Clear site data resets the saved pack.

Are images on-chain? Not yet — art upload is preview-only in the wizard. On-chain data is name, symbol, and curve parameters.

Mainnet? The UI is wired for Base Sepolia. Moving to Base mainnet requires deploying factory and packs on mainnet and updating env chain id / RPC / addresses.

Security — never put private keys in the frontend, git, or public env. Only the factory deployer needs a key in a local contracts/.env for CLI deploy.

→ Launch wizard→ Dashboard→ Factory deploy→ Twitter