Manage burn-tax exempt address lists for Classic.

x/taxexemptionCopy x/taxexemption lets Terra Classic governance define address “zones” that are exempt from the burn tax. Transactions remain taxable by default unless all participants satisfy the zone rules stored in this module.

Core concepts

  • Zones. Governance maintains named zones with boolean flags: incomingCopy incoming, outgoingCopy outgoing, and cross_zoneCopy cross_zone. These flags describe whether tax-free transfers are allowed into the zone, out of the zone, and across zones.
  • Assignments. Addresses can be assigned to at most one zone. The exemption check iterates every input/output pair and evaluates sender/recipient zones against the rules above.
  • Full-governance control. All mutations happen through governance messages (MsgAddTaxExemptionZoneCopy MsgAddTaxExemptionZone, MsgRemoveTaxExemptionZoneCopy MsgRemoveTaxExemptionZone, MsgModifyTaxExemptionZoneCopy MsgModifyTaxExemptionZone, MsgAddTaxExemptionAddressCopy MsgAddTaxExemptionAddress, MsgRemoveTaxExemptionAddressCopy MsgRemoveTaxExemptionAddress). No direct user tx bypasses governance safeguards.
  • Integration with x/taxCopy x/tax. The tax keeper calls IsExemptedFromTax()Copy IsExemptedFromTax() before deducting burn tax. If any participant fails the zone criteria, the entire transfer is taxed.

Exemption rules

A transfer is tax free only when every (sender, recipient) pair satisfies at least one of the following:

  • Sender and recipient share the same zone.
  • Sender’s zone has outgoingCopy outgoing and (recipient has no zoneCopy recipient has no zone or cross_zoneCopy cross_zone is true).
  • Recipient’s zone has incomingCopy incoming and (sender has no zoneCopy sender has no zone or cross_zoneCopy cross_zone is true).
  • Cross-zone transfer where either zone has cross_zoneCopy cross_zone set and permits the relevant direction.

If any recipient fails the rule set, the whole transaction is taxed.

State

Store keyDescription
ZonePrefixCopy ZonePrefixStores serialized zone definitions keyed by zone name.
AddressPrefixCopy AddressPrefixMaps Bech32 addresses to their assigned zone.

Parameters (subspaceCopy subspace: taxexemptionCopy taxexemption)

NameDescriptionClassic default
MaxZonesCopy MaxZonesUpper bound on simultaneously registered zones.100Copy 100
MaxAddressesCopy MaxAddressesMaximum total exempt addresses allowed.10000Copy 10000

Proposals that exceed these caps fail validation.

Governance workflow

  1. Draft a proposal containing one or more taxexemptionCopy taxexemption messages (e.g., add zones, update flags, add/remove addresses).
  2. Submit via terrad tx gov submit-proposal draft.jsonCopy terrad tx gov submit-proposal draft.json and deposit the required LUNC.
  3. Once passed, the keeper updates stores atomically; future transactions immediately honour the new exemption set.

Queries & CLI

  • Zones: terrad q taxexemption zonesCopy terrad q taxexemption zones
  • Zone addresses: terrad q taxexemption addresses <zone>Copy terrad q taxexemption addresses <zone>
  • Taxable check: terrad q taxexemption taxable <from> <to>Copy terrad q taxexemption taxable <from> <to>