Cross-Chain Functionality
Last updated
Last updated
The Curvance Protocol implements a sophisticated cross-chain architecture that enables seamless operation across multiple blockchains while maintaining protocol-wide consistency. This architecture enables unified governance, shared incentives, and the efficient distribution of rewards across the entire ecosystem.
The cross-chain system consists of several specialized components that work together:
CentralRegistry: Serves as a single source of truth for each chain, containing protocol configuration and contract addresses.
MessagingHub: The unified communication layer that enables cross-chain message passing. It handles:
Epoch coordination
Fee distribution
Governance message propagation
FeeManager: Collects protocol fees and prepares them for cross-chain distribution.
RewardManager: Distributes rewards to entitled parties.
VotingHub: Coordinates token emission allocation across all chains based on governance decisions.
Curvance's cross-chain architecture relies on two primary technologies:
Wormhole
Facilitates generic message passing between chains.
Provides Cross-Chain Query (CCQ) capability for state verification.
Powers the system's VAA (Verifiable Action Approval) verification.
Circle's CCTP (Cross-Chain Transfer Protocol)
Handles token transfers between chains.
Primarily used for fee and reward token movements.
The Curvance Protocol has several critical cross-chain data flows:
This diagram illustrates the bi-weekly process of distributing protocol fees across all chains in the Curvance ecosystem:
A privileged operator initiates the process on one chain by querying points across all other chains using Wormhole CCQ.
After verification of chain data, the system pulls accumulated fees from the local FeeManager.
The protocol calculates each chain's share of fees based on the proportion of total points on that chain.
Fees are then transferred to destination chains using CCTP for the token transfer, alongside a Wormhole message carrying distribution instructions.
Each receiving chain's MessagingHub routes the received tokens to its RewardManager for distribution to point accumulators proportionally.
This mechanism ensures fair fee distribution based on governance participation across all chains in the ecosystem.
The Curvance cross-chain architecture implements several key states:
This diagram outlines the state transitions during a Curvance protocol epoch:
Epoch Start: A new epoch begins based on the timestamp defined by genesisEpoch + (epochNumber * EPOCH_DURATION)
.
Fee Collection & Trading Activity: During the epoch, fees accumulate from protocol activity across all chains independently.
Cross-Chain Coordination: Near epoch end, the protocol aggregates points across all chains using Wormhole CCQ to determine reward distribution.
Fee Distribution: Collected fees are distributed pro-rata to each chain based on its proportion of total points, with tokens bridged using CCTP.
Epoch Completion: The nextEpochToDeliver
counter is incremented, allowing the system to track epochs sequentially and ensure proper distribution.
The epoch system operates in a strictly sequential manner to ensure consistency across chains.
The cross-chain architecture implements several safety mechanisms:
Message Hash Verification: Each cross-chain message is tracked by its hash to prevent replay attacks.
Messaging Status Controls: The messaging hub can be put into various states to control message creation and execution:
Status 1: Full operation (create and execute messages).
Status 2: Execute-only mode (no new messages).
Status 3: Complete pause (no operations).
Guardian Validation: Uses Wormhole guardians to validate cross-chain messages through VAA signatures.
Chain Verification: Messages are only accepted from known, registered chains configured in the Central Registry.
Fallback Mechanisms: If the system gets stuck, administrative overrides exist to ensure continued operation.
The Curvance Protocol maintains cross-chain consistency through:
Synchronized Epochs: All chains share a common epoch schedule, defined by the genesisEpoch and epochDuration values.
Cross-Chain Queries: The system uses Wormhole's CCQ to verify the state of remote chains before making critical decisions.
Sequential Epoch Processing: Each epoch must be processed in order, and all chains must catch up sequentially (tracked via nextEpochToDeliver).
Verifiable Messages: All cross-chain communications are verified through cryptographic signatures from Wormhole guardians.
The Curvance cross-chain architecture creates a unified, multi-chain DeFi protocol that maintains consistency and shared state across all supported networks. This design enables protocol-wide coordination for token emissions, fee distribution, and governance while allowing users to interact with the protocol on their preferred blockchain.