MaxFeeRate

Constant v290 → current u16

Caps the fee rate that can be set via set_fee_rate.

Current Value

10000
Relevant for: subnet ownersdevelopersstakers

The Big Picture

Prevents excessive fees. Fee rate is normalized to u16::MAX, so this limits the percentage.

From Chain Metadata

The maximum fee rate that can be set

Use Cases

  • Validate fee rate before setting
  • Understand fee bounds

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 MaxFeeRate constant
const value = await api.constants.Swap.MaxFeeRate();
console.log("MaxFeeRate:", value);

Type Information

Type
u16
Byte Size
2 bytes
Encoding
fixed
Raw Hex
0x1027

Runtime Info

Pallet
Swap
First Version
v290
Latest Version
v290
Current Runtime
v411