Gnosis Chain RPC: A Developer's Guide to the Community-Owned EVM Chain
Gnosis Chain is one of the oldest and most resilient EVM chains in production. Originally launched as xDai in 2018, it was one of the first chains to use stablecoins for gas fees — a design choice that made transaction costs predictable and user-friendly. Today, it runs on a dual-token model: xDAI (a DAI-bridged stablecoin) for gas, and GNO for consensus and governance.
If you're building on Gnosis Chain, everything you know about Ethereum applies. It's EVM-compatible, uses the same tooling, and supports the same RPC methods. The differences are in the economics (stable gas fees), the consensus mechanism (Gnosis Proof-of-Stake), and the bridge architecture (the OmniBridge for DAI transfers).
This is the practical reference for connecting to Gnosis Chain via JSON-RPC.
The essentials
Gnosis Chain mainnet has:
- Chain ID: 100 (0x64)
- Block time: ~5 seconds
- Gas token: xDAI (1:1 with DAI, bridged from Ethereum)
- Consensus token: GNO (for staking and governance)
- Consensus: Gnosis Proof-of-Stake (GPOS)
- Finality: ~5 minutes (finalized blocks)
- Type: EVM-compatible sidechain
The stablecoin gas model is Gnosis Chain's defining feature. While Ethereum gas prices fluctuate with network demand (sometimes spiking to $50+ per transaction), Gnosis Chain gas costs remain predictable — typically $0.001-$0.01 per transaction, paid in xDAI.
Connecting: the setup
curl
# Chain ID
curl -s -X POST https://rpc.swiftnodes.io/rpc/gnosis?key=YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
# -> {"jsonrpc":"2.0","id":1,"result":"0x64"}
# Latest block
curl -s -X POST https://rpc.swiftnodes.io/rpc/gnosis?key=YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
# xDAI balance
curl -s -X POST https://rpc.swiftnodes.io/rpc/gnosis?key=YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xADDRESS","latest"],"id":1}'
viem
import { createPublicClient, http } from 'viem';
import { gnosis } from 'viem/chains';
const client = createPublicClient({
chain: gnosis,
transport: http('https://rpc.swiftnodes.io/rpc/gnosis?key=YOUR_API_KEY'),
});
const blockNumber = await client.getBlockNumber();
const balance = await client.getBalance({ address: '0x...' });
ethers v6
import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider(
'https://rpc.swiftnodes.io/rpc/gnosis?key=YOUR_API_KEY'
);
const blockNumber = await provider.getBlockNumber();
const balance = await provider.getBalance('0x...');
The dual-token model
Gnosis Chain uses two tokens with distinct roles:
| Token | Purpose | How to get it |
|---|---|---|
| xDAI | Gas fees, transactions | Bridge DAI from Ethereum via the OmniBridge |
| GNO | Staking, consensus, governance | Buy on exchanges, bridge from Ethereum |
xDAI: The stable gas token
xDAI is a 1:1 representation of DAI on Gnosis Chain. When you bridge DAI from Ethereum to Gnosis Chain, you receive xDAI. When you send transactions on Gnosis Chain, you pay gas in xDAI.
The bridge is trust-minimized: for every xDAI on Gnosis Chain, there's a corresponding DAI locked in the bridge contract on Ethereum. This means xDAI maintains its peg to $1 as long as the bridge is solvent.
// Check xDAI balance
const xdaiBalance = await provider.getBalance(address);
console.log(`xDAI: ${ethers.formatEther(xdaiBalance)}`);
// xDAI is the native token, so you send it like ETH on Ethereum
const tx = await signer.sendTransaction({
to: recipientAddress,
value: ethers.parseEther('1.0'), // 1 xDAI
});
GNO: The consensus token
GNO is used for staking and governance. Validators stake GNO to participate in consensus, and GNO holders can vote on protocol upgrades. Unlike xDAI, GNO is not used for gas fees.
// GNO token contract on Gnosis Chain
const GNO_ADDRESS = '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb';
const gnoContract = new ethers.Contract(
GNO_ADDRESS,
['function balanceOf(address) view returns (uint256)'],
provider
);
const gnoBalance = await gnoContract.balanceOf(address);
console.log(`GNO: ${ethers.formatUnits(gnoBalance, 18)}`);
What's the same as Ethereum
Gnosis Chain is EVM-compatible, so most Ethereum tooling works out of the box:
| Feature | Status |
|---|---|
| All standard JSON-RPC methods | ✓ Identical |
| Contract deployment (CREATE/CREATE2) | ✓ Identical |
| EVM opcodes | ✓ Identical |
| ABI encoding/decoding | ✓ Identical |
| Transaction signing (secp256k1) | ✓ Identical |
| ERC-20, ERC-721, ERC-1155 | ✓ Deploy without changes |
| Hardhat, Foundry, viem, ethers | ✓ Work identically |
The only differences are:
- Chain ID is 100 (not 1)
- Gas is paid in xDAI (not ETH)
- Block time is ~5 seconds (not ~12 seconds)
What's different from Ethereum
Gas is stable and cheap
Gnosis Chain gas prices are predictable because they're paid in a stablecoin:
| Operation | Ethereum mainnet | Gnosis Chain |
|---|---|---|
| Simple xDAI transfer | ~$0.50-5 | ~$0.001 |
| ERC-20 transfer | ~$1-10 | ~$0.002 |
| Complex DeFi swap | ~$5-50 | ~$0.01-0.05 |
| Contract deployment | ~$50-500 | ~$0.10-2 |
Gas prices on Gnosis Chain typically range from 1-5 Gwei (compared to 20-100+ Gwei on Ethereum during congestion).
Finality is faster
Gnosis Chain blocks are finalized in ~5 minutes, compared to ~13 minutes on Ethereum. This is because Gnosis uses a smaller validator set with faster consensus rounds.
The bridge is the OmniBridge
The canonical bridge between Ethereum and Gnosis Chain is the OmniBridge. It's a trust-minimized bridge that locks DAI on Ethereum and mints xDAI on Gnosis Chain (and vice versa).
// OmniBridge contract addresses
const OMNIBRIDGE_ETH = '0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e'; // Ethereum
const OMNIBRIDGE_GNOSIS = '0xf6A78083ca3e2a662D6dd1703c939c8aCE2e268d'; // Gnosis Chain
// Bridge DAI from Ethereum to Gnosis Chain
// 1. Approve DAI spending
await daiContract.approve(OMNIBRIDGE_ETH, amount);
// 2. Call relayAndSend on the bridge
await bridgeContract.relayAndSend(amount, recipientOnGnosis);
// Wait ~10-20 minutes for the bridge to process
// Recipient receives xDAI on Gnosis Chain
Third-party bridges (Hop, Connext, Across) also support Gnosis Chain and often offer faster transfers (2-5 minutes).
The methods you'll actually use
Since Gnosis Chain is EVM-compatible, the methods are identical to Ethereum. Here are the ones you'll use most:
| Method | What it does | When you need it |
|---|---|---|
eth_blockNumber |
Latest block height | Health checks, sync monitoring |
eth_getBalance |
xDAI balance | Wallet UIs |
eth_call |
Read-only contract call | Reading state |
eth_sendRawTransaction |
Submit signed transaction | Sending transactions |
eth_getTransactionReceipt |
Transaction receipt + status | Confirming transactions |
eth_getLogs |
Event logs for a block range | Indexing, monitoring |
eth_estimateGas |
Gas estimate | Pre-flight checks |
eth_gasPrice |
Current gas price (in xDAI) | Fee estimation |
Gas estimation
Gas estimation on Gnosis Chain works identically to Ethereum, but the costs are much lower:
const gasEstimate = await provider.estimateGas({
to: recipient,
value: ethers.parseEther('1.0'),
});
const gasPrice = await provider.getGasPrice(); // In xDAI
const totalCost = gasEstimate * gasPrice;
console.log(`Transaction cost: ${ethers.formatEther(totalCost)} xDAI`);
// Typically: 0.001 - 0.01 xDAI ($0.001 - $0.01)
Archive access
Gnosis Chain's state is smaller than Ethereum's (lower transaction volume), but archive access is still important for:
- Querying historical balances or contract state
- Running
eth_callat historical blocks - Building indexers that backfill from old blocks
- Debugging old transactions
Not all providers offer archive access for Gnosis Chain. Confirm archive support before choosing an endpoint if your application needs historical state queries.
WebSocket subscriptions
Gnosis Chain supports WebSocket subscriptions for real-time updates:
import { createPublicClient, webSocket } from 'viem';
import { gnosis } from 'viem/chains';
const client = createPublicClient({
chain: gnosis,
transport: webSocket('wss://rpc.swiftnodes.io/ws/gnosis?key=YOUR_API_KEY'),
});
// Subscribe to new blocks
const unwatch = client.watchBlocks({
onBlock: (block) => {
console.log(`New block: ${block.number}`);
},
});
With ~5 second block times, WebSocket subscriptions are much more efficient than polling.
Compared to other chains
| Feature | Ethereum | Gnosis Chain | Polygon PoS |
|---|---|---|---|
| Chain ID | 1 | 100 | 137 |
| Block time | ~12 seconds | ~5 seconds | ~2 seconds |
| Gas token | ETH | xDAI (stable) | POL |
| Gas cost | $0.50-50 | $0.001-0.01 | $0.01-0.10 |
| Finality | ~13 minutes | ~5 minutes | ~2 seconds |
| Security | Ethereum validators | GNO stakers | POL stakers |
| Best for | Maximum security | Stable fees, DeFi | High-frequency, low-cost |
Gnosis Chain sits in a unique position: it offers Ethereum-compatible smart contracts with stable, predictable gas fees. This makes it ideal for applications where cost predictability matters more than raw throughput — DeFi protocols, payment systems, and DAOs.
Production considerations
xDAI liquidity
To use Gnosis Chain, you need xDAI for gas. You can get xDAI by:
- Bridging DAI from Ethereum via the OmniBridge (~10-20 minutes)
- Using a third-party bridge (Hop, Connext) for faster transfers
- Buying xDAI directly on some exchanges
For production applications, maintain a xDAI reserve in your operational wallets to avoid gas failures.
Bridge delays
The OmniBridge can take 10-20 minutes to process transfers. For time-sensitive operations, use third-party bridges or maintain pre-funded wallets on Gnosis Chain.
Validator set
Gnosis Chain has a smaller validator set than Ethereum (~200k validators vs ~900k). This makes consensus faster but means the chain is less decentralized than Ethereum. For applications requiring maximum security, Ethereum mainnet is still the gold standard.
Choosing a Gnosis Chain RPC endpoint
The decision comes down to three things:
1. Do you need archive access? If your application queries historical state, confirm the provider offers it. Not all do for Gnosis Chain.
2. What's your request volume? Gnosis Chain has lower traffic than Ethereum mainnet, but popular dApps can still hit rate limits. Calculate your expected requests and choose accordingly.
3. Do you need WebSocket support? Real-time applications need WebSocket subscriptions. Confirm the provider offers them with reasonable connection limits.
The short version
Gnosis Chain (chain ID 100) is an EVM-compatible sidechain with stable gas fees (xDAI), ~5 second blocks, and ~5 minute finality. Everything that works on Ethereum works here — same tooling, same contracts, same RPC methods. The key differences: gas is paid in xDAI (a DAI-bridged stablecoin), costs are 100-1000x cheaper, and the bridge to Ethereum uses the OmniBridge.
For Gnosis Chain RPC access with archive support and WebSocket subscriptions, grab a free API key and point your app at:
https://rpc.swiftnodes.io/rpc/gnosis?key=YOUR_API_KEY
John Sullivan covers RPC infrastructure, node operations, and multi-chain development at SwiftNodes — what it actually takes to keep endpoints fast, fresh, and reliable across EVM and non-EVM networks.
Related posts
- Tron RPC: A Developer's Guide to TRC-20 Transfers, Smart Contracts, and Node Setup
How to connect to Tron via JSON-RPC and HTTP — TRC-20 token transfers, smart contract interaction, energy and bandwidth, and how to pick a Tron endpoint for production use.
- Solana RPC: A Developer's Guide to Endpoints, Methods, and Production Setup
How to connect to Solana via JSON-RPC — the methods you'll use daily, commitment levels, WebSocket subscriptions, account parsing, and how to pick an endpoint that handles real traffic.
- Ethereum RPC: The Complete Developer Reference
Everything you need to connect to Ethereum via RPC — the methods you'll actually use, how to set up viem and ethers, WebSocket vs HTTP, archive access, and how to pick an endpoint that won't fall over under load.