Summary
SORA is a Substrate-based blockchain network designed for a sovereign economic system, using the XOR token and a token bonding curve. It powers Polkaswap and supports democratic governance and cross-chain interoperability. This article explains what SORA is, how to connect to it via RPC, and what to consider when choosing infrastructure for production applications.
Quick Recommendation: How to Decide on SORA Infrastructure
Before you write a line of code, decide how you will access the SORA Network. The choice depends on your workload, not on the network itself.
- For prototyping or a hackathon: Use a public endpoint. It is fine for a few requests, but do not build a product on it.
- For a production dApp or backend service: Use a managed RPC provider or run your own node. Managed services handle uptime, scaling, and maintenance, so you can focus on your application.
- For real-time features like order books or price feeds: You need WebSocket (WSS) support. Confirm your provider offers it.
- For historical data or analytics: You may need archive node access. Check that your provider supports archive queries.
- For high traffic or strict latency requirements: Consider a dedicated node to avoid noisy neighbors and rate limits.
If you are unsure, start with a managed RPC provider that offers a free tier, test your workload, and upgrade as you grow. OnFinality provides RPC endpoints for SORA and dedicated nodes if you need more control.
What Is the SORA Blockchain?
SORA is a decentralized blockchain network built on Substrate, the same framework used by Polkadot. Its goal is to create a sovereign economic system where users can govern the network and manage its monetary policy through a token bonding curve. The native token, XOR, is designed to be a stable, adaptive currency that can expand or contract supply based on demand.
SORA is not an EVM-compatible chain. It uses Substrate's native runtime, which means you interact with it using Substrate RPC methods (like chain_getBlock or state_getStorage) rather than Ethereum-style JSON-RPC methods. This is a key difference for developers coming from Ethereum or other EVM chains.
The network powers Polkaswap, a decentralized exchange, and supports democratic governance where XOR holders can vote on proposals. It also aims to enable cross-chain interoperability, allowing assets to move between SORA and other networks.
Why RPC Endpoints Matter for SORA Developers
Every interaction with the SORA Network—reading balances, submitting transactions, querying state—goes through an RPC (Remote Procedure Call) endpoint. The quality of that endpoint directly affects your application's reliability and user experience.
- Public endpoints are often rate-limited and can become congested, leading to timeouts or dropped requests.
- Managed RPC providers offer dedicated endpoints with higher throughput, better uptime, and support for WebSocket subscriptions.
- Running your own node gives you full control but requires ongoing maintenance, monitoring, and infrastructure costs.
For production applications, a managed RPC provider is usually the right choice. It offloads the operational burden and provides the reliability your users expect.
How to Connect to SORA: Endpoints and Setup
To connect to the SORA Network, you need an RPC endpoint URL. The network supports both HTTPS and WSS (WebSocket) endpoints. Here is a typical setup for a JavaScript application using the polkadot-js/api library, which is the standard way to interact with Substrate-based chains.
const { ApiPromise, WsProvider } = require('@polkadot/api');
async function main() {
// Use a WSS endpoint for real-time updates
const provider = new WsProvider('wss://sora.api.onfinality.io/public-ws');
const api = await ApiPromise.create({ provider });
// Get the latest block number
const lastHeader = await api.rpc.chain.getHeader();
console.log('Latest block:', lastHeader.number.toString());
// Get the balance of an account (replace with a real address)
const address = 'YOUR_ACCOUNT_ADDRESS';
const { data: balance } = await api.query.system.account(address);
console.log('Free balance:', balance.free.toString());
await api.disconnect();
}
main().catch(console.error);
For a simple curl request to check the latest block, you can use the HTTPS endpoint:
curl -H "Content-Type: application/json" -d '{"id":1,"jsonrpc":"2.0","method":"chain_getBlock","params":[]}' https://sora.api.onfinality.io/public
If you are using a managed provider, you will typically get an API key or a dedicated URL. Keep your key secure and rotate it regularly.
Evaluating RPC Providers for SORA
When choosing an RPC provider for SORA, consider the following criteria:
| Criterion | What to Check | Why It Matters |
|---|---|---|
| Uptime | Historical uptime stats | Downtime means your app is unavailable |
| Rate limits | Requests per second (RPS) and daily limits | Free tiers may throttle your traffic |
| WebSocket support | WSS endpoint availability | Needed for real-time subscriptions |
| Archive data | Access to historical state | Required for analytics and debugging |
| Dedicated options | Ability to provision a private node | Isolates you from other users' traffic |
| Pricing model | Pay-as-you-go vs. subscription | Aligns with your budget and usage |
OnFinality offers RPC pricing that scales with your needs, and you can check supported networks to confirm SORA availability.
Common Pitfalls When Using SORA RPC
Even with a good provider, you may run into issues. Here are common pitfalls and how to avoid them:
- Using public endpoints in production: Public endpoints are not reliable for production. They can be rate-limited or go down without notice.
- Ignoring WebSocket support: If your app needs real-time data, you must use WSS. Some providers only offer HTTPS, which requires polling.
- Not handling rate limits: Managed providers have limits. If you exceed them, you may get 429 errors. Implement backoff and retry logic.
- Assuming EVM compatibility: SORA is Substrate-based. Do not try to use
eth_callor other EVM methods; they will fail. - Forgetting about archive nodes: If you need historical data, ensure your provider offers archive nodes. Not all do.
Troubleshooting SORA RPC Issues
If you encounter errors, here is a quick debugging path:
- Check your endpoint URL: Ensure it is correct and that you are using the right protocol (HTTPS vs WSS).
- Verify your API key: If you are using a managed service, confirm your key is valid and not expired.
- Test with a simple request: Use
curlto callchain_getBlockand see if you get a response. - Check rate limits: If you get 429 responses, you are hitting limits. Reduce request frequency or upgrade your plan.
- Look for network issues: If the endpoint is down, check the provider's status page or try an alternative endpoint.
For more detailed troubleshooting, refer to our RPC troubleshooting guide.
Key Takeaways
- SORA is a Substrate-based blockchain for a sovereign economic system, using XOR and a token bonding curve.
- It is not EVM-compatible; use Substrate RPC methods.
- Public endpoints are for testing only; use a managed provider for production.
- WebSocket support is essential for real-time applications.
- Archive nodes are needed for historical data.
- Evaluate providers on uptime, rate limits, WebSocket, archive, and pricing.
Frequently Asked Questions
Is SORA an EVM-compatible chain?
No, SORA is built on Substrate and uses Substrate RPC methods, not Ethereum JSON-RPC.
What is the XOR token used for?
XOR is the native token of SORA, used for governance, transaction fees, and as a medium of exchange within the network.
Can I use public RPC endpoints for production?
It is not recommended. Public endpoints are often rate-limited and unreliable. Use a managed provider or run your own node.
Does OnFinality support SORA?
Yes, OnFinality provides RPC endpoints for SORA. Check our supported networks page for details.
How do I get a dedicated SORA node?
You can provision a dedicated node through OnFinality's dedicated node service.