Facet Docs
  • 1. Introduction
    • Overview of Facet Protocol
    • What is Layer 1+?
    • The Based Sovereign Rollup
  • 2. Getting Started
    • Connecting a Wallet
    • Sending Transactions
    • Bridging In (and Out)
    • What about Gas?
    • Facet Apps
  • 3. Technical Details
    • Introduction
    • Facet RPC & Explorer
    • Genesis Contracts
    • Facet Transactions
      • From Calldata
      • From Event Logs
    • Facet Typescript SDK
    • Facet Sol (Foundry)
    • Chain State Derivation
    • Running a Facet Node
    • Bridging Assets
    • Building an Optimistic Bridge on Facet
    • Basic Transaction Flow
    • Facet's Gas Mechanism
      • FCT Issuance Calculation
      • FCT Gas Fee Calculation
    • Security Audits
  • 4. Community & Support
    • FAQs
    • Comparison with Other Rollups
    • Micro-Grants
    • Community Resources
    • Brand Kit
Powered by GitBook
On this page
  • Basic Minting Formula
  • Calldata Gas Usage
  • Dynamic Adjustment
  • Halving Period
  • L1 Contract-initiated Facet Transactions
  1. 3. Technical Details
  2. Facet's Gas Mechanism

FCT Issuance Calculation

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.

Basic Minting Formula

At the core of FCT issuance is the relationship between Ethereum L1 gas consumption and a dynamic FCT mint rate. Specifically, the amount of FCT to be minted is determined by multiplying the transaction’s calldata size by a defined FCT mint rate:

fct minted=calldata gas used×mint rate\text{fct minted} = \text{calldata gas used} \times \text{mint rate} fct minted=calldata gas used×mint rate

Where:

  • calldata gas used: the total gas units consumed by the size of the Ethereum transaction's Facet payload (calldata)

  • mint rate: dynamically adjusted rate based on target issuance goals and past network usage

This approach ensures that FCT issuance scales in response to the amount of data processed, while maintaining stability of issuance through a dynamically adjusted mint rate (see adjustment factor below) inspired by Bitcoin’s adaptive difficulty model. Facet users can increase ether burn on calldata blockspace—similar to spending electricity in Bitcoin mining—to mint more FCT, with the protocol adjusting the mint rate to keep FCT supply predictable and aligned with network demand.

Calldata Gas Usage

The size (in bytes) of the Facet payload (calldata) directly determines the gas units consumed on Ethereum:

  • Zero Bytes: Each zero byte in the calldata costs 4 gas units.

  • Non-Zero Bytes: Each non-zero byte in the calldata costs 16 gas units.

Thus, the total calldata gas used is calculated as follows:

calldata_gas_used=(Zero Bytes×4)+(Non-Zero Bytes×16)\text{calldata\_gas\_used} = (\text{Zero Bytes} \times 4) + (\text{Non-Zero Bytes} \times 16) calldata_gas_used=(Zero Bytes×4)+(Non-Zero Bytes×16)

Dynamic Adjustment

The initial mint rate starts at 800,000 gwei (FCT) and dynamically updates every 10,000 Facet blocks (~1.4 days)—known as the adjustment period. The adjustment factor is calculated as:

adjustment factor=target FCT in new adjustment periodactual FCT minted in prior adjustment period\text{adjustment factor} = \frac{\text{target FCT in new adjustment period}}{\text{actual FCT minted in prior adjustment period}} adjustment factor=actual FCT minted in prior adjustment periodtarget FCT in new adjustment period​

Facet targets an average issuance of 40 FCT per block, or 400K FCT per adjustment period. Thus, the new mint rate at the onset of a new adjustment period is calculated as:

new mint rate=adjustment factor×prior mint rate\text{new mint rate} = \text{adjustment factor} \times \text{prior mint rate} new mint rate=adjustment factor×prior mint rate

The new mint rate is constrained by upper/lower bounds as follows to ensure it does not increase or decrease too rapidly:

  • Upper Bound Constraint: new mint rate cannot exceed the lesser of:

    • max mint rate of 10,000,000 gwei, or

    • 2✕ prior mint rate

  • Lower Bound Contstraint: new mint rate must be greater than or equal to 0.5✕ prior mint rate

It’s important to note the mint rate remains constant from block-to-block within an adjustment period, only adjusting at the onset of a new adjustment period (i.e., every ~1.4 days). If 0 FCT is minted during an entire adjustment period, the new mint rate is the lesser of 2✕ prior mint rate and the max mint rate of (10,000,000 gwei).

Halving Period

To regulate the total supply, the target FCT per adjustment period undergoes annual halvings (every 2,630,000 blocks), reducing the mint rate by half. This mechanism serves to de-risk early adoption by issuing more FCT in the earlier years.

L1 Contract-initiated Facet Transactions

event_data_cost=data_bytes×8\text{event\_data\_cost} = \text{data\_bytes} \times 8event_data_cost=data_bytes×8

Thus, L1 smart contracts can also accumulate FCT passively simply by deploying functionality on Facet.

PreviousFacet's Gas MechanismNextFCT Gas Fee Calculation

Last updated 5 months ago

Facet transactions are also issued FCT, but instead of using calldata gas units, the protocol uses event data gas units:

created by L1 Smart Contracts