Skip to main content
The gas_utils program handles LUCID token collection for gas fees. It burns a configurable portion of tokens and distributes the remainder to specified recipients on-chain. Program ID (devnet): EzuUhxtNAz1eRfAPypm6eAepe8fRQBrBPSo4Qcp1w3hm

Instructions

collect_and_split

The primary instruction. Takes iGas (per-inference) and mGas (per-epoch-root) amounts, burns a percentage, and distributes the remainder to recipients proportionally.

Parameters

RecipientShare

Percentages across all recipients must sum to exactly 100. Maximum 10 recipients.

How It Works

  1. Total gas = m_gas_amount + i_gas_amount
  2. Burn amount = total_gas * burn_bps / 10000
  3. Distribution amount = total_gas - burn_amount
  4. Each recipient gets distribution_amount * percentage / 100
  5. Burns are executed via CPI to the SPL Token Burn instruction
  6. Distributions are executed via CPI to the SPL Token Transfer instruction

Accounts

Validation

  • Recipient token accounts are validated against declared recipient pubkeys
  • Recipient token accounts must use the same LUCID mint
  • User ATA mint must match the provided LUCID mint

Gas Fee Schedule

Events

Errors