# DegenZ Fun V6 — Standard (V3) · Tax / Reward (V2 bonding)

> **V6 token types:** **Standard** uses single-sided Uniswap V3 (NOXA-style) — tradeable from block zero,
> LP locked forever, no transfer tax. **Tax** and **Reward** use a FoT-aware V2 bonding curve that graduates
> to Uniswap V2 (transfer tax cannot live in single-sided V3 LP). Protocol trade fee is **0.75%** via
> `DegenZFeeRouter` (site + Telegram bot). Graduation fee is **5%**.

## AI Launch Agent

In the create modal, users can describe a coin; the server calls **Gemini** (`POST /api/fair-launch/ai/suggest`)
to propose name / ticker / bio and optional logo. Launch still uses the normal wallet `createCoin` /
`createTaxCoin` / `createRewardCoin` path. Operators need `GEMINI_API_KEY` on the VPS (Google AI Studio).

## How the V3 single-sided model works (Standard)

On `createCoin` the launchpad (`DegenZV3Launchpad`):

1. Deploys the token (`DegenZV3Token`) — a fixed-supply 1B ERC-20 with **no owner and no transfer tax**.
2. Creates + initializes the Uniswap V3 pool at a starting price (~**$4k** market cap).
3. Mints the **entire 1B supply** as a **single-sided (token-only) V3 position** across a range above spot.
   Because spot starts at the bottom of the range, only tokens are needed — no ETH seed.
4. Holds the position NFT **forever** (liquidity can never be withdrawn by anyone).
5. Optionally runs an **atomic dev buy** in the same transaction (anti-sniper).

As people buy, ETH accrues in the pool and the price climbs the range. When market cap
reaches the creator's target, anyone can call `graduate(token)` — a **milestone** that skims
a one-time **5%** of the locked LP to treasury (as native + tokens); the rest stays locked.

### Supply

| Bucket | Amount | Role |
|--------|--------|------|
| Single-sided V3 LP | 1B (100%) | Entire supply seeded into the locked V3 position at launch |
| Total | 1B | Fixed supply ERC-20 · no tax · no owner |

### Fees

- **Trade fee: 0.75%** — collected by the DegenZ fee router on buys/sells routed through the
  DegenZ website and Telegram bot. Raw Uniswap trades pay **no** protocol fee (tax-free token).
- **Graduation fee: 5%** — one-time skim from the locked LP to treasury at the graduation milestone.
- **Create fee: ~$5** — paid in native token to treasury on `createCoin`.

### Native to graduate (start mcap ~$4k)

The single-sided full-range position reproduces the **same** economics as the old curve.
ETH to move market cap from start `M0` to target `Mg` is `sqrt(M0·Mg) − M0`:

| Graduation target | Approx. native to graduate |
|-------------------|----------------------------|
| **$10k** | ~**0.8 native** |
| **$20k** | ~**1.6 native** |
| **$30k** | ~**2.3 native** |

Dynamic graduation ($10k–$30k, deployer picks per token) still applies.

### Contracts (V3 model)

| Contract | Purpose |
|----------|---------|
| `DegenZV3Launchpad` | `createCoin`, single-sided mint, atomic dev buy, graduation milestone + 5% skim, treasury/fee admin |
| `DegenZV3Token` | Fixed-supply 1B ERC-20 · no owner · no tax |
| `DegenZFeeRouter` | Collects the 0.75% trade fee atomically on V3 buys/sells |
| Uniswap V3 pool | Created + funded at launch (single-sided) |

---

# Tax / Reward model — V2 bonding (FoT)

**Standard** coins stay on the V3 launchpad above. **Tax** and **Reward** coins cannot use
single-sided V3 LP (transfer tax breaks V3 accounting), so they use `DegenZV2TaxLaunchpad`:

1. Deploys `DegenZFunTaxToken` (PinkSale-style buy/sell tax ≤ **10%**, active from launch).
2. Seeds an 800M/200M V2 bonding curve (`DegenZV2TaxBondingCurve`) — creator + curve + fee
   router are tax-exempt so pre-bond trades do not pay token tax.
3. At graduation: 5% of curve ETH → treasury, remainder + reserved tokens → Uniswap V2 LP
   (burned), pair flagged as AMM, taxes locked, ownership renounced.
4. **Reward** coins route marketing tax into `DegenZRewardDistributor` (swap to reward token,
   claim by Fun-token balance share).

### Fees (Tax / Reward)

- **Token tax:** creator-set buy/sell ≤ 10% (marketing wallet or reward distributor).
- **Protocol trade fee: 0.75%** via `DegenZFeeRouter` (site + Telegram bot) — pre-bond
  `buyCurve`/`sellCurve`, post-bond FoT-aware `buyV2`/`sellV2`.
- **Graduation fee: 5%** of curve ETH to treasury.
- **Create fee: ~$5** native.

External bots (e.g. Maestro) are expected **post-graduation** on the V2 pair; pre-bond use
DegenZ Fun / the Telegram bot.

### Contracts (Tax / Reward)

| Contract | Purpose |
|----------|---------|
| `DegenZV2TaxLaunchpad` | `createTaxCoin` / `createRewardCoin`, creator tax/marketing admin |
| `DegenZV2TaxBondingCurve` | Virtual curve → Uniswap V2 at graduation |
| `DegenZFunTaxToken` | FoT ERC-20 · max 10% · AMM pair flags |
| `DegenZRewardDistributor` | Accrue tax → swap to reward token → claim |
| `DegenZFeeRouter` | 0.75% protocol fee (FoT-aware V2 swaps) |

Deploy: `npm run deploy:v2-tax-launchpads` (writes `v2TaxLaunchpad` into `deployments.json`).

---

# Legacy model — bonding curve (older tokens only)

The sections below describe the **previous** bonding-curve launchpad. Tokens launched on the
old factories keep working exactly as described; new **Standard** launches use the V3 model above.

## Supply split (legacy curve)

| Bucket | Amount | Role |
|--------|--------|------|
| Bonding curve | 800M (80%) | Sold via `buy()` / router while not graduated |
| LP reserve | 200M (20%) | Locked until graduation → Uniswap V3 LP |
| Total | 1B | Fixed supply ERC-20 |

## Curve parameters (V6 — current factories)

Pump.fun-style **virtual reserves** set starting price and buy depth. Current `MoonRushBondingCurve` uses:

| Constant | Value | Purpose |
|----------|-------|---------|
| `INITIAL_VIRTUAL_ETH` | **1.5 native** | Virtual liquidity depth (ETH on ETH chains, BNB on BSC) |
| `INITIAL_VIRTUAL_TOKEN` | **1.073B** tokens | Virtual token side (same ratio as pump.fun) |
| `TOKENS_FOR_CURVE` | **800M** | Real tokens sold on the curve |

**Starting market cap** ≈ **~1.4 native** (~$4k at typical ETH prices) — well below the $10k–$30k graduation band.

**Dev buy sanity check (V6):** ~0.003 native dev buy ≈ **0.25%** of curve supply (not 70%+). Older factories with `0.001` virtual ETH are deprecated — redeploy to fix.

### Gross native buys to graduate (V6 curve)

Graduation triggers when **market cap** (not “ETH raised”) hits your USD target converted to native at factory deploy. Figures below are **total gross buy volume** on the curve (all buyers + dev buy, including 0.75% trade fee), from a fresh launch:

| Graduation target | Approx. gross buys needed (V6) |
|-------------------|-------------------------------|
| **$10k** (ETH ~$3k) | **~0.8 ETH** |
| **$10k** (current on-chain ETH mcap ~5.7 native) | **~1.5 ETH** |
| **$10k** (current on-chain BNB mcap ~17.3 BNB) | **~3.8 BNB** |
| **$20k** (ETH ~$3k) | **~1.8 ETH** |
| **$30k** (ETH ~$3k) | **~2.5 ETH** |

The create modal shows a live **“Native to bond”** estimate for your selected graduation target.

## Lifecycle (one token)

```mermaid
flowchart LR
  A[createCoin] --> B[V3 pool created empty]
  B --> C[Bonding trades]
  C --> D{mcap ≥ target?}
  D -->|no| C
  D -->|yes| E[Graduation]
  E --> F[V3 LP + burn NFTs + renounce]
```

### 1. Create (`createCoin`)

- Pay **create fee** (~$5) → treasury.
- Optional **dev buy** in the **same transaction** (atomic anti-sniper).
- Deploys: ERC-20 + `MoonRushBondingCurve` + **empty** Uniswap V3 pool (address fixed for charts/bots post-grad).
- Deployer picks **graduation market cap** ($10k–$30k band set at factory deploy).

### 2. Bonding phase (pre-graduation)

**Every buy must hit the bonding curve** to count toward graduation:

| Entry | Counts toward graduation? |
|-------|---------------------------|
| Website `curve.buy()` | Yes |
| Dev buy on create | Yes |
| **`DegenZBondingRouter`** (`swapExactETHForTokens`) | Yes |
| Raw Uniswap V3 pool swap | **No** — pool has no LP until graduation |

The **DegenZ bonding router** is the bot integration point. It exposes V2-style `swapExactETHForTokens` / `getAmountsOut` but internally calls `curve.buy()`. Maestro / custom bots should use the **router address**, not the V3 pool, while `graduated == false`.

**Fees:** 0.75% trade fee → treasury on each buy/sell.

**Progress:** `bondingProgressBps()` and `marketCapEth()` drive the UI progress bar.

### 3. Graduation (automatic)

When `marketCapEth() >= graduationMarketCapEth` (on the next qualifying buy):

1. Curve marks `graduated = true`.
2. **5%** of remaining curve ETH → treasury (graduation fee).
3. Remaining curve ETH + unused **200M** LP tokens → **same V3 pool** (full-range position).
4. V3 position NFTs → `0x…dEaD` (liquidity permanent, cannot be removed).
5. Token **ownership renounced**.

After graduation, trade on **Uniswap V3** (the pool created at launch). The bonding router reverts with `GraduatedUseDex`.

### 4. Optional auto-seed (factory setting)

Factories can enable **auto-seed** (`AUTO_SEED_TRIGGER_USD` > 0): once curve `realEthReserve` crosses a threshold, a slice of ETH + tokens moves into V3 **before** graduation.

**Default deploy: auto-seed OFF.** Pre-grad V3 liquidity lets bots swap on Uniswap directly, which **does not** update bonding progress. With auto-seed disabled, all pre-grad volume goes through the curve/router.

## Contracts

| Contract | Purpose |
|----------|---------|
| `DegenZFunBondingCurveFactory` | `createCoin`, treasury, graduation bounds, router registry |
| `MoonRushBondingCurve` | Bonding math, graduation, V3 LP mint at grad |
| `DegenZBondingRouter` | Bot-friendly swaps → bonding curve pre-grad |
| Uniswap V3 pool | Created at launch; **funded at graduation** (default) |

## Bot integration (pre-graduation)

```solidity
// Buy with native ETH — path [WETH, token]
router.swapExactETHForTokens{value: ethAmount}(
  minTokensOut,
  [WETH, tokenAddress],
  recipient,
  deadline
);

// Quote
router.getAmountsOut(ethAmount, [WETH, tokenAddress]);
```

**Do not** route through the V3 pool address while the token is still bonding.

## Supported EVM chains

| Chain | Chain ID | Wrapped native (WETH) | V3 in deploy script |
|-------|----------|-------------------------|---------------------|
| Robinhood | 4663 | `0x0Bd7…` | Robinhood Uniswap V3 |
| Ethereum | 1 | WETH9 | Uniswap V3 |
| BNB Chain | 56 | WBNB | Uniswap V3 on BSC |
| Base | 8453 | WETH | Uniswap V3 |
| PulseChain | 369 | WPLS `0xA107…9a27` | PulseX V2 (Tax/Reward model — coming soon) |

Solana uses a separate bonding program (not covered here).

## Deployed factories (V3 single-sided — live)

Live addresses are also served by `GET /api/fair-launch/config` and [docs → Contract addresses](/docs/#factory-addresses).

| Chain | Token factory (`DegenZV3Launchpad`) | Fee router (`DegenZFeeRouter`) |
|-------|--------------------------------------|--------------------------------|
| **Robinhood** | [`0x7859a704bd9caa38b49dc05693159148e6e7636d`](https://robinhoodchain.blockscout.com/address/0x7859a704bd9caa38b49dc05693159148e6e7636d) | [`0xccb88cd1370abb16acf0378b34d8ae89158b9f5a`](https://robinhoodchain.blockscout.com/address/0xccb88cd1370abb16acf0378b34d8ae89158b9f5a) |
| **Ethereum** | [`0xd8fc279e1edf46e75f127af2d4e43589657fbd42`](https://etherscan.io/address/0xd8fc279e1edf46e75f127af2d4e43589657fbd42) | [`0xa63eb3dc94262f71557f4eff2c99475e3f0c490d`](https://etherscan.io/address/0xa63eb3dc94262f71557f4eff2c99475e3f0c490d) |
| **BNB Chain** | [`0x48516dfa5bcab645480707d3c7723867c1ac29ea`](https://bscscan.com/address/0x48516dfa5bcab645480707d3c7723867c1ac29ea) | [`0xd8fc279e1edf46e75f127af2d4e43589657fbd42`](https://bscscan.com/address/0xd8fc279e1edf46e75f127af2d4e43589657fbd42) |
| **Base** | [`0x48516dfa5bcab645480707d3c7723867c1ac29ea`](https://basescan.org/address/0x48516dfa5bcab645480707d3c7723867c1ac29ea) | [`0xd8fc279e1edf46e75f127af2d4e43589657fbd42`](https://basescan.org/address/0xd8fc279e1edf46e75f127af2d4e43589657fbd42) |

### Legacy bonding curve factories (older coins)

Older coins created before the V3 launchpad migration still use these curve factories:

| Chain | Factory | Bonding router |
|-------|---------|----------------|
| **Robinhood** | `0x719d48c72de4543cc1855b17e1c83725bbd96d9d` | `0x44590798cd835d5d7d2588f4e0345667a4b12356` |
| **Ethereum** | `0x690979928b159731c8190196d3bc74431b0a606b` | `0x3cab43be2e7c7b942a00d137662d0fc69c9a0dee` |
| **BNB Chain** | `0x09f21a69c81d871126062c2b36ff3e7347edd6fb` | `0x84264e1eb74a61ae218194029dc176cc73269eb3` |
| **Base** | `0x84264e1eb74a61ae218194029dc176cc73269eb3` | `0x690979928b159731c8190196d3bc74431b0a606b` |

Verify a **new** curve after launch (legacy V6 only):

```bash
cast call $CURVE "virtualEthReserve()(uint256)" --rpc-url $RPC
# V6: 1500000000000000000 (1.5e18)
```

Coins created on **older** factory addresses keep the previous `0.001` virtual curve — only new `createCoin` calls on the addresses above use V6.

## Deploy & website update

From repo root — **all four EVM chains in one command**:

```bash
npm run deploy:bonding-factories
npm run deploy:vps
```

Full checklist: **[web/DEGENZ-GO-LIVE.md](../DEGENZ-GO-LIVE.md)** (in repo).

Single chain:

```bash
./scripts/deploy-degenz-bonding-factory.sh ethereum
./scripts/deploy-degenz-bonding-factory.sh bsc
./scripts/deploy-degenz-bonding-factory.sh base
./scripts/deploy-degenz-bonding-factory.sh robinhood
```

Verify live API (all chains):

```bash
curl -s https://degenznetwork.com/api/fair-launch/config | jq '.chains[] | {id, bondingCurveFactory, bondingRouter, live}'
```

Hard-refresh the site (incognito) and confirm graduation slider + launch guide on `/degenz-fun/robinhood/`.

## Env overrides (factory deploy)

| Variable | Default | Meaning |
|----------|---------|---------|
| `MIN_GRADUATION_USD` | 10000 | Min deployer graduation target |
| `MAX_GRADUATION_USD` | 30000 | Max deployer graduation target |
| `CREATE_FEE_USD` | 5 | Launch fee |
| `AUTO_SEED_TRIGGER_USD` | 0 | Pre-grad V3 seed threshold (0 = off) |
| `AUTO_SEED_ETH_BPS` | 3500 | % of curve ETH to seed when triggered |
