The Decentralized RPC Layer Purpose-Built for Core Chain and BTCfi Applications
CoreRelay is a verifiable, censorship-resistant RPC infrastructure network designed specifically for Core Chain's Bitcoin-aligned ecosystem. By combining multi-client consensus verification, native Bitcoin light-client integration, and optimized support for Core's Satoshi Plus dual-staking model, CoreRelay eliminates the trust assumptions inherent in centralized RPC providers while maintaining production-grade performance.
Perfect for:
- 🪙 BTCfi Applications requiring trustless Bitcoin staking queries
- 🔐 Non-Custodial Bitcoin Protocols needing verifiable on-chain data
- 🌐 Core Chain dApps demanding censorship resistance
- 💼 Institutional Users requiring cryptographic audit trails
- 🏗️ Developers building on Core's dual-staking infrastructure
Core Chain's explosive growth in BTCfi is threatened by centralized infrastructure. When you query an RPC provider like Infura or Alchemy:
- ❌ You trust they return accurate data (no cryptographic proof)
- ❌ They can censor your transactions or specific addresses
- ❌ They see all your activity (privacy violation)
- ❌ Single point of failure (when they go down, your dApp goes down)
- ❌ No Core-native features (generic Ethereum, no Bitcoin integration)
✅ Trustless: Multi-client consensus with BLS signature verification
✅ Censorship-Resistant: Decentralized P2P mesh (50+ nodes at mainnet)
✅ Core-Native: chainId 1116, core_getStakingInfo, Bitcoin finality checks
✅ Bitcoin-Integrated: Light client for BTC L1 finality verification
✅ Verifiable: Every response includes Merkle proof bundle
✅ Private: Requests distributed across anonymous mesh nodes
✅ Drop-In Compatible: Works with ethers.js, web3.js, viem, Hardhat
graph TB
subgraph "dApp Layer"
A[BTCfi dApp<br/>web3.js/ethers.js]
B[Core Wallet]
C[DeFi Protocol]
end
subgraph "CoreRelay Gateway"
D[Load Balancer]
E[Request Router]
F[Consensus Verifier]
G[Bitcoin Finality Checker]
H[Redis Cache]
end
subgraph "Mesh Network"
I1[Mesh Node 1<br/>Helios + BTC Light Client]
I2[Mesh Node 2<br/>Nimbus + BTC Light Client]
I3[Mesh Node 3<br/>Lodestar + BTC Light Client]
I4[Mesh Node N...]
end
subgraph "Data Sources"
J[Core Chain Nodes<br/>chainId 1116]
K[Bitcoin Network<br/>L1 Finality]
L[Portal Network<br/>Distributed Storage]
end
A --> D
B --> D
C --> D
D --> E
E --> F
E --> G
F --> H
E --> I1
E --> I2
E --> I3
E --> I4
I1 --> J
I2 --> J
I3 --> J
I4 --> J
I1 --> K
I2 --> K
I3 --> K
I1 --> L
I2 --> L
I3 --> L
style A fill:#FF6B00
style B fill:#FF6B00
style C fill:#FF6B00
style F fill:#00D395
style G fill:#F7931A
style K fill:#F7931A
How It Works:
- Your dApp sends a standard JSON-RPC request (e.g.,
core_getStakingInfo) - CoreRelay Gateway queries 3+ diverse mesh nodes running different light clients
- Each node returns response + BLS signature + Merkle proof
- Gateway performs consensus verification (requires 2/3 agreement)
- For BTC-related queries, Bitcoin light client verifies L1 finality
- Verified response returned with proof bundle (auditable)
git clone https://github.com/core-relay/corerelay.git
cd corerelay
docker-compose up -d
# Test Core Chain RPC
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'
# Expected: {"jsonrpc":"2.0","result":"0x45c","id":1} # 0x45c = 1116 (Core Chain)// ethers.js v6
import { ethers } from 'ethers';
// Replace centralized RPC with CoreRelay
const provider = new ethers.JsonRpcProvider('http://localhost:8545');
// All standard Core Chain methods work
const balance = await provider.getBalance('0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb');
console.log('Balance:', ethers.formatEther(balance), 'CORE');
// Core-specific dual-staking queries
const stakingInfo = await provider.send('core_getStakingInfo', [
'0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
]);
console.log('BTC Staked:', stakingInfo.btcStaked);
console.log('CORE Delegated:', stakingInfo.coreDelegated);
// Verify response authenticity (optional)
const proof = await provider.send('corerelay_getProof', [
stakingInfo.requestId
]);
console.log('Verified by', proof.consensus.agreements, 'nodes');
console.log('Client diversity:', proof.attestations.map(a => a.client_type));Out-of-the-box support for Core mainnet and testnet with optimized configurations.
// Query Bitcoin staking information
core_getStakingInfo(address) → {
btcStaked: bigint,
coreStaked: bigint,
btcDelegations: Delegation[],
coreDelegations: Delegation[],
rewards: bigint
}
// Get validator delegations
core_getDelegations(validatorAddress) → {
totalBtcDelegated: bigint,
totalCoreDelegated: bigint,
delegators: Address[]
}
// Query validator set with dual-staking weights
core_getValidatorSet(blockNumber) → {
validators: [{
address: Address,
btcPower: bigint,
corePower: bigint,
hybridScore: bigint
}]
}// Verify Bitcoin transaction finality for non-custodial staking
core_verifyBtcTransaction(txHash, requiredConfirmations) → {
confirmed: boolean,
confirmations: number,
blockHeight: number,
merkleProof: string[],
btcBlockHash: string
}CoreRelay automatically routes Bitcoin-related queries to mesh nodes with synced Bitcoin light clients, ensuring low-latency cross-chain verification.
Full support for Core Chain's EIP-1559 implementation plus Core-specific fee fields:
core_feeHistory(blockCount, newestBlock) → {
baseFeePerGas: bigint[],
gasUsedRatio: number[],
coreSpecificFee: bigint[] // Core Chain validator rewards
}eth_blockNumber,eth_getBalance,eth_getCodeeth_call,eth_estimateGas,eth_sendRawTransactioneth_getBlockByNumber,eth_getBlockByHasheth_getTransactionByHash,eth_getTransactionReceipteth_getLogs,eth_getStorageAteth_chainId(returns 1116 for Core mainnet)eth_gasPrice,eth_maxPriorityFeePerGas,eth_feeHistory
core_getStakingInfo- Dual-staking (BTC + CORE) datacore_getDelegations- Validator delegation queriescore_getValidatorSet- Satoshi Plus validator infocore_verifyBtcTransaction- Bitcoin L1 finality checkscore_feeHistory- Core-specific fee market data
corerelay_getProof- Retrieve cryptographic proof bundle for any requestcorerelay_getNodeInfo- Mesh network status and peer infocorerelay_verifyResponse- Client-side proof verification
| Method | Centralized RPC | CoreRelay (uncached) | CoreRelay (cached) |
|---|---|---|---|
eth_blockNumber |
42ms | 165ms | 6ms |
eth_getBalance |
78ms | 298ms | 11ms |
core_getStakingInfo |
95ms | 340ms | 14ms |
core_verifyBtcTransaction |
N/A | 450ms | 18ms |
eth_call |
142ms | 425ms | N/A |
Cache Hit Rate: 72-85% for typical BTCfi workloads
Consensus Overhead: ~2.2x vs single centralized provider
Trade-off: Trustlessness and censorship resistance for modest latency increase
docker-compose up -d
# Starts: 1 Gateway, 3 Mesh Nodes, Redis cache# Install CoreRelay
curl -sSL https://install.corerelay.network | bash
# Configure for Core Chain
corerelay init --network core-mainnet --nodes 5
# Start services
systemctl start corerelay-gateway
systemctl start corerelay-mesh-node# Deploy to Core Chain-optimized cluster
kubectl apply -f k8s/corerelay-core-mainnet.yamlMinimum Requirements:
- Gateway: 4GB RAM, 2 CPU cores, 20GB SSD
- Mesh Node: 8GB RAM, 4 CPU cores, 100GB SSD (includes BTC light client)
- 17 supported RPC methods (Ethereum-compatible)
- 3 test mesh nodes operational
- Multi-client consensus (Helios integration)
- Basic proof bundles
- Native Core Chain support (chainId 1116)
- Core-specific RPC methods (
core_getStakingInfo, etc.) - Bitcoin light client integration (BTC finality verification)
- Optimized caching for dual-staking queries
- 20+ mesh nodes (geographically distributed)
- Security audit (Trail of Bits)
- 50+ mesh nodes globally
- WebSocket subscriptions for real-time events
- Advanced peer reputation system
- Public gateway (rpc.corerelay.network)
- SDK/libraries (JavaScript, Python, Rust, Go)
- Wallet integrations (Core Wallet, MetaMask Snap)
- BTCfi protocol partnerships (5+ integrations)
- Economic incentives (CORERELAY token)
- Governance DAO launch
- zkSNARK proof aggregation
- Cross-chain verification (Core ↔ Bitcoin ↔ Ethereum)
- Advanced Bitcoin scripting support
- Lightning Network integration
- Private mesh networks for institutions
- Cryptographic Signatures: Every mesh node signs responses with BLS keys
- Merkle Proofs: State queries include proofs linking to Core Chain state root
- Client Diversity: Requires consensus from ≥2 different light client implementations
- Bitcoin Finality: BTC transactions verified against Bitcoin L1 (6+ confirmations)
- Consensus Quorum: Minimum 2/3 agreement required (Byzantine fault tolerant)
✅ Protected Against:
- Malicious RPC provider returning fake data
- Single light client implementation bugs
- Sybil attacks (client diversity requirement)
- Eclipse attacks (random peer selection)
- Censorship (permissionless P2P mesh)
❌ Not Protected Against:
- Compromised ≥2/3 of queried mesh nodes (same as any BFT system)
- Bugs in ≥2 different light client implementations simultaneously
- Fundamental cryptographic primitive breaks (SHA-256, BLS12-381)
- Current: Internal security review completed
- Planned: Trail of Bits audit (Q2 2026, funded by Core DAO grant)
Non-custodial Bitcoin staking dApps need verifiable on-chain data:
// Trustlessly verify user's BTC stake before allowing withdrawals
const stakingInfo = await provider.send('core_getStakingInfo', [userAddress]);
const proof = await provider.send('corerelay_getProof', [stakingInfo.requestId]);
// Cryptographically verify proof (can be done off-chain for auditing)
assert(verifyProof(proof, stakingInfo));
// Safe to process withdrawal
processWithdrawal(userAddress, stakingInfo.btcStaked);Privacy-preserving RPC access without centralized providers seeing all transactions:
// Requests distributed across mesh, no single observer
const balance = await provider.getBalance(userAddress); // Node A
const nonce = await provider.getTransactionCount(userAddress); // Node B
const gasPrice = await provider.getFeeData(); // Node C
// Centralized provider would see: address + balance + nonce + timing
// CoreRelay: Each node sees only one piece, can't correlateHigh-value DeFi needing audit trails and verifiable data:
// Every price feed query is cryptographically provable
const price = await oracle.getPrice('BTC/CORE');
const proof = await provider.send('corerelay_getProof', [price.requestId]);
// Store proof for audit/regulatory compliance
await auditLog.store(price, proof); // Immutable proof bundleBitcoin ↔ Core Chain bridges requiring trustless verification:
// Verify Bitcoin transaction finalized before minting wrapped BTC
const btcTx = await provider.send('core_verifyBtcTransaction', [
txHash,
6 // require 6 confirmations
]);
if (btcTx.confirmed) {
await wbtcContract.mint(recipient, amount, btcTx.merkleProof);
}CoreRelay is open-source and community-governed. We welcome contributions!
- 🐛 Report Bugs: GitHub Issues
- 💡 Suggest Features: GitHub Discussions
- 🔧 Submit PRs: See CONTRIBUTING.md
- 🖥️ Run a Mesh Node: Setup Guide
- 📖 Improve Docs: Documentation PRs highly appreciated
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone repo
git clone https://github.com/core-relay/corerelay.git
cd corerelay
# Build
cargo build --release
# Run tests
cargo test --all
# Start local development environment
docker-compose -f docker-compose.dev.yml up- Website: https://corerelay.network
- Documentation: https://docs.corerelay.network
- Core DAO Forum: https://forum.coredao.org/c/corerelay
- Discord: https://discord.gg/corerelay
- Twitter: @CoreRelay
- GitHub: https://github.com/core-relay/corerelay
- Email: team@corerelay.network
CoreRelay is actively seeking support from the Core DAO ecosystem grants program. If you're interested in supporting decentralized infrastructure for Core Chain:
- Grants Portal: https://coredao.org/grants
- Contact: grants@corerelay.network
CoreRelay is open-source software licensed under the MIT License.
Copyright (c) 2025 CoreRelay Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, subject to the following conditions:
[See LICENSE file for full text]
Built for the Core Chain and Bitcoin communities.
Powered by:
- libp2p - P2P networking
- Helios - Ethereum light client
- Nimbus - Ethereum consensus client
- Lodestar - Ethereum consensus client
- Portal Network - Distributed data availability
Special Thanks:
- Core DAO team for building Bitcoin-aligned EVM infrastructure
- Ethereum light client teams for trustless verification primitives
- The BTCfi ecosystem for pioneering non-custodial Bitcoin DeFi
Build trustless. Build decentralized. Build on CoreRelay.