Summary
Acala is a DeFi-focused blockchain built on Substrate and connected to Polkadot, offering both native Substrate and EVM compatibility. It provides a liquidity layer with a DEX, liquid staking, and a stablecoin, making it a hub for cross-chain finance.
This page explains Acala's architecture, its role in the Polkadot ecosystem, and how to connect your application using RPC endpoints. You'll find practical guidance on choosing the right endpoint, configuring your wallet or dApp, and troubleshooting common issues.
Quick Decision: How to Connect to Acala
Before diving into the details, here's a quick guide to help you decide how to connect your application to Acala. The right choice depends on your workload and whether you need a public endpoint or dedicated infrastructure.
| Workload | Recommended Approach | Why |
|---|---|---|
| Prototyping, hackathon, low-traffic dApp | Public RPC endpoint | Free, quick to start, no setup |
| Production dApp with moderate traffic | Managed RPC provider | Reliable, scalable, with support |
| High-throughput DeFi protocol, validator, or indexer | Dedicated node | Full control, clear rate limits, custom configuration |
For most developers, starting with a public endpoint is fine for testing, but for production, you'll want a managed provider like OnFinality. OnFinality offers both shared and dedicated RPC services for Acala, with global coverage and enterprise-grade infrastructure. Check our RPC pricing and supported networks for details.
If you need to run your own node, you can use the official Acala client. However, running a node requires ongoing maintenance, monitoring, and syncing. A managed provider removes that operational burden.
What Is Acala?
Acala is a layer-1 blockchain built on Substrate, the framework behind Polkadot. It operates as a parachain in the Polkadot ecosystem, meaning it connects to the Polkadot relay chain and can interoperate with other parachains. Acala's focus is decentralized finance (DeFi), providing a suite of financial primitives:
- Acala DEX: A decentralized exchange for swapping assets.
- Liquid Staking: Stake DOT and receive liquid staking tokens (LSTs) like LDOT, which can be used in other DeFi applications.
- Stablecoin: Acala issues aUSD, a decentralized stablecoin.
- Universal Asset Hub: A cross-chain asset router that enables seamless transfers between different chains.
Acala is EVM-compatible, meaning it supports Solidity smart contracts. This allows developers to deploy existing Ethereum dApps with minimal changes, while also leveraging Substrate's flexibility and performance.
Acala's Architecture: Substrate and EVM+
Acala uses a hybrid architecture that combines Substrate's native runtime with an EVM compatibility layer called EVM+. This allows developers to choose between:
- Substrate native modules: Written in Rust, these offer deep integration with Acala's DeFi primitives and Polkadot's cross-chain messaging (XCMP).
- EVM smart contracts: Written in Solidity, these are compatible with Ethereum tooling like MetaMask, Hardhat, and Truffle.
This dual approach gives developers flexibility. You can build a DeFi protocol that uses Acala's native modules for efficiency, or you can port an existing Solidity contract and interact with Acala's assets.
Acala's Role in the Polkadot Ecosystem
Acala is a critical piece of Polkadot's DeFi infrastructure. It provides:
- Liquidity: Acala's DEX and liquid staking bring liquidity to the ecosystem, enabling other parachains to access assets.
- Interoperability: Through XCMP, Acala can send and receive assets from other parachains, creating a unified liquidity layer.
- Stablecoin: aUSD serves as a stable medium of exchange across the ecosystem.
Acala is also exploring JAM (Join-Accumulate Machine), Polkadot's next-generation architecture. This positions Acala as a JAM-native dApp chain, potentially offering even greater scalability and flexibility.
Acala RPC Endpoints: Public and Provider Options
To interact with Acala, you need an RPC endpoint. Here are the options:
- Public endpoint: Acala provides a public RPC endpoint at
https://acala-rpc-0.aca-api.network. This is suitable for testing and low-traffic use, but it may have rate limits and can be unreliable for production. - Managed providers: OnFinality and other providers offer reliable, scalable RPC services. OnFinality provides both shared and dedicated endpoints, with global coverage and load balancing.
- Self-hosted node: You can run your own Acala node and expose your own RPC endpoint. This gives you full control but requires infrastructure management.
For production applications, we recommend using a managed provider to ensure uptime and performance. OnFinality's Acala RPC service is designed for high availability and can handle production workloads. See our network page for more details.
Connecting to Acala: Wallet and dApp Configuration
To connect your wallet or dApp to Acala, you'll need to configure the network settings. Here's an example for MetaMask:
{
"chainId": "0x2b6e",
"chainName": "Acala",
"nativeCurrency": {
"name": "Acala",
"symbol": "ACA",
"decimals": 18
},
"rpcUrls": ["https://acala-rpc-0.aca-api.network"],
"blockExplorerUrls": ["https://acala.subscan.io"]
}
For a more reliable connection, use a managed RPC URL from OnFinality. You can find your personal endpoint in the OnFinality dashboard.
For developers, you can use libraries like polkadot-js or ethers to interact with Acala. Here's a simple example using polkadot-js:
const { ApiPromise, WsProvider } = require('@polkadot/api');
async function main() {
const provider = new WsProvider('wss://acala-rpc-0.aca-api.network');
const api = await ApiPromise.create({ provider });
// Get chain name
const chain = await api.rpc.system.chain();
console.log('Chain:', chain.toString());
// Get account balance
const alice = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
const { data: balance } = await api.query.system.account(alice);
console.log('Balance:', balance.free.toString());
await api.disconnect();
}
main().catch(console.error);
Common Acala RPC Errors and Troubleshooting
When working with Acala RPC, you might encounter these common issues:
- Rate limiting: Public endpoints often limit requests. If you see
429 Too Many Requests, consider using a managed provider or a dedicated node. - Connection timeouts: If your requests time out, check your network connection and the endpoint's availability. Use a reliable provider to minimize this.
- Block not found: This can happen if your node is not fully synced. Ensure your node is synced to the latest block.
- Invalid chain ID: Make sure your wallet or dApp is configured with the correct chain ID (0x2b6e for Acala).
If you're using OnFinality, you can monitor your endpoint's health through the dashboard. For advanced troubleshooting, you can use WebSocket subscriptions to listen for new blocks:
const provider = new WsProvider('wss://acala-rpc-0.aca-api.network');
const api = await ApiPromise.create({ provider });
await api.rpc.chain.subscribeNewHeads((header) => {
console.log(`New block #${header.number}: ${header.hash}`);
});
Acala vs. Other Polkadot Parachains
Acala is often compared to other DeFi-focused parachains like Moonbeam and Astar. Here's a quick comparison:
| Feature | Acala | Moonbeam | Astar |
|---|---|---|---|
| Focus | DeFi hub | EVM-compatible smart contracts | Multi-chain dApp hub |
| Native token | ACA | GLMR | ASTR |
| EVM compatibility | Yes (EVM+) | Yes | Yes |
| Unique features | Liquid staking, stablecoin, DEX | Cross-chain integrations | Layer-2 scaling solutions |
Acala's strength lies in its integrated DeFi suite, while Moonbeam focuses on Ethereum compatibility and Astar on multi-chain support. Your choice depends on your project's needs.
Key Takeaways
- Acala is a DeFi-focused parachain on Polkadot, offering a DEX, liquid staking, and a stablecoin.
- It combines Substrate's native modules with EVM compatibility, giving developers flexibility.
- For production applications, use a reliable RPC provider like OnFinality to ensure uptime and performance.
- Configure your wallet with the correct chain ID and RPC URL to connect to Acala.
- Troubleshoot common issues like rate limiting and timeouts by using a managed provider.
Frequently Asked Questions
What is the Acala token (ACA) used for?
ACA is the native token of Acala, used for governance, transaction fees, and staking. It also serves as collateral for the aUSD stablecoin.
Is Acala EVM-compatible?
Yes, Acala supports EVM-compatible smart contracts through its EVM+ module, allowing developers to deploy Solidity contracts.
How do I get an Acala RPC endpoint?
You can use the public endpoint, but for production, consider a managed provider like OnFinality. Sign up for an API key to get a dedicated endpoint.
Can I run my own Acala node?
Yes, you can run your own node using the official Acala client. However, it requires infrastructure management and maintenance.
What is aUSD?
aUSD is Acala's decentralized stablecoin, backed by collateral assets. It's used for trading, lending, and as a stable store of value.
How does Acala connect to other Polkadot parachains?
Acala uses XCMP (Cross-Chain Message Passing) to communicate with other parachains, enabling asset transfers and interoperability.
For more information on RPC services and pricing, visit our RPC pricing page. To see all supported networks, check our networks page.