TriggerX Docs
  • Introduction
    • What is TriggerX?
    • Key Features
  • Core Concepts
    • Architecture
    • Triggers in TriggerX
      • Time-Based Trigger
      • Event-Based Trigger
      • Condition-Based Trigger
    • Task Manager
    • Keepers
      • Keeper as Performer
      • Keeper as Attester
    • Aggregator
    • Network Monitoring
    • Contracts
      • AVS Governance
      • Attestation Center
  • Getting Started as Keepers
  • Monitoring And Analytics
    • Monitor Your Keeper
    • Monitor Your Job
  • Rewards
    • Keeper Rewards
    • Developer Rewards
    • Contributor Rewards
  • Fee Calculation
  • Guide
    • Templates
    • Usecases
  • Security Model
  • Community and Support
  • Appendices
    • Glossary
    • FAQ and Troubleshooting
    • Changelogs
  • References
  • Create Your First Job
    • Create Your First Time Based Job
    • Create Your First Event Based Job
Powered by GitBook
On this page
  • TriggerGas Allocation
  • Total TriggerGas Formula
  • Computation Cost:
  • Network Scaling Factors:
  • Overhead Cost:
  • Fee Calculation
  • Formula
  • Note:

Fee Calculation

PreviousContributor RewardsNextTemplates

Last updated 2 months ago

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 2Execution Time TG=Execution Time (seconds)×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 1Memory Usage TG=128Memory Usage (MB)​×1

3. Static Complexity

  • Rate: 1 TG per 1024 KB

  • Formula:

4. Transaction Simulation

  • Rate: 1 TG per task

  • Formula:

5. Fixed Cost

  • Rate: 1 TG per task

  • Formula:

Total TriggerGas Formula

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

where,

Computation Cost:

Network Scaling Factors:

Overhead Cost:

Fee Calculation

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

Formula

  • 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.

StaticComplexityTG=Static Complexity Size (KB)1024×1{Static Complexity TG} = \frac{\text{Static Complexity Size (KB)}}{1024} \times 1StaticComplexityTG=1024Static Complexity Size (KB)​×1
Transaction Simulation TG=1\text{Transaction Simulation TG} = 1Transaction Simulation TG=1
Fixed Cost TG=1\text{Fixed Cost TG}=1Fixed Cost TG=1
Total TG=(Computation Cost)×(Network Scaling Factors)+2\text{Total TG} = (\text{Computation Cost}) \times (\text{Network Scaling Factors}) + 2Total TG=(Computation Cost)×(Network Scaling Factors)+2

(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) (Execution Time×2)+(128Memory Usage (MB)​×1)+(1024Static Complexity (KB)​×1)

1+Count of Validator Nodes1 + \text{Count of Validator Nodes} 1+Count of Validator Nodes
+2+2+2
Fee (ETH)=Total TG×Price per TG \text{Fee (ETH)} = \text{Total TG} \times \text{Price per TG}Fee (ETH)=Total TG×Price per TG