Note
Terra Classic extends the Cosmos SDK x/authCopy x/auth module with a custom ante-handler pipeline that integrates burn tax, treasury splits, and wasm fees. This document focuses on Classic-specific behaviour and current defaults.
Overview
x/authCopy x/auth is responsible for account state, signature and sequence checks, fee deduction, and ante-handler orchestration. Classic keeps legacy account types (continuous vesting, periodic vesting, delayed vesting) to preserve historical balances, but no new vesting grants are minted through this module today.
Key behaviours:
- Custom ante pipeline: custom/auth/anteCopy custom/auth/ante wires additional decorators that enforce burn tax via the x/taxCopy x/tax keeper, share fees with treasury, and guard against memo spamming, minimum initial deposits, and IBC flood attacks.
- Tax integration: FilterMsgAndComputeTax()Copy FilterMsgAndComputeTax() (see custom/auth/ante/fee_tax.goCopy custom/auth/ante/fee_tax.go) inspects messages to compute burn taxes using x/treasuryCopy x/treasury, x/taxCopy x/tax, and x/taxexemptionCopy x/taxexemption. Bank transfers, MsgSwapSendCopy MsgSwapSend, and wasm fund movements participate in burn tax unless exempt.
- Fee distribution: After fees are charged, decorators split amounts between fee_collectorCopy fee_collector and treasury burn module according to x/treasuryCopy x/treasury parameters.
- Account management: The module still exposes the standard APIs for accounts, sequences, and sign mode handling. Classic uses the proto-based TxConfigCopy TxConfig from Cosmos SDK v0.47.
Ante flow summary
- SetUpContextDecorator – initialise gas meter with block gas limit.
- TxPriorityDecorator – prioritise oracle vote/prevote traffic to protect consensus-critical messages.
- MinimumFeesDecorator – require gas_price ≥ min_gas_priceCopy gas_price ≥ min_gas_price unless the transaction belongs to a burn-tax exempt address list.
- TaxFeeDecorator / BurnTaxFeeDecorator – compute burn tax, collect it via x/taxCopy x/tax, and forward the residual fee to the fee collector.
- ValidateMemoDecorator – enforce memo length (MaxMemoCharactersCopy MaxMemoCharacters) and block banned prefixes (anti-phishing memo filters).
- SigVerification – enforce signer and signature cost limits.
- Post handler – Classic also registers a post-handler (custom/auth/postCopy custom/auth/post) to finalise taxes after execution.
See custom/auth/ante/handler.goCopy custom/auth/ante/handler.go for the complete decorator chain.
Accounts and vesting
- Base accounts leverage Cosmos SDK BaseAccountCopy BaseAccount.
- Legacy vesting accounts (DelayedVestingAccountCopy DelayedVestingAccount, ContinuousVestingAccountCopy ContinuousVestingAccount, PeriodicVestingAccountCopy PeriodicVestingAccount) are retained for historical compatibility. The chain does not mint new vesting schedules, but governance can migrate or claw back existing ones via custom proposals.
Parameters
Subspace: authCopy auth
| Name | Description | Type | Default |
|---|---|---|---|
| MaxMemoCharactersCopy MaxMemoCharacters | Maximum memo length per transaction. Enforced by ValidateMemoDecoratorCopy ValidateMemoDecorator. | uint64Copy uint64 | 256Copy 256 |
| TxSigLimitCopy TxSigLimit | Maximum number of signatures permitted on a single tx. Protects ante verification cost. | uint64Copy uint64 | 7Copy 7 |
| TxSizeCostPerByteCopy TxSizeCostPerByte | Gas multiplier applied to raw tx byte size. | uint64Copy uint64 | 10Copy 10 |
| SigVerifyCostED25519Copy SigVerifyCostED25519 | Gas charged per Ed25519 signature verification. | uint64Copy uint64 | 590Copy 590 |
| SigVerifyCostSecp256k1Copy SigVerifyCostSecp256k1 | Gas charged per secp256k1 signature verification. | uint64Copy uint64 | 1000Copy 1000 |
TxSigLimitCopy TxSigLimit differs from the historical Terra limit (100) and remains aligned with Cosmos SDK v0.47 defaults.
CLI and SDK notes
- Use terrad tx ... --feesCopy terrad tx ... --fees or --gas-pricesCopy --gas-prices to satisfy minimum fee requirements; transactions without adequate fees are rejected before message execution.
- Burn tax is deducted automatically; clients should not pre-deduct taxes from send amounts.