Skip to main content

Architecture

The XYZ launchpad lets anyone create a token that starts trading on a bonding curve. Once enough XYZ is raised, the token automatically graduates to the AMM with a liquidity pool. This page explains how each piece works.

Token Lifecycle

1. Token Creation

Anyone can create a token by paying a 1 XYZ creation fee. They provide a name, symbol, image, and description. The token launches immediately on a bonding curve — no liquidity needed from the creator. Every token has a fixed total supply of 100,000,000 tokens:
  • 79,310,000 (79.31%) are available for trading on the bonding curve
  • 20,690,000 (20.69%) are reserved for the initial AMM liquidity pool

2. Bonding Curve Trading

The bonding curve is a smart contract that acts as an automated market maker before graduation. It uses a constant-product formula (similar to Uniswap) with virtual reserves:
  • Virtual XYZ reserves: 34,800,000 XYZ (starting)
  • Virtual token reserves: 107,300,000 tokens (starting)
  • K (constant product): virtual_xyz * virtual_tokens
As people buy tokens, the price increases along the curve. As people sell, it decreases. The price at any point is:
price = K / (virtual_tokens_remaining)^2
Fees on the curve:
  • Buy fee: 0.5% (taken from the XYZ input)
  • Sell fee: 3.5% (taken from the XYZ output, half is burned)

3. Graduation

When the total XYZ raised on the bonding curve reaches the graduation threshold, the token automatically graduates to the AMM. The graduation threshold is dynamically calculated based on the XYZ/USD oracle price, targeting a specific USD value. It’s clamped between a minimum and maximum. At graduation:
  1. All XYZ raised on the curve is paired with the 20.69M reserved tokens
  2. An initial liquidity pool is created on the AMM
  3. The bonding curve stops accepting trades
  4. Trading moves to the AMM

4. AMM Trading

After graduation, all trading happens on the XYZ AMM — a standard constant-product (x*y=k) automated market maker. Each pool pairs a token with XYZ. The AMM price is simply:
token_price_in_xyz = xyz_reserve / token_reserve
Graduated pools may have an augmented fee period after launch, where a higher swap fee is charged temporarily to build up pool liquidity. This fee decreases as the pool grows toward its target size.

Contracts

Launchpad Contract

xyz1yvgh8xeju5dyr0zxlkvq09htvhjj20fncp5g58np4u25g8rkpgjs2wxaqp Handles token creation, bonding curve trading (buy/sell), oracle price management, and triggering graduation.

AMM Contract

xyz18cszlvm6pze0x9sz32qnjq4vtd45xehqs8dq7cwy8yhq35wfnn3qlv6e0z Handles post-graduation trading, liquidity pool management, and swap execution.

Oracle

The launchpad contract stores an XYZ/USD price used to:
  • Calculate USD-denominated values (market cap, TVL)
  • Dynamically adjust the graduation threshold
The oracle price is stored in micro-USD (6 decimal places). A stored value of 75 means $0.000075 per XYZ.

Key Parameters

ParameterValue
Total supply per token100,000,000
Tokens on curve79,310,000 (79.31%)
Tokens reserved for LP20,690,000 (20.69%)
Creation fee1 XYZ
Buy fee (curve)0.5%
Sell fee (curve)3.5%