Burn tax collection, splits, and effective gas price handling.

x/taxCopy x/tax powers Terra Classic’s burn-tax and gas price floor. It intercepts fee payment, deducts the configured burn rate, and routes proceeds between burn, oracle, and community pools while exposing governance control over rates and gas price suggestions.

Classic behaviour

  • Reverse-charge context. The ante handler tags transactions that should pay burn tax. Keeper.DeductTax()Copy Keeper.DeductTax() exits early unless the reverse-charge flag is set, preventing duplicate deductions inside multi-message txs.
  • Burn tax calculation. ComputeTax()Copy ComputeTax() multiplies each spend coin by BurnTaxRateCopy BurnTaxRate and truncates to integers. Zero results simply skip deduction.
  • Processing splits. ProcessTaxSplits()Copy ProcessTaxSplits() fetches Treasury-owned weights (GetBurnSplitRateCopy GetBurnSplitRate, GetOracleSplitRateCopy GetOracleSplitRate) and distribution community tax, splitting the collected tax into:
    • Burn portion sent to treasurytypes.BurnModuleNameCopy treasurytypes.BurnModuleName for permanent removal.
    • Oracle portion sent to oracleCopy oracle module account (funds oracle rewards).
    • Community portion transferred to distributionCopy distribution and added to the community pool.
  • Recording proceeds. The remaining tax (after splits) plus metadata is recorded via treasuryKeeper.RecordEpochTaxProceeds()Copy treasuryKeeper.RecordEpochTaxProceeds() so treasury epoch logic can account for total burns.
  • Gas price floor. GetEffectiveGasPrices()Copy GetEffectiveGasPrices() compares the gov-controlled GasPricesCopy GasPrices list with Ctx.MinGasPrices()Copy Ctx.MinGasPrices() and enforces the max of each denom. RPC operators sometimes set minimum-gas-prices=0ulunaCopy minimum-gas-prices=0uluna, so the tax module’s values become the network-wide floor.

Parameters (subspaceCopy subspace: taxCopy tax)

NameDescriptionClassic default
GasPricesCopy GasPricesRecommended minimum gas prices per denom.Multiple dec-coins (e.g., 0.028325ulunaCopy 0.028325uluna, 0.0075uusdCopy 0.0075uusd).
BurnTaxRateCopy BurnTaxRateFraction of each taxable transfer burned (and split downstream).0.002500000000000000Copy 0.002500000000000000 (0.25%).

Governance can update these parameters through MsgUpdateParamsCopy MsgUpdateParams proposals routed to x/govCopy x/gov.

Queries & CLI

  • Parameters: terrad q tax paramsCopy terrad q tax params
  • Gas price floor: terrad q tax gas-pricesCopy terrad q tax gas-prices
  • Simulate tax: terrad q tax estimate <amount>Copy terrad q tax estimate <amount> (custom CLI helper).
  • Update params (gov proposal): terrad tx gov submit-proposal tax-update-params ...Copy terrad tx gov submit-proposal tax-update-params ...