1 stable release

28.0.0 Dec 28, 2025

#6 in #tune

Download history 20/week @ 2026-01-01 67/week @ 2026-01-08 78/week @ 2026-01-15 126/week @ 2026-01-22 198/week @ 2026-01-29 101/week @ 2026-02-05 62/week @ 2026-02-12 203/week @ 2026-02-19 111/week @ 2026-02-26 138/week @ 2026-03-05 193/week @ 2026-03-12 162/week @ 2026-03-19 118/week @ 2026-03-26

611 downloads per month
Used in 65 crates (14 directly)

Apache-2.0

3.5MB
46K SLoC

Transaction Payment Pezpallet

This pezpallet provides the basic logic needed to pay the absolute minimum amount needed for a transaction to be included. This includes:

  • base fee: This is the minimum amount a user pays for a transaction. It is declared as a base weight in the runtime and converted to a fee using WeightToFee.
  • weight fee: A fee proportional to amount of weight a transaction consumes.
  • length fee: A fee proportional to the encoded length of the transaction.
  • tip: An optional tip. Tip increases the priority of the transaction, giving it a higher chance to be included by the transaction queue.

The base fee and adjusted weight and length fees constitute the inclusion fee, which is the minimum fee for a transaction to be included in a block.

The formula of final fee:

inclusion_fee = base_fee + length_fee + [targeted_fee_adjustment * weight_fee];
final_fee = inclusion_fee + tip;
  • targeted_fee_adjustment: This is a multiplier that can tune the final fee based on the congestion of the network.

Additionally, this pezpallet allows one to configure:


Transaction Payment Pezpallet

This pezpallet provides the basic logic needed to pay the absolute minimum amount needed for a transaction to be included. This includes:

  • weight fee: A fee proportional to amount of weight a transaction consumes.
  • length fee: A fee proportional to the encoded length of the transaction.
  • tip: An optional tip. Tip increases the priority of the transaction, giving it a higher chance to be included by the transaction queue.

Additionally, this pezpallet allows one to configure:

  • The mapping between one unit of weight to one unit of fee via Config::WeightToFee.
  • A means of updating the fee for the next block, via defining a multiplier, based on the final state of the chain at the end of the previous block. This can be configured via Config::FeeMultiplierUpdate

License: Apache-2.0

Dependencies

~28–52MB
~769K SLoC