Skip to content

Dual Cross Chain Architecture

M1k3lee edited this page Nov 21, 2025 · 1 revision

Dual Cross-Chain Architecture

Written by MikeLee
Date: December 2024

Overview

Crossify.io now supports dual cross-chain protocols running in parallel: LayerZero and Supra HyperNova. This architecture provides redundancy, performance optimization, and future-proofing for our cross-chain synchronization system.

Why Dual Protocols?

The Problem with Single Protocol

Relying on a single cross-chain protocol creates:

  • Single Point of Failure: If the protocol fails, cross-chain sync stops
  • No Performance Comparison: Can't optimize based on real-world data
  • Vendor Lock-in: Difficult to migrate if a better solution emerges
  • Limited Options: Can't leverage best features from different protocols

Our Solution

By running LayerZero and Supra HyperNova in parallel, we get:

  • Redundancy: If one fails, the other handles it
  • Performance Comparison: Real metrics to optimize routing
  • Flexibility: Easy to add/remove protocols
  • Best of Both Worlds: LayerZero's reliability + Supra's security
  • Future-Proofing: Ready for new protocols as they emerge

Architecture

┌─────────────────────────────────────────────────────────┐
│                    BondingCurve                         │
│              (Token Buy/Sell Logic)                     │
└────────────────────────┬────────────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────────────┐
│         GlobalSupplyTracker                             │
│    (Maintains Global Supply State)                      │
└────────────────────────┬────────────────────────────────┘
                         │
                         ▼
┌─────────────────────────────────────────────────────────┐
│         UnifiedCrossChainSync                           │
│    (Protocol Abstraction Layer)                         │
│  ┌──────────────────┐      ┌──────────────────┐       │
│  │ LayerZero Adapter│      │  Supra Adapter   │       │
│  │ (CrossChainSync) │      │   (SupraSync)    │       │
│  └──────────────────┘      └──────────────────┘       │
└────────────────────────┬────────────────────────────────┘
                         │
        ┌────────────────┼────────────────┐
        │                  │                │
        ▼                  ▼                ▼
┌──────────────┐  ┌──────────────┐  ┌──────────────┐
│  Ethereum    │  │     BSC      │  │     Base     │
│  Sepolia     │  │   Testnet    │  │   Sepolia    │
└──────────────┘  └──────────────┘  └──────────────┘

Core Components

UnifiedCrossChainSync

Address: 0xa5B144683Db8fE4402B06dbb774cacD95FD1A93e (All Networks)

The central abstraction layer that:

  • Routes messages to selected protocol(s)
  • Tracks metrics for performance comparison
  • Handles message deduplication
  • Manages global supply state
  • Provides protocol selection logic

Key Features:

  • Protocol Selection: LayerZero, Supra, Both, or Auto
  • Message Deduplication: Prevents double-processing
  • Metrics Tracking: Performance data per protocol
  • Automatic Failover: If one protocol fails, use the other
  • Token-Specific Config: Each token can have preferred protocol

SupraSync

Address: 0x0D5f52088E30802DC8d5c67Bc5E2231f7ad36569 (All Networks)

Adapter contract for Supra HyperNova:

  • Interface ready for Supra EVM support
  • Message tracking and forwarding
  • Chain ID mapping
  • Enable/disable toggle

Status: Placeholder until Supra EVM support launches (expected Q1-Q2 2025)

Protocol Comparison

Feature LayerZero Supra HyperNova
Status ✅ Live ⏳ EVM Support Pending
Security Model Relayer-based L1-to-L1 Cryptographic
Finality ~30 seconds 600-900ms
Bridge Trust Relayer trust No bridge trust
Maturity Battle-tested New (Nov 2024)
Cost ~$0.01-0.05/msg TBD
Multi-Chain Bilateral Multi-chain

Protocol Selection

Auto Mode (Default)

UnifiedCrossChainSync automatically selects the best protocol based on:

  • Failure rate (prefer lower)
  • Latency (prefer lower)
  • Cost (prefer lower)
  • Availability

Manual Selection

Tokens can have preferred protocols:

  • LayerZero: Battle-tested, reliable
  • Supra: Enhanced security, faster (when available)
  • Both: Maximum redundancy
  • Auto: Let the system decide

Message Flow

Single Protocol (LayerZero)

1. BondingCurve → GlobalSupplyTracker
2. GlobalSupplyTracker → UnifiedCrossChainSync
3. UnifiedCrossChainSync → LayerZero Adapter
4. LayerZero → Other Chains
5. Other Chains → UnifiedCrossChainSync
6. UnifiedCrossChainSync → GlobalSupplyTracker
7. GlobalSupplyTracker → BondingCurve (price updated)

Dual Protocol (Both)

1. BondingCurve → GlobalSupplyTracker
2. GlobalSupplyTracker → UnifiedCrossChainSync
3. UnifiedCrossChainSync → LayerZero Adapter (parallel)
4. UnifiedCrossChainSync → Supra Adapter (parallel)
5. Both protocols → Other Chains
6. First message received → Process
7. Duplicate message → Deduplicate (ignore)
8. GlobalSupplyTracker → BondingCurve (price updated)

Message Deduplication

When both protocols deliver the same message:

  1. Message ID Generation: Deterministic ID based on content
  2. First-Wins Strategy: Process first message, ignore duplicates
  3. State Verification: Verify state before updating
  4. Idempotent Updates: Safe to apply multiple times

This ensures:

  • No double-processing
  • No state corruption
  • Reliable operation even with duplicates

Metrics & Monitoring

UnifiedCrossChainSync tracks per-protocol metrics:

  • Messages Sent: Count of messages sent
  • Messages Received: Count of messages received
  • Failures: Count of failed messages
  • Total Cost: Cumulative cost per protocol
  • Average Latency: Average message delivery time

These metrics enable:

  • Performance comparison
  • Cost optimization
  • Protocol selection
  • Failure analysis

Deployment Status

✅ Deployed Networks

Network UnifiedSync SupraSync Status
Sepolia 0xa5B144... 0x0D5f52... ✅ Complete
BSC Testnet 0xa5B144... 0x0D5f52... ✅ Complete
Base Sepolia 0xa5B144... 0x0D5f52... ✅ Complete

🔗 Verification Links

Sepolia:

BSC Testnet:

Base Sepolia:

Integration with Existing System

Backward Compatibility

The dual architecture is fully backward compatible:

  • Existing CrossChainSync contracts still work
  • Can be connected as LayerZero adapter
  • No disruption to existing tokens
  • Gradual migration path

Migration Path

  1. Phase 1 (✅ Complete): Deploy UnifiedCrossChainSync
  2. Phase 2 (⏳ Pending): Connect existing CrossChainSync as adapter
  3. Phase 3 (⏳ Pending): Authorize GlobalSupplyTracker
  4. Phase 4 (⏳ Pending): Update TokenFactory to use UnifiedSync
  5. Phase 5 (⏳ Pending): Enable Supra when EVM support launches

Future Enhancements

Supra EVM Support (Q1-Q2 2025)

When Supra launches EVM support:

  • Full Supra HyperNova integration
  • L1-to-L1 cryptographic consensus
  • Sub-second finality
  • Enhanced security model

Supra Oracle Integration (Phase 1 - Recommended)

Supra DORA 2.0 oracles offer:

  • 600-900ms finality
  • Real-time price feeds
  • Price verification layer
  • RWA data support

Timeline: 2-4 weeks for integration

AutoFi Integration (Future)

Supra AutoFi provides:

  • Zero-block delay automation
  • No keepers/relayers needed
  • Automated airdrops, vesting
  • Cross-chain automation

Benefits Summary

For Users

  • ✅ More reliable cross-chain sync
  • ✅ Faster synchronization (when Supra launches)
  • ✅ Better security guarantees
  • ✅ No disruption to existing tokens

For Platform

  • ✅ Redundancy and failover
  • ✅ Performance optimization
  • ✅ Future-proofing
  • ✅ Competitive differentiation

For Developers

  • ✅ Protocol-agnostic design
  • ✅ Easy to add new protocols
  • ✅ Metrics for optimization
  • ✅ Clear migration path

Technical Details

Contract Interfaces

UnifiedCrossChainSync:

function syncSupplyUpdate(
    address token,
    uint256 newSupply,
    uint32 sourceEID
) external payable;

function setTokenProtocol(
    address token,
    Protocol protocol
) external onlyOwner;

function getProtocolMetrics(
    Protocol protocol
) external view returns (ProtocolMetrics memory);

SupraSync:

function syncSupplyUpdate(
    address token,
    uint256 newSupply,
    uint32 sourceEID
) external payable;

function setEnabled(bool _enabled) external onlyOwner;

function isReady() external view returns (bool);

Documentation

  • Full Architecture: docs/DUAL_CROSS_CHAIN_ARCHITECTURE.md
  • Implementation Summary: DUAL_CROSS_CHAIN_IMPLEMENTATION_SUMMARY.md
  • Deployment Guide: contracts/DEPLOY_UNIFIED_SYNC.md
  • Deployment Results: UNIFIED_SYNC_DEPLOYMENT_COMPLETE.md

Conclusion

The dual cross-chain architecture represents a significant upgrade to Crossify's infrastructure. By supporting multiple protocols in parallel, we've created a more robust, flexible, and future-proof system that maintains backward compatibility while enabling new capabilities.

Status: ✅ Contracts deployed, ⏳ Awaiting Supra EVM support for full activation


Related Documentation


- MikeLee

For general architecture, see Architecture
For contract details, see Contracts
For roadmap, see Roadmap

Clone this wiki locally