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
- Total gas =
m_gas_amount + i_gas_amount - Burn amount =
total_gas * burn_bps / 10000 - Distribution amount =
total_gas - burn_amount - Each recipient gets
distribution_amount * percentage / 100 - Burns are executed via CPI to the SPL Token
Burninstruction - Distributions are executed via CPI to the SPL Token
Transferinstruction
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
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=8b4c7e6431e9a6af1ef23b77bb4ff5fd)
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=d5651a45e4bfbabc33f74e146af3f94a)