Repository navigation
Fees
This page covers what an activity in the LayerX kernel is charged, in which unit, and where the figures are specified.
Each admitted activity pays one fee, computed by a deterministic integer function and capped by the fee_limit in its signed envelope. Wall-clock time is never an input. Normative rules: requirement 26 of spec/layerx-protocol/spec.kvx.
The committed schedule (lxp_fee_params) has these coefficients:
| Field | Prices |
|---|---|
base_fee |
Every activity |
per_activity_type_unit |
Activity type; Asset activities use a named flat price per ordinal instead |
per_encoded_byte |
Canonical encoded size |
per_execution_unit |
Metered execution |
per_storage_unit |
Metered storage |
multiplier_basis_points |
Multiplier on the total, rounded up |
Values are governance parameters (fee.base, fee.byte and so on). A change takes effect at a named activation epoch, so replay reproduces every past fee. lx_estimateFee neither reserves the fee nor proves execution. Versions and named prices: docs/wiki/Fees.md.
fee_limit and the fee are integers in the fee asset's base unit. The economics specification counts amounts in µUSDX (1 USDX = 1,000,000 µUSDX) and sets these defaults:
| Parameter | Default | Governance bounds |
|---|---|---|
Base fee LX_FEE_BASE
|
5,000 µUSDX | 1,000 to 100,000 |
| Congestion multiplier | 1x to 64x, recomputed each epoch from the previous epoch's load | ceiling at most 256x |
These are specification defaults; the committed schedule sets the charge. Source: economics.md, sections 3 and 11.
The fee is a 402LXP transfer from the actor's main account to the treasury account system:fees. Nothing else reduces a balance.
- Failed admission (for example an invalid signature, a non-next sequence or a balance below
fee_limit): no sequence consumed, no fee. - Admitted, then failed: the sequence is consumed, the fee is charged up to
fee_limit, module effects roll back, and a failure receipt is recorded. -
fee_chargednever exceedsfee_limit.
The economics specification empties system:fees at each epoch close: 3,000 basis points to sequencer compensation, 3,000 to the guarantor reward pot, 2,000 to system:insurance and 2,000 to the governance treasury.