# Token & Curve

`$TAPE` has a total supply of 1,000,000,000, 18 decimals. At launch the whole supply is credited to the contract as inner-curve inventory. Supply identity: [Design Goals](/goals).

Before graduation, trades happen on a constant-product curve inside the contract. The quote asset is BNB. When real quote reaches 18 BNB the inner book closes. Remaining tokens and BNB go to a Pancake V2 TAPE/WBNB pool. LP is sent to `0xdead`. After graduation, trades still pay the 5% tax. Four fifths of that, the 4% miner share, still enters the treasury.

`$TAPE` is not a claim that redeems treasury BNB. The curve sets a fill price, not a NAV.

## How a buy is split

Before graduation, a buy is cut in this order.

| Order | Cut | Destination |
|---|---|---|
| 1 | Launch surcharge | Treasury. Zero after 5 seconds |
| 2 | 5% trade tax | 4% miner share to the treasury. 1% protocol fee, held in-contract for operations |
| 3 | Remainder | Into the curve, for `$TAPE` |

Launch surcharge and the 4% miner share pay the treasury. The 1% fee never touches it. Sources: [Capital Flows](/flows).

```mermaid
%%{init: {"theme":"base","themeVariables":{"primaryColor":"#1a120c","primaryTextColor":"#f5ede4","primaryBorderColor":"#953307","lineColor":"#f46622","secondaryColor":"#221710","tertiaryColor":"#120d09","edgeLabelBackground":"#120d09","noteBkgColor":"#221710","noteTextColor":"#f5ede4","noteBorderColor":"#953307","actorBkg":"#1a120c","actorBorder":"#953307","actorTextColor":"#f5ede4","signalColor":"#f46622","signalTextColor":"#f5ede4","fontFamily":"inherit"}}}%%
sequenceDiagram
  autonumber
  participant Trader
  participant Fund as MicroTapeFund
  participant Treasury
  participant Curve
  Trader->>Fund: BNB in
  Fund->>Treasury: launch surcharge, first 5s
  Note right of Fund: 99% at s0,<br/>0 after s5
  Fund->>Treasury: 4 percent miner share
  Fund->>Fund: 1 percent fee
  Note right of Fund: held for ops,<br/>not treasury
  Fund->>Curve: net BNB
  Curve-->>Trader: TAPE out
  Note over Fund,Curve: virtual 4.5 BNB,<br/>graduate at 18 BNB
```

Sells have no launch surcharge. They still pay the 5% tax: 4% to the treasury, 1% to operations. BNB out cannot exceed real quote already in the curve. The virtual quote cannot be withdrawn.

The launch surcharge starts at `launchedAt`, lasts 5 seconds, and hits buys only. It is an anti-snipe levy, not a team allocation.

| Second | Buy surcharge |
|---|---|
| 0 | 99% |
| 1 | 25% |
| 2 | 3% |
| 3 | 0.5% |
| 4 | 0.1% |
| 5 and after | 0 |

## Price

The inner book is constant product with a virtual reserve. Virtual quote is 4.5 BNB. Add net BNB that has already entered the curve. That sum is the quote side. The other side is unsold inventory.

The virtual reserve gives a finite price when real quote is zero, without seeding 4.5 BNB. Only real quote can be sold out.

After the cuts above, remainder `net` enters the curve. Tokens out:

```
tokensOut = x - x * y / (y + net)
```

`y` is 4.5 BNB plus net BNB already in. `x` is inner inventory.

On a sell of `tokensIn`:

```
gross = y - x * y / (x + tokensIn)
```

`gross` cannot exceed real quote. Then the 5% trade tax comes out.

The quote you see and the fill you get can differ. If a last buy would push real quote past 18 BNB, the contract takes only what is needed to fill 18 BNB and refunds the rest.

## Graduation

Anyone may call `graduate()` once real quote is at least 18 BNB.

```mermaid
%%{init: {"theme":"base","themeVariables":{"primaryColor":"#1a120c","primaryTextColor":"#f5ede4","primaryBorderColor":"#953307","lineColor":"#f46622","secondaryColor":"#221710","tertiaryColor":"#120d09","edgeLabelBackground":"#120d09","noteBkgColor":"#221710","noteTextColor":"#f5ede4","noteBorderColor":"#953307","actorBkg":"#1a120c","actorBorder":"#953307","actorTextColor":"#f5ede4","signalColor":"#f46622","signalTextColor":"#f5ede4","fontFamily":"inherit"}}}%%
flowchart TD
  Hit["Real quote hits 18 BNB"] --> Check{"Treasury below 0.35 BNB?"}
  Check -->|yes| Peel["Peel shortfall from quote"]
  Check -->|no| Skip["No peel"]
  Peel --> Leftover["Leftover TAPE and BNB"]
  Skip --> Leftover
  Leftover --> Pair["Pancake V2 TAPE/WBNB"]
  Pair --> LP["LP to 0xdead"]
  LP -.-> Closed["Inner book closed"]
  classDef hot fill:#f46622,stroke:#f46622,color:#120d09
  classDef dim fill:#120d09,stroke:#3a2416,color:#b9a693
  class LP hot
  class Closed dim
```

1. If treasury balance is under 0.35 BNB, peel the shortfall from the quote and send it to the treasury for parts. That is a solvency constraint on the production function.
2. Remaining inventory and remaining BNB go to Pancake V2.
3. The LP recipient is `0xdead`.
4. The pair address is recorded. Inner buys and sells then fail.

Along this curve, graduation sells roughly 800 million tokens. About 200 million tokens and about 17.65 BNB seed the outer pool. Whether 0.35 BNB is peeled first moves those two numbers slightly.

Graduation only confirms that quote hit 18 BNB. It does not guarantee later depth or price. Trading continues in the same Pancake pool. There is no second migration.

Burned LP and managed protocol-owned liquidity are different identities. See [Comparison](/comparison).

## After graduation

When one side of a transfer is the pair, the contract takes 5% in tokens and accrues it. Transfers involving the treasury, the Pancake router, or the token contract itself are not cut.

`swapTax` sells the accrued tokens for BNB, then splits four fifths to the treasury for kits and one fifth as the protocol fee.

Outer-book tax is fiscal continuity, not a second launch. After graduation the treasury can still spend BNB only on parts and tape-out.

## Transfers and the dividend interface

On a balance change the contract first settles already-accrued `$BEM` against the pre-transfer balances, then edits `$TAPE` balances, then re-syncs debt. A transfer does not harvest miner output.

Balances below 1,000 `$TAPE`, and the pair, `0xdead`, or the token contract itself, stop accruing `$BEM`. Claims: [Dividends](/dividends).
