⛓️ Blockchain Integration Guides

Production-ready implementation guides for integrating major blockchain networks with the Quub Exchange Chain API. Each guide provides comprehensive coverage of chain registration, RPC adapter setup, wallet management, transaction tracking, security best practices, and production deployment checklists.

🎯 Quick Navigation


🌐 Layer 1 Blockchains

Ethereum β€” The EVM Foundation

⟠

Ethereum Integration Guide

Most mature smart contract platform with robust tooling and ecosystem

  • βœ… 12-second block times with ~15 minute finality
  • βœ… EIP-1559 dynamic gas pricing with priority fees
  • βœ… MEV protection strategies (private mempools, Flashbots)
  • βœ… Comprehensive ERC standards (20, 721, 1155, 4337)
  • βœ… Account abstraction and smart contract wallets
View Ethereum Guide β†’

Best For: DeFi protocols, NFT platforms, high-value transactions, complex smart contracts


BNB Chain β€” High Throughput, Low Cost

πŸ”Ά

BNB Chain Integration Guide

EVM-compatible chain optimized for fast, low-cost transactions

  • βœ… 3-second block times with ~15 second finality
  • βœ… Ultra-low gas fees (typically <$0.10 per transaction)
  • βœ… BEP-20 token standard (ERC-20 compatible)
  • βœ… High throughput for retail and gaming applications
  • βœ… Proof of Staked Authority (PoSA) consensus
View BNB Guide β†’

Best For: Gaming, retail payments, high-frequency trading, token launches


Avalanche β€” Sub-Second Finality

πŸ”Ί

Avalanche Integration Guide

High-performance platform with near-instant finality and subnet architecture

  • βœ… Sub-second block times with <2 second finality
  • βœ… C-Chain (EVM-compatible) for smart contracts
  • βœ… Dynamic fee adjustment based on network load
  • βœ… Subnet support for custom blockchain instances
  • βœ… Native cross-chain messaging
View Avalanche Guide β†’

Best For: Real-time applications, institutional DeFi, custom subnets, low-latency trading


Solana β€” Non-EVM High Performance

β—Ž

Solana Integration Guide

Ultra-fast non-EVM blockchain with unique architecture and SPL token standard

  • βœ… 400ms slot times with 12.8s finality (67 slots)
  • βœ… Base58 signatures and account-based architecture
  • βœ… SPL token standard (distinct from ERC-20)
  • βœ… Commitment levels (processed, confirmed, finalized)
  • βœ… Ultra-low transaction costs ($0.00025 per tx)
View Solana Guide β†’

Best For: High-frequency trading, on-chain order books, NFT minting, payment processing


πŸ”— Layer 2 Networks

Polygon β€” Mature PoS Sidechain

🟣

Polygon Integration Guide

Established PoS sidechain with Ethereum bridging and checkpoint finality

  • βœ… 2-second block times with ~30 minute checkpoint finality
  • βœ… Native Ethereum bridge with security guarantees
  • βœ… Tiered confirmation strategy (probabilistic β†’ checkpointed)
  • βœ… Very low gas fees (~$0.01 per transaction)
  • βœ… zkEVM rollup option for enhanced security
View Polygon Guide β†’

Best For: NFT marketplaces, gaming, enterprise applications, Ethereum scaling


Arbitrum One β€” Leading Optimistic Rollup

πŸ”΅

Arbitrum Integration Guide

Most adopted optimistic rollup with full EVM equivalence

  • βœ… 250ms block times with 7-day challenge period
  • βœ… Full EVM compatibility with fraud proofs
  • βœ… Standard bridge operations (deposit/withdraw)
  • βœ… Nitro upgrade for improved performance
  • βœ… Low L2 gas fees, batched L1 settlement
View Arbitrum Guide β†’

Best For: DeFi protocols, complex dApps, Ethereum L2 scaling with security priority


Optimism β€” OP Stack Foundation

πŸ”΄

Optimism Integration Guide

Modular OP Stack rollup with governance token and public goods funding

  • βœ… 2-second block times with 7-day challenge period
  • βœ… Standard Bridge and fault proof system
  • βœ… OP Stack modularity for custom chains
  • βœ… Batch submission for cost efficiency
  • βœ… Bedrock upgrade for improved performance
View Optimism Guide β†’

Best For: Superchain ecosystem, custom OP Stack rollups, DeFi and governance applications


Base β€” Coinbase L2

πŸ”΅

Base Integration Guide

Coinbase-backed OP Stack L2 with seamless onramp integration

  • βœ… 2-second block times with OP Stack architecture
  • βœ… Ultra-low gas fees and high throughput
  • βœ… Native Coinbase integration for fiat onramps
  • βœ… Standard Bridge compatibility with Optimism
  • βœ… Growing ecosystem with retail focus
View Base Guide β†’

Best For: Consumer applications, social platforms, onchain products with fiat connectivity


πŸ“Š Network Comparison Matrix

Performance Metrics

Blockchain Type Block Time Finality Gas Token Avg Gas Cost TPS
Ethereum L1 12s ~15 min ETH $5-50 15-30
BNB Chain L1 3s ~15s BNB <$0.10 160+
Avalanche L1 <1s <2s AVAX $0.10-1 4,500+
Solana L1 400ms 12.8s SOL <$0.001 2,000+
Polygon L2 2s ~30 min* MATIC ~$0.01 7,000+
Arbitrum L2 250ms 7 days* ETH $0.10-1 4,000+
Optimism L2 2s 7 days* ETH $0.10-1 2,000+
Base L2 2s 7 days* ETH $0.10-1 2,000+

* Finality times represent withdrawal/challenge periods. Practical/probabilistic finality is much faster.

Feature Compatibility

Feature Ethereum BNB Avalanche Solana Polygon Arbitrum Optimism Base
EVM Compatible βœ… Native βœ… Yes βœ… C-Chain ❌ No βœ… Yes βœ… Yes βœ… Yes βœ… Yes
Smart Contracts βœ… Solidity βœ… Solidity βœ… Solidity βœ… Rust βœ… Solidity βœ… Solidity βœ… Solidity βœ… Solidity
Token Standard ERC-20 BEP-20 ERC-20 SPL ERC-20 ERC-20 ERC-20 ERC-20
Bridge Required - - - - βœ… Yes βœ… Yes βœ… Yes βœ… Yes
MEV Protection βœ… Flashbots ⚠️ Limited ⚠️ Limited βœ… Jito ⚠️ Limited βœ… Available βœ… Available βœ… Available
Account Abstraction βœ… EIP-4337 ⚠️ Limited βœ… Yes βœ… Native βœ… EIP-4337 βœ… EIP-4337 βœ… EIP-4337 βœ… EIP-4337

Use Case Recommendations

Use Case Recommended Networks Rationale
DeFi Protocols Ethereum, Arbitrum, Optimism Deep liquidity, security, composability
NFT Marketplaces Ethereum, Polygon, Base Established standards, low minting costs
Gaming BNB Chain, Polygon, Avalanche High throughput, low costs, fast finality
Payment Processing Solana, BNB Chain, Base Ultra-low fees, fast confirmation
High-Frequency Trading Solana, Avalanche Sub-second finality, low latency
Enterprise Apps Polygon, Avalanche Subnets Scalability, custom network options
Consumer Social Base, Polygon Low barrier to entry, fiat integration

πŸ—οΈ Common Integration Architecture

Standard Integration Pattern

All blockchain integrations follow a consistent pattern with the Quub Exchange Chain API:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Your Application                         β”‚
β”‚  (Trading Platform, DeFi Protocol, Exchange, etc.)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β”‚ REST API Calls
                         β”‚ (JWT Bearer Token)
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Quub Exchange Chain API                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚   Chains     β”‚  β”‚   Wallets    β”‚  β”‚ OnChainTxs   β”‚      β”‚
β”‚  β”‚  Registry    β”‚  β”‚  Management  β”‚  β”‚   Tracking   β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚   Chain      β”‚  β”‚   Health     β”‚  β”‚   Events     β”‚      β”‚
β”‚  β”‚  Adapters    β”‚  β”‚  Monitoring  β”‚  β”‚   Webhooks   β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β”‚ RPC Calls / Indexer Queries
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Blockchain Networks                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ Ethereum β”‚  β”‚   BNB    β”‚  β”‚  Solana  β”‚  β”‚ Polygon  β”‚   β”‚
β”‚  β”‚   RPC    β”‚  β”‚   RPC    β”‚  β”‚   RPC    β”‚  β”‚   RPC    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ Arbitrum β”‚  β”‚ Optimism β”‚  β”‚   Base   β”‚  β”‚Avalanche β”‚   β”‚
β”‚  β”‚   RPC    β”‚  β”‚   RPC    β”‚  β”‚   RPC    β”‚  β”‚   RPC    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Integration Workflow

1. Chain Registration

// Register blockchain network with metadata
POST /chains
{
  "chainId": 1,
  "name": "Ethereum Mainnet",
  "networkType": "MAINNET",
  "layer": "L1",
  "nativeCurrency": { "symbol": "ETH", "decimals": 18 }
}

2. RPC Adapter Configuration

// Configure chain adapter with RPC endpoints
POST /chain/adapters
{
  "chainId": 1,
  "name": "Ethereum Primary Adapter",
  "rpcEndpoint": "https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY",
  "signerPolicy": "HOT_WALLET",
  "priority": 1
}

3. Wallet Management

// Register organization wallet
POST /orgs/{orgId}/wallets
{
  "chainId": 1,
  "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "type": "HOT_WALLET",
  "label": "Trading Wallet"
}

4. Transaction Tracking

// Record on-chain transaction
POST /orgs/{orgId}/onchain/txs
{
  "chainId": 1,
  "hash": "0xabc123...",
  "fromAddress": "0x742d...",
  "toAddress": "0x123abc...",
  "direction": "OUTBOUND",
  "status": "PENDING"
}

5. Health Monitoring

// Monitor adapter health
GET / chain / adapters / { adapterId } / health;
// Returns: status, latencyMs, syncLag, lastBlockHeight

Security Best Practices (All Chains)

#### πŸ” Authentication & Authorization - βœ… Use OAuth2 with appropriate scopes (`read:chain`, `write:chain`) - βœ… Rotate API keys regularly (90-day maximum) - βœ… Implement rate limiting at application level - βœ… Use separate credentials for production and sandbox #### πŸ”’ Transaction Security - βœ… Validate all addresses using chain-specific formats - βœ… Implement multi-signature requirements for high-value transactions - βœ… Use hardware wallets or MPC for custody - βœ… Enable MEV protection on supported chains #### πŸ›‘οΈ Data Protection - βœ… Encrypt sensitive data at rest and in transit - βœ… Never log private keys or seed phrases - βœ… Implement proper key management (HSM, KMS) - βœ… Regular security audits of wallet infrastructure #### ⚑ Operational Security - βœ… Monitor for unusual transaction patterns - βœ… Set up alerts for failed transactions - βœ… Maintain hot/cold wallet separation - βœ… Implement withdrawal limits and velocity checks

Performance Optimization Strategies

Gas Optimization

// Dynamic gas pricing based on network conditions
async function estimateOptimalGas(chainId, tx) {
  const adapter = await getChainAdapter(chainId);
  const health = await adapter.getHealth();

  if (health.congestion === "high") {
    return tx.gasLimit * 1.2; // 20% buffer
  }
  return tx.gasLimit;
}

Transaction Batching

// Batch multiple operations for efficiency
async function batchWalletCreation(orgId, wallets) {
  const promises = wallets.map((wallet) => createWallet(orgId, wallet));
  return Promise.all(promises);
}

Caching Strategy

// Cache chain metadata to reduce API calls
const chainCache = new Map();
const CACHE_TTL = 3600000; // 1 hour

async function getChainMetadata(chainId) {
  const cached = chainCache.get(chainId);
  if (cached && Date.now() - cached.timestamp < CACHE_TTL) {
    return cached.data;
  }

  const data = await fetchChainDetails(chainId);
  chainCache.set(chainId, { data, timestamp: Date.now() });
  return data;
}

πŸš€ Getting Started

Choose Your Integration Path

  1. Start with a Specific Blockchain β€” Select from the guides above based on your use case
  2. Review the Chain API Guide β€” Understand the core Chain API operations
  3. Set Up Authentication β€” Configure OAuth2 credentials
  4. Deploy to Production β€” Follow blockchain-specific production checklists

πŸ“š Additional Resources

Development Tools

  • Ethereum: Hardhat, Foundry, Remix
  • Solana: Anchor, Solana CLI
  • Multi-Chain: ethers.js, web3.js, viem

Network Explorers

  • Ethereum: Etherscan
  • BNB Chain: BscScan
  • Avalanche: SnowTrace
  • Solana: Solscan, Solana Explorer
  • Polygon: PolygonScan
  • Arbitrum: Arbiscan
  • Optimism: Optimistic Etherscan
  • Base: BaseScan

Official Documentation