FeeRateSet
Event v290 → current #0Emitted when the swap fee rate is updated for a subnet 's liquidity pool.
View events on chainUseful for: subnet ownersstakersdevelopersanalytics
The Big Picture
Fee rates determine LP earnings per swap. Changes affect yield projections.
Use Cases
- Track fee parameter changes
- Update yield calculations
- Monitor governance actions
From Chain Metadata
Event emitted when the fee rate has been updated for a subnet
Triggers
Emitted by
Preconditions
- Admin/sudo call succeeded
- Subnet exists
- Fee rate within MaxFeeRate
Effects
Storage Modified
Postconditions
- FeeRate storage updated
- All future swaps use new fee
Side Effects
- May affect LP returns
Event Data
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);
// Subscribe to FeeRateSet events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.Swap.FeeRateSet.get(block.hash);
for (const evt of events) {
console.log("FeeRateSet:", evt.payload);
}
});Runtime Info
View Source- Pallet Index
- 28
- Event Index
- 0
- First Version
- v290
- Current Version
- v411