Caps the fee rate that can be set via set_fee_rate.
Current Value
10000Relevant 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 { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Query MaxFeeRate constant
const value = api.consts[stringCamelCase("Swap")][stringCamelCase("MaxFeeRate")];
console.log("MaxFeeRate:", value.toHuman());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
- v393