Bifrost Liquid Staking Parachain RPC Guide
Bifrost RPC
With Dwellir, you get access to our global Bifrost network which always routes your API requests to the nearest available location, ensuring low latency and the fastest speeds.
Why Build on Bifrost?β
Bifrost is Polkadot's liquid staking hub, issuing omni-chain vTokens that unlock staking liquidity while keeping rewards flowing. Builders target Bifrost because it delivers:
π Omni-Chain Liquidity Routingβ
- Staking Liquidity Protocol (SLP) mints yield-bearing vTokens (vDOT, vKSM, vETH, vFIL) that stay composable across parachains and EVM networks.
- Slot Auction Liquidity Protocol (SALP) releases DOT/KSM crowdloan positions into tradable derivatives, letting users support auctions without sacrificing liquidity.
- Liquid staking primitives integrate with major DeFi venues (Pendle, Loop Stake, Talisman, etc.) to optimize leverage and hedging strategies.
βοΈ Protocol-Neutral Architectureβ
- Dedicated pallets for cross-chain execution (ISMP, CrossInOut, Hyperbridge) make it easy to bridge liquidity between Polkadot, Kusama, and external EVMs.
- Governance and fee-share pallets align collators, liquidity providers, and derivative users through on-chain revenue distribution.
- Runtime upgrades (v0.21.1 / specVersion 21001) focus on async backing, Hyperbridge routes, and tokenomics 2.0 for sustained reward flows.
π Battle-Tested Operationsβ
- Active collator set with ~6 s block time keeps derivatives in sync with relay-chain finality.
- Proven SALP campaigns unlock DOT crowdloans while maintaining reward accrual.
- Continuous grant support and ecosystem partnerships accelerate tooling and collateral adoption.
Quick Start with Bifrostβ
Connect to mainnet or the Kusama canary network in seconds using Dwellir-managed infrastructure.
π RPC Endpoints
Quick Connect:
curl -X POST https://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
The Kusama deployment (Para ID 2001) runs identical pallets ahead of Polkadot releases. Use it for SALP dry-runs, Hyperbridge testing, and upgrade rehearsals before promoting to mainnet Para ID 2030.
Installation & Setupβ
- cURL
- JavaScript (polkadot.js)
- Rust (subxt)
- Python (py-substrate-interface)
curl https://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "chain_getHeader",
"params": []
}'
Expected output (captured 2025-10-03):
{
"jsonrpc": "2.0",
"result": {
"number": "0x9055f2",
"hash": "0xd4b3a0e3b88b7c25215926bbf7c733f5c31e69c0c8c4b4a86d6ec3f3f086e95d",
"parentHash": "0x65b246e9b69a61f842104a15307ae906013c56a8bb6c942555b1a71424b4bab3",
"stateRoot": "0x220ea5bd35df99176268d8cbcee287a8a81a2e8addfa764661f71af591db0329",
"extrinsicsRoot": "0x388e5e2bb951b1dfac3f6a3f0c1d5de1ace6e413008efe48f1a54228dcd049db"
},
"id": 1
}
import { ApiPromise, WsProvider } from '@polkadot/api';
async function main() {
const provider = new WsProvider('wss://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY');
const api = await ApiPromise.create({ provider });
const [chain, nodeName, nodeVersion, runtime] = await Promise.all([
api.rpc.system.chain(),
api.rpc.system.name(),
api.rpc.system.version(),
api.rpc.state.getRuntimeVersion()
]);
console.log(`Connected to ${chain.toString()} via ${nodeName.toString()} ${nodeVersion.toString()}`);
console.log(`Runtime specVersion=${runtime.specVersion.toNumber()} transactionVersion=${runtime.transactionVersion.toNumber()}`);
const header = await api.rpc.chain.getHeader();
console.log(`Latest head #${header.number.toString()} (${header.hash.toHex()})`);
await api.disconnect();
}
main().catch(console.error);
use subxt::{config::substrate::SubstrateConfig, OnlineClient};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api = OnlineClient::<SubstrateConfig>::from_url(
"wss://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY"
).await?;
let latest = api.rpc().header(None).await?.expect("header");
println!("Finalized block #{}", latest.number);
println!("State root {}", latest.state_root);
Ok(())
}
from substrateinterface import SubstrateInterface
substrate = SubstrateInterface(
url="wss://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY",
type_registry_preset="substrate-node-template"
)
latest_hash = substrate.get_chain_head()
print("Latest head:", latest_hash)
runtime = substrate.get_runtime_version()
print("specVersion:", runtime['specVersion'], "transactionVersion:", runtime['transactionVersion'])
account_info = substrate.query(
module='System',
storage_function='Account',
params=['15mYsj6DpBno58jRoV5HCTiVPFBuWhDLdsWtq3LxwZrfaTEZ']
)
print("Collator free balance:", account_info.value['data']['free'])
Substrate JSON-RPC API Referenceβ
Core Method Shortlistβ
Group | Purpose | Key Methods |
---|---|---|
system_* | Node health, metadata, peer status | system_health , system_version , system_properties |
chain_* | Headers, blocks, finality tracking | chain_getHeader , chain_getBlock , chain_subscribeNewHeads |
state_* | Storage queries and runtime metadata | state_getStorage , state_getKeysPaged , state_getMetadata |
author_* | Extrinsic submission pipeline | author_submitExtrinsic , author_pendingExtrinsics |
grandpa_* | Finality gadget insights | grandpa_roundState |
rpc_methods | Discover supported namespaces | rpc_methods |
Network Informationβ
Parameter | Bifrost (Polkadot Mainnet) | Bifrost (Kusama Canary) |
---|---|---|
Relay Chain | Polkadot | Kusama |
Parachain ID | 2030 | 2001 |
Genesis Hash | 0x262e1b2ad728475fd6fe88e62d34c200abe6fd693931ddad144059b1eb884e5b | 0x9f28c6a68e0fc9646eff64935684f6eeeece527e37bbe1f213d22caa1d9d6bed |
Runtime (2025-10-03) | specVersion 21001 , transactionVersion 1 | specVersion 19000 , transactionVersion 1 |
Unit Symbol | BNC | BNC |
Decimals | 12 | 12 |
SS58 Prefix | 6 | 6 |
Explorer | bifrost.subscan.io | bifrost-kusama.subscan.io |
Average Block Time | ~6 seconds | ~6 seconds |
Additional facts:
- Collator rotation maintains >16 active authors with refTime utilization under 0.5% per block.
- The runtime exposes specialized pallets including
Hyperbridge
,FlexibleFee
,Farming
, andIsmp
for cross-ecosystem liquidity orchestration.
Common Integration Patternsβ
Real-Time Block Streamingβ
import { ApiPromise, WsProvider } from '@polkadot/api';
const provider = new WsProvider('wss://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY');
const api = await ApiPromise.create({ provider });
api.rpc.chain.subscribeNewHeads((header) => {
console.log(`New Bifrost block #${header.number.toString()} (${header.hash.toHex()})`);
});
Query Staking Liquidity Positionsβ
# Read total issuance for vDOT (AssetRegistry + Tokens pallet)
curl https://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"id":42,
"method":"state_getStorage",
"params":[
"0x1bd4a27d04bdb9c3f135c3b09677626d26c37dd72647d0f2788a3341e9ac1371"
]
}'
Estimate Fees for SALP Transfersβ
const api = await ApiPromise.create({ provider: new WsProvider('wss://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY') });
const tx = api.tx.crossInOut.swapExactAssetsForAssets(
/* asset_in */ { Xcm: { V3: { parents: 1, interior: 'Here' } } },
/* asset_out */ { Token: 'BNC' },
/* amount */ 1_000_000_000_000n,
/* min_receive */ 990_000_000_000n
);
const info = await api.rpc.payment.queryInfo(tx.toHex());
console.log(`Partial fee: ${info.partialFee.toHuman()}`);
console.log(`Weight: ${info.weight.refTime.toString()} refTime`);
Performance Best Practicesβ
- Prefer WebSocket endpoints for subscriptions and long-lived queries; use HTTPS for bursty read-only workloads.
- Cache runtime metadata and type registries keyed by
specVersion
(Polkadot21001
, Kusama19000
as of 2025-10-03) to avoid repeated handshakes. - Use
state_getKeysPaged
with sized pages (<1024 keys) when scanning liquidity pools or reward ledgers. - Pin to finalized heads for settlement-critical reads; leverage
chain_getFinalizedHead
before fetching block data. - Implement jittered reconnect backoff (250 ms β 8 s) to respect Dwellir rate limiting during failover events.
Troubleshootingβ
Symptom | Likely Cause | Resolution |
---|---|---|
1010: Invalid Transaction when submitting vToken extrinsics | Runtime upgrade bumped specVersion /transactionVersion | Refresh metadata, rebuild the payload, and resubmit with the updated version info |
Invalid SS58 address errors | Using Polkadot prefix (0 ) for Bifrost accounts | Re-derive addresses with SS58 prefix 6 before signing or decoding |
TypeError: Cannot decode storage | Missing custom pallets (Hyperbridge, FlexibleFee) in type registry | Extend your type bundle with the latest Bifrost runtime metadata |
Persistent WebSocket disconnects | Idle connection without keep-alives | Send periodic heartbeats (e.g., rpc_methods ) or enable WsProvider autoConnect |
Authoring not allowed for account on collator nodes | Rotate keys not submitted after upgrade | Call author_rotateKeys and parachainStaking.setKeys on the canary network, then on mainnet |
Smoke Testsβ
Run these checks before pushing to production:
-
Node health
curl https://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"system_health","params":[]}'Verify
isSyncing
isfalse
and peer count stays above 8. -
Latest header increments
curl https://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"chain_getHeader","params":[]}'Confirm block numbers advance ~every 6 seconds (e.g., #9,053,714 at 2025-10-03 07:42:18 UTC).
-
Account snapshot
curl https://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":3,"method":"state_getStorage","params":["0x26aa394eea5630e07c48ae0c9558cef7f0d3720dbb6f7b3bb82b41c16dbf8d0887f21b38c918a1962fa4273d0f3c2c23244cc25f029aba80a72f1ac277957bc4"]}'Decode the SCALE payload to check BNC balances (collator
15mYsj6β¦TEZ
shows active staking reserves).
Migration Guide (Polkadot/Westend β Bifrost)β
- Endpoints: Swap legacy Polkadot URLs for
https://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY
. Use the Kusama canary endpoint for staging. - Address encoding: Update wallets and services to SS58 prefix
6
for Bifrost accounts. - Metadata: Refresh runtime metadata whenever
specVersion
changes (currently21001
on Polkadot,19000
on Kusama). Update custom pallets (Hyperbridge, FlexibleFee, SALP) in your type registry. - Fee estimation: Run
payment_queryInfo
for vToken transfers; Bifrostβs flexible-fee pallet introduces dynamic surcharge multipliers. - Pallet coverage: Check
rpc_methods
after upgrades to discover newbifrost_*
runtime APIs (e.g., omnipool analytics, Hyperbridge routing).
Resources & Toolsβ
- Bifrost network explorer β bifrost.subscan.io
- Bifrost GitHub releases and runtime notes β github.com/bifrost-io/bifrost/releases
- Dwellir Dashboard β dashboard.dwellir.com/register
- Community updates & integration stories β parachains.info/details/bifrost_finance_polkadot
Plan your integration, mint liquidity-backed vTokens, and rely on Dwellirβs globally distributed RPC edge to keep your Bifrost workloads online.