NextFeeMultiplier

Storage Plain v101 → v411

Dynamic fee multiplier that adjusts based on network congestion.

Explore chain
Queried by: developersanalyticswalletsexchanges

The Big Picture

Bittensor uses dynamic fee adjustment to manage network load. When blocks are heavily utilized, NextFeeMultiplier increases, making transactions more expensive and reducing demand. When blocks are underutilized, it decreases, making transactions cheaper. This creates a market-based mechanism for allocating limited block space. The multiplier is a FixedU128, typically hovering around 1.0 (no adjustment) but can vary significantly during congestion.

Why This Matters

Want to know if now is a cheap or expensive time to transact? This multiplier tells you. Values above 1.0 mean congestion (higher fees), below 1.0 means slack (lower fees). Plan your transactions accordingly.

Example Scenario

Query NextFeeMultiplier() returns 1.2 (as FixedU128). This means fees are 20% higher than baseline due to recent high block utilization. If you can wait, fees may drop as congestion clears.

Common Questions

How fast does the multiplier change?
It adjusts each block based on the previous block's weight utilization. Changes are gradual - it won't spike dramatically from one block to the next.
What's a typical range?
Usually 0.5 to 2.0 under normal conditions. Extreme congestion could push it higher. The multiplier has minimum and maximum bounds set in the runtime.
How do I use this for fee estimation?
Multiply the base fee (from weight) by this multiplier, then add length fee and any tip. Most SDKs handle this automatically in their fee estimation.
Does this affect all transactions equally?
Yes, it scales all weight-based fees. Operational extrinsics (like set_weights) may have additional priority through OperationalFeeMultiplier, but this base multiplier applies to all.

Use Cases

  • Estimate accurate transaction fees before submission
  • Build dynamic fee calculators in wallet applications
  • Analyze network congestion patterns over time
  • Optimize transaction timing for lower fees
  • Build fee prediction models for users

Purpose & Usage

Purpose

Scales transaction fees up or down based on block utilization to manage network load.

Common Query Patterns

  • Query current multiplier for fee estimation
  • Track multiplier changes over time for analytics

Stored Value

Dynamic fee multiplier (FixedU128, ~1.0 baseline)

Decoding the value

FixedU128 (Q64.64 fixed-point)

FixedU128 encodes as Q64.64: raw bits divided by 2^64 gives the rational. Magnitude > 0 means non-zero.

const fraction = Number(value as bigint) / 2 ** 64;

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Query NextFeeMultiplier storage (no keys - plain value)
const result = await api.query.TransactionPayment.NextFeeMultiplier.getValue();
console.log("NextFeeMultiplier:", result);

Version History

v101 block 1 Added
v120 block 315,568 Internal re-bind
v123 block 720,235 Internal re-bind
v128–v132 · runtime versions skipped on chain (never deployed)
v133 block 1,404,224 Internal re-bind
v136 block 1,756,781 Internal re-bind
v138 block 1,907,363 Internal re-bind
v140 block 1,929,216 Internal re-bind
v149 block 3,014,339 Internal re-bind
v154 block 3,308,611 Internal re-bind
v166–v194 · runtime versions skipped on chain (never deployed)
v195 block 3,791,350 Internal re-bind
v207–v209 · runtime versions skipped on chain (never deployed)
v210 block 4,345,556 Internal re-bind
v213–v215 · runtime versions skipped on chain (never deployed)
v216 block 4,510,996 Internal re-bind
v235–v237 · runtime versions skipped on chain (never deployed)
v238 block 4,936,550 Internal re-bind
v266–v272 · runtime versions skipped on chain (never deployed)
v273 block 5,659,032 Internal re-bind
v278–v289 · runtime versions skipped on chain (never deployed)
v290 block 5,947,548 Internal re-bind
v307–v314 · runtime versions skipped on chain (never deployed)
v315 block 6,414,634 Internal re-bind
v316–v319 · runtime versions skipped on chain (never deployed)
v320 block 6,523,566 Internal re-bind
v327–v333 · runtime versions skipped on chain (never deployed)
v334 block 6,811,690 Internal re-bind
v353–v360 · runtime versions skipped on chain (never deployed)
v361 block 7,063,679 Internal re-bind
v386–v390 · runtime versions skipped on chain (never deployed)
v391 block 7,782,857 Internal re-bind
v394–v400 · runtime versions skipped on chain (never deployed)
v401 block 8,036,576 Internal re-bind Current

Runtime Info

Pallet
TransactionPayment
Storage Kind
Plain
First Version
v101
Current Version
v411