# Constants

Every numeric constant the SDK exports, with units and current values. All amounts are in **nano-TON** (`1 TON = 10^9 nano`) unless stated otherwise.

## Token economics

| Constant         | Value (BigInt)               | Human                            |
| ---------------- | ---------------------------- | -------------------------------- |
| `DECIMALS`       | `9`                          | Jetton decimals (same as TON).   |
| `TOTAL_SUPPLY`   | `1_000_000_000_000_000_000n` | 1B jettons.                      |
| `CURVE_ALLOC`    | `800_000_000_000_000_000n`   | 800M jettons sold via the curve. |
| `GRAD_LP_JETTON` | `200_000_000_000_000_000n`   | 200M jettons seeded into LP.     |
| `VIRTUAL_TON`    | `1_024_000_000_000n`         | 1,024 TON virtual reserve.       |
| `VIRTUAL_JETTON` | `1_073_000_000_000_000_000n` | 1.073B virtual reserve.          |

## Fees

| Constant           | Value     | Meaning                                |
| ------------------ | --------- | -------------------------------------- |
| `PROTOCOL_FEE_BPS` | `100n`    | 1.00 % to the protocol on every trade. |
| `CREATOR_FEE_BPS`  | `30n`     | 0.30 % to the token's creator.         |
| `TOTAL_FEE_BPS`    | `130n`    | Sum of the above.                      |
| `BPS_DENOM`        | `10_000n` | Basis-point denominator.               |

## Graduation

| Constant             | Value                                                                                      | Meaning                                     |
| -------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------- |
| `GRADUATION_TON_CAP` | computed `(VIRTUAL_TON × CURVE_ALLOC) / (VIRTUAL_JETTON − CURVE_ALLOC)` ≈ **3,001.46 TON** | Total real buyer spend to fill the curve.   |
| `MIGRATION_FEE_TON`  | `220_000_000_000n`                                                                         | 220 TON to protocol treasury at graduation. |
| `LP_TON_AT_GRAD`     | `GRADUATION_TON_CAP − MIGRATION_FEE_TON` ≈ **2,781 TON**                                   | TON paired with 200M jettons into LP.       |

## Gas

| Constant            | Value          | Meaning                                          |
| ------------------- | -------------- | ------------------------------------------------ |
| `INIT_GAS_BUDGET`   | `450_000_000n` | 0.45 TON reserved by the curve for init.         |
| `LAUNCH_VALUE_TON`  | `500_000_000n` | 0.5 TON sent on `LAUNCH_TOKEN`.                  |
| `LAUNCH_FEE_TON`    | `0n`           | No protocol fee at launch.                       |
| `GAS_BUY_RESERVE`   | `150_000_000n` | 0.15 TON gas reserve on a buy.                   |
| `GAS_SELL_RESERVE`  | `150_000_000n` | 0.15 TON gas reserve on a sell.                  |
| `TRADE_GAS_BUFFER`  | `200_000_000n` | 0.2 TON the wallet sends above the user's spend. |
| `TRADE_GAS_RESERVE` | `150_000_000n` | What the contract reserves.                      |
| `TRADE_GAS_NET`     | `50_000_000n`  | 0.05 TON effective extra hitting the curve math. |
| `SELL_FORWARD_TON`  | `100_000_000n` | 0.1 TON `forward_ton_amount` on a sell.          |
| `SELL_VALUE_TON`    | `300_000_000n` | 0.3 TON wallet sends on a sell.                  |

## Addresses

| Constant               | Value                                              |
| ---------------------- | -------------------------------------------------- |
| `MAINNET_FACTORY`      | `EQAZoBb1c43CEorgTx1ctDIe7MwMy29untZxRLRWVR6PmbIu` |
| `STONFI_ROUTER`        | `EQAQYbnb1EGK0Wb8mk3vEW4vbHTyv7cOcfJlPWQ87_6_qfzR` |
| `STONFI_ROUTER_PTON_W` | `EQARZ1hF4v95ELsH7pCPMN79_UeqKOOgOjt8xrkW9HhIM-u1` |

## Op codes (`OP`)

```ts
OP.LAUNCH_TOKEN              // 0x4c4e4348 'LNCH'
OP.BUY_TOKENS                // 0x42555900 'BUY\0'
OP.JETTON_TRANSFER           // 0xf8a7ea5  (TEP-74 standard)
OP.SELL_PAYLOAD              // 0x53454c4c 'SELL' — inline in JettonTransfer.forward_payload
OP.GRADUATE                  // 0x47524144 'GRAD'
OP.RETRY_MINT                // 0x52545259 'RTRY'
OP.RETRY_DEPOSIT             // 0x52545244 'RTRD'
OP.RENOUNCE_ADMIN            // 0x52454e4f 'RENO'
OP.JETTON_INTERNAL_TRANSFER  // 0x178d4519
OP.JETTON_TRANSFER_NOTIFY    // 0x7362d09c
OP.JETTON_EXCESSES           // 0xd53276db
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonton.fun/sdk/constants.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
