For the complete documentation index, see llms.txt. This page is also available as Markdown.

Fee Calculation

TriggerGas (TG) is the standard unit for calculating computational and resource costs in the TriggerX platform. It is the basis for determining task fees, operator rewards, and developer/operator points. This document explains the formulas, parameters, and processes for these calculations.

TriggerGas Allocation

TriggerGas is calculated based on the following components:

1. Execution Time

  • Rate: 2 TG per second

  • Formula:

Execution Time TG=Execution Time (seconds)×2\text{Execution Time TG} = \text{Execution Time (seconds)} \times 2

2. Memory Usage

  • Rate: 1 TG per 128 MB

  • Formula:

Memory Usage TG=Memory Usage (MB)128×1\text{Memory Usage TG} = \frac{\text{Memory Usage (MB)}}{128} \times 1

3. Static Complexity

  • Rate: 1 TG per 1024 KB

  • Formula:

StaticComplexityTG=Static Complexity Size (KB)1024×1{Static Complexity TG} = \frac{\text{Static Complexity Size (KB)}}{1024} \times 1

4. Transaction Simulation

  • Rate: 1 TG per task

  • Formula:

Transaction Simulation TG=1\text{Transaction Simulation TG} = 1

5. Fixed Cost

  • Rate: 1 TG per task

  • Formula:

Fixed Cost TG=1\text{Fixed Cost TG}=1

Total TriggerGas Formula

The total TriggerGas (TG) for a task is calculated as:

Total TG=(Computation Cost)×(Network Scaling Factors)+2\text{Total TG} = (\text{Computation Cost}) \times (\text{Network Scaling Factors}) + 2

where,

Computation Cost:

(Execution Time×2)+(Memory Usage (MB)128×1)+(Static Complexity (KB)1024×1)(\text{Execution Time} \times 2) + \left( \frac{\text{Memory Usage (MB)}}{128} \times 1 \right) + \left( \frac{\text{Static Complexity (KB)}}{1024} \times 1 \right)

Network Scaling Factors:

1+Count of Validator Nodes1 + \text{Count of Validator Nodes}

Overhead Cost:

+2+2

Fee Calculation

Task fees are based on the total TriggerGas consumed and TriggerGas's unit price.

Formula

Fee (ETH)=Total TG×Price per TG \text{Fee (ETH)} = \text{Total TG} \times \text{Price per TG}
  • Price per TG: 0.0001 ETH

Note:

  • The ETH multiplier value will be determined after the testnet launch; here, Price Per TG is used as an example.

  • Users will receive TG on the testnet without needing ETH.

  • Instead of receiving ETH directly, operators will earn points during the testnet phase.

Last updated