Summary
Composable Finance is a cross-chain DeFi infrastructure project that uses IBC to enable trustless communication between different blockchain ecosystems. Its core components include the Cross-Chain Virtual Machine (XCVM) for orchestration and Centauri for bridging, with Picasso as its parachain. For developers, interacting with these networks requires reliable RPC endpoints to query state, submit transactions, and monitor events.
Quick Recommendation: Use Managed RPC for Composable and Picasso
If you are building on Composable Finance or its Picasso parachain, you need reliable RPC endpoints to interact with the chain. Running your own node gives you full control but adds operational overhead: syncing, monitoring, and keeping up with upgrades. For most developers, a managed RPC provider like OnFinality is the faster path. OnFinality offers public and dedicated endpoints for Composable Finance and Picasso, with WebSocket support for real-time subscriptions. Check the supported RPC networks list to confirm availability, and review RPC pricing for free tier and paid plans. If you need high throughput or archive data, a dedicated node may be the right fit.
What Is Composable Finance?
Composable Finance is a cross-chain DeFi infrastructure project that aims to make blockchain networks interoperable. Its core innovation is the first cross-ecosystem implementation of IBC (Inter-Blockchain Communication), which was originally built for Cosmos. This allows trustless communication between different chains, including Polkadot parachains and Ethereum-compatible networks.
The project consists of several modular components:
- Cross-Chain Virtual Machine (XCVM): An orchestration layer that lets developers deploy protocols that can interact with multiple chains asynchronously.
- Centauri: A trustless bridging protocol that combines IBC with the XCVM to enable cross-chain asset transfers.
- Picasso: The parachain on Kusama and Polkadot that serves as the settlement environment for these cross-chain primitives.
For developers, Composable Finance opens up new possibilities for building DeFi applications that are not siloed to a single chain. However, to interact with these networks, you need to connect to their RPC endpoints.
Composable Finance vs. Picasso: Which Network Do You Need?
Composable Finance and Picasso are often mentioned together, but they serve different purposes. Composable Finance is the overarching project, while Picasso is the specific parachain that hosts the cross-chain infrastructure. When you build on Composable Finance, you will likely interact with the Picasso network for transactions and smart contract calls.
| Network | Purpose | Chain Type |
|---|---|---|
| Composable Finance | Cross-chain infrastructure, governance, and protocol development | Polkadot parachain |
| Picasso | Settlement and execution of cross-chain transactions | Kusama/Polkadot parachain |
If you are building a DeFi application that uses Centauri for bridging, you will need to connect to Picasso. If you are developing pallets or participating in governance, you might interact with the Composable Finance network. Always check the network's documentation to confirm which chain your use case requires.
How to Connect to Composable Finance RPC
To interact with Composable Finance or Picasso, you need an RPC endpoint. You can use a public endpoint, but for production applications, a managed provider is recommended for reliability and scalability.
Public Endpoint Example
OnFinality provides a public RPC endpoint for Composable Finance. Here is an example of how to use it with curl to query the latest block:
curl -H "Content-Type: application/json" \
-d '{"id":1,"jsonrpc":"2.0","method":"chain_getBlock","params":[]}' \
https://composable.api.onfinality.io/public
Replace the URL with the actual public endpoint from the Composable Finance network page. For Picasso, use the corresponding endpoint from the same page.
Using WebSocket for Real-Time Updates
For applications that need real-time data, such as price feeds or transaction monitoring, use WebSocket. Here is a JavaScript example using the ws library:
const WebSocket = require('ws');
const ws = new WebSocket('wss://composable.api.onfinality.io/public/ws');
ws.on('open', function open() {
ws.send(JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'chain_subscribeNewHeads',
params: []
}));
});
ws.on('message', function incoming(data) {
console.log(data.toString());
});
Again, use the correct WebSocket URL from the network page.
Configuring Your Wallet or dApp
If you are building a dApp that connects to Composable Finance, you need to configure your wallet or library with the correct network parameters. Here is an example using the Polkadot.js API:
const { ApiPromise, WsProvider } = require('@polkadot/api');
const provider = new WsProvider('wss://composable.api.onfinality.io/public/ws');
const api = await ApiPromise.create({ provider });
const chain = await api.rpc.system.chain();
console.log('Connected to', chain.toString());
For Ethereum-compatible networks, you would use a similar approach with ethers.js or viem, but Composable Finance is primarily Substrate-based, so Polkadot.js is the standard.
Common Pitfalls and Troubleshooting
When working with Composable Finance RPC, you may encounter several issues. Here are common failure modes and how to fix them:
| Symptom | Likely Cause | Solution |
|---|---|---|
| Connection timeout | Network congestion or endpoint down | Try a different endpoint or use a managed provider with failover |
| Invalid response format | Using wrong JSON-RPC method | Check the Substrate RPC documentation for correct methods |
| WebSocket disconnects | Idle timeout or rate limiting | Implement reconnection logic and use a dedicated WebSocket endpoint |
| Transaction not included | Nonce too low or insufficient balance | Check your account nonce and balance before sending |
If you are using a public endpoint and hitting rate limits, consider upgrading to a dedicated node for higher throughput and dedicated resources.
Build-versus-Buy: Running Your Own Node vs. Managed RPC
Deciding whether to run your own Composable Finance node or use a managed RPC provider depends on your workload and resources. Here is a comparison to help you decide:
| Factor | Self-Hosted Node | Managed RPC (OnFinality) |
|---|---|---|
| Setup time | Hours to days | Minutes |
| Maintenance | You handle upgrades, monitoring, and backups | Provider handles it |
| Scalability | Limited by your hardware | Scales with demand |
| Cost | Hardware and electricity | Subscription fee, free tier available |
| Reliability | Depends on your infrastructure | High availability with failover |
For production applications, managed RPC is often the better choice because it reduces operational burden and provides better uptime. OnFinality offers both public and dedicated endpoints, so you can start with the free tier and scale as needed.
Key Takeaways
- Composable Finance is a cross-chain DeFi infrastructure project using IBC for trustless interoperability.
- Picasso is the parachain where cross-chain transactions settle.
- To build on Composable Finance, you need reliable RPC endpoints for querying and submitting transactions.
- OnFinality provides managed RPC for Composable Finance and Picasso, with public and dedicated options.
- Consider your workload and resources when choosing between self-hosting and managed RPC.
Frequently Asked Questions
What is the difference between Composable Finance and Picasso?
Composable Finance is the overall project, while Picasso is the specific parachain that hosts the cross-chain infrastructure. Developers typically interact with Picasso for transactions and smart contracts.
Does OnFinality support Composable Finance?
Yes, OnFinality lists Composable Finance on its supported networks page. You can find public and dedicated RPC endpoints there.
How do I get a dedicated RPC endpoint for Composable Finance?
You can request a dedicated node through the dedicated node page. This gives you exclusive access to a node with higher rate limits and better performance.
Can I use WebSocket for real-time data on Composable Finance?
Yes, OnFinality provides WebSocket endpoints for Composable Finance. Use the wss:// URL for subscriptions.
What is the cost of using OnFinality for Composable Finance RPC?
OnFinality offers a free tier for public endpoints. For higher usage, check the RPC pricing page for details on paid plans.
How do I troubleshoot connection issues?
Start by checking the endpoint URL and network status. If you are using a public endpoint, try a different one or contact support. For persistent issues, consider a dedicated node.