# FCT Issuance Formula

This section provides a detailed explanation of the formula that governs the issuance of FCT, intended for technical readers who want to understand issuance on a block-by-block basis.

To see the current mint rate, issuance progress, and other real-time FCT metrics, visit [fct.fyi](https://fct.fyi/).

## Overview

FCT issuance is designed to provide:

* **Predictable ownership** through a deterministic total supply cap
* **Stable issuance** via dynamic rate adjustments every 500 blocks
* **Protection from gas spikes** by minting based on ETH burned, not gas units

## Basic minting formula

FCT is minted proportionally to the ETH burned for transaction calldata:

$$
\text{FCT minted} = \text{ETH burned for data} \times \text{mint rate}
$$

Where:

* **ETH burned for data** = Data Gas × Block Base Fee (Data Gas is defined in the [Calldata gas calculation](#calldata-gas-calculation) section)
* **Mint rate** = Dynamically adjusted rate (FCT-wei per ETH-wei)

The *mint rate* is denominated in **FCT-wei per ETH-wei burned**.

**Important**: Data Gas only includes the gas for the transaction's calldata/event data - not the total gas used by the transaction.

## Total supply cap

The total supply of FCT is:

* **1,646,951,661 FCT** (human-readable)
* **1,646,951,661,163,841,381,479,607,357** (in FCT-wei, with 18 decimals)

The protocol enforces this cap through an issuance-based halving schedule.

### Halving schedule

Halvings are intended to occur every 5,256,000 blocks. However, the actual halvings are triggered by issuance thresholds, not time:

* **1st Halving**: 50% of total supply minted
* **2nd Halving**: 75% of total supply minted (50% + 25%)
* **Subsequent**: Each adds half of remaining supply

Each halving reduces the per-period issuance target by 50%.

**Example**: If the current per-period target is 100,000 FCT, after the next halving it becomes 50,000 FCT. This ensures issuance slows down over time as the total supply approaches its cap.

## Dynamic rate adjustment

### What is a period?

A **period** is a span of time during which the FCT mint rate remains constant. When a period ends, the protocol recalculates the rate based on how much FCT was actually minted versus the target.

Periods can end *during* a transaction. If a transaction's minting would exceed the period's target, the period ends mid-transaction:

* The portion of ETH burned before hitting the target mints at the current period's rate
* The remaining portion mints at the new period's rate

The same applies to halvings - they can occur within a single transaction.

This creates a self-balancing system: if too much FCT is minted, rates go down; if too little is minted, rates go up.

### Adjustment periods

A period ends when **either**:

1. 500 L2 blocks elapse, or
2. The period's FCT target is hit

This dual-threshold system ensures rapid response to demand changes while maintaining predictable issuance.

### Rate calculation

The rate adjusts based on which threshold triggered the period end.

**Variable glossary:**

* `old_rate`, `new_rate`: FCT-wei per ETH-wei burned
* `target`: per-period FCT target (e.g., 100,000 FCT)
* `minted`: actual FCT minted in period
* `blocks_elapsed`: blocks in period when target hit

#### Under-issuance (500 blocks reached first)

When the period times out before hitting the target:

```
if 500-block timeout:
    if minted == 0:
        new_rate = min(old_rate * 4, MAX_MINT_RATE)
    else:
        new_rate = old_rate × min(target / minted, 4)
    new_rate = clamp(new_rate, MIN_MINT_RATE, MAX_MINT_RATE)
```

Capped at 4× the old rate to prevent extreme spikes.

#### Over-issuance (Target reached first)

When the target is minted in fewer than 500 blocks:

```
if target hit first:
    new_rate = old_rate × max(blocks_elapsed / 500, 0.25)
    new_rate = clamp(new_rate, MIN_MINT_RATE, MAX_MINT_RATE)
```

Capped at 0.25× the old rate to prevent extreme drops.

### Examples

Assuming a target of 100,000 FCT per period and old\_rate = 1,000,000,000,000,000 (FCT-wei/ETH-wei):

1. **Moderate under-issuance**: 80,000 FCT minted in 500 blocks
   * new\_rate = old\_rate × 1.25
2. **Severe under-issuance**: 25,000 FCT minted in 500 blocks
   * new\_rate = old\_rate × 4.0 (capped)
3. **Moderate over-issuance**: Target hit in 450 blocks
   * new\_rate = old\_rate × 0.9
4. **Severe over-issuance**: Target hit in 50 blocks
   * new\_rate = old\_rate × 0.25 (capped)

## Calldata gas calculation

Following Ethereum's EIP-7623 gas pricing:

$$
\text{Data Gas} = (\text{Zero Bytes} \times 10) + (\text{Non-Zero Bytes} \times 40)
$$

## L1 contract-initiated transactions

Facet transactions created by L1 smart contracts use event data instead of calldata:

$$
\text{Event Data Gas} = \text{Data Bytes} \times 8
$$

This gas is multiplied by the block's base fee to get ETH burned, then by the mint rate to get FCT minted (for contract-initiated Facet tx only).

## Protocol constants

| Constant                          | Value                     | Description           |
| --------------------------------- | ------------------------- | --------------------- |
| `ADJUSTMENT_PERIOD_TARGET_LENGTH` | 500 blocks                | Period length target  |
| `MAX_RATE_ADJUSTMENT_UP_FACTOR`   | 4×                        | Maximum rate increase |
| `MAX_RATE_ADJUSTMENT_DOWN_FACTOR` | 0.25×                     | Maximum rate decrease |
| `MAX_MINT_RATE`                   | 2\*\*128 - 1 ≈ 3.4 × 10³⁸ | Global maximum rate   |
| `MIN_MINT_RATE`                   | 1                         | Global minimum rate   |

## State variables

The protocol tracks:

* `fct_mint_rate`: Current issuance rate (FCT-wei/ETH-wei)
* `current_period_start_block`: L2 block when period began
* `current_period_fct_minted`: FCT minted so far this period
* `total_fct_minted`: Cumulative supply

These values update with each L1 block in `setL1BlockValuesEcotone()`.

## Fixed-point arithmetic

All fractional calculations use 18-decimal fixed-point arithmetic and truncate toward zero. This ensures deterministic results across all implementations.

## Appendix: Halving schedule

Assuming the protocol reaches each halving on schedule (yearly):

| Year | Halving | Supply Minted (% of Total) | Cumulative Supply (% of Total) |
| ---- | ------- | -------------------------- | ------------------------------ |
| 1    | -       | 50%                        | 50%                            |
| 2    | 1st     | 25%                        | 75%                            |
| 3    | 2nd     | 12.5%                      | 87.5%                          |
| 4    | 3rd     | 6.25%                      | 93.75%                         |
| 5    | 4th     | 3.125%                     | 96.875%                        |
| 6    | 5th     | 1.5625%                    | 98.4375%                       |

The total supply asymptotically approaches but never exceeds the cap.


---

# 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.facet.org/native-gas-token/fct-issuance-calculation.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.
