Curvance
  • Protocol Overview
    • Click Less, Earn More
    • Protocol Architecture
    • Asset Types
    • Liquidity Markets
      • Borrowing
      • Liquidations
      • Interest Rates
      • Oracles
      • Collateral Caps
      • Bad Debt Socialization
    • Application Specific Sequencing
    • New Age Liquidity Mining
      • Protocols
    • How Are New Assets Integrated
    • Plugin System
    • Universal Account Balance
    • Token Approval Management
    • Lending Risks
  • Security
    • Security and Audits
  • Miscellaneous
    • RPCs and Testnet Stability
    • Glossary
    • TL;DR
      • Customer Types and Benefits
    • Brand Assets
    • Weblinks
    • Disclaimer
    • Frequently Asked Questions
  • Developer Docs
    • Overview
    • Quick Start Guides
      • Atlas Fastlane Auctions (coming soon)
      • Plugin Integration
        • List of Delegable Actions
      • Loans & Collateral
        • Lend Assets
        • Deposit into pTokens
        • Withdraw Loans
        • Withdraw pTokens
      • Borrowing & Repayment
        • Borrow
        • Repaying Debt
      • Leverage
        • Leveraging
        • Deleveraging
    • Lending Protocol
      • Market Manager
      • Position Tokens (pToken)
      • Earn Tokens (eTokens)
      • Dynamic Interest Rate Model
      • Universal Balance
    • Position Management
      • Leverage
      • Deleverage / Fold
    • Dynamic Liquidation Engine (DLE)
      • Orderflow Auction System
      • Bad Debt Socialization
    • Plugin & Delegation System
      • Transfer Lock Mechanism
      • Delegable Actions
    • Cross-Chain Functionality
      • Messaging Hub
      • Fee Manager
      • Reward Manager
    • Auxiliary Functionality
Powered by GitBook
On this page
  • 1. Biweekly Reward Cycle
  • 2. Pro-Rata Distribution
  • 3. Reward Accumulation
  • 4. USDC Distribution via CCTP/Wormhole
Export as PDF
  1. Developer Docs
  2. Cross-Chain Functionality

Reward Manager

PreviousFee ManagerNextAuxiliary Functionality

Last updated 14 days ago

1. Biweekly Reward Cycle

The Curvance Protocol operates on a biweekly (2-week) epoch cycle for distributing rewards point amounts across all supported chains. This process is coordinated by the MessagingHub contract which serves as the cross-chain communication layer.

Key aspects:

  • Each epoch lasts exactly 2 weeks as defined by EPOCH_DURATION in the CentralRegistry.

  • The MessagingHub coordinates epoch transitions by querying points across all chains.

  • The RewardManager tracks which epoch's rewards have been delivered using nextEpochToDeliver .

  • State transitions occur when the MessagingHub calls recordEpochRewards() with the calculated reward amounts.

State machine:

2. Pro-Rata Distribution

Rewards are distributed proportionally across all chains based on the amount of points on each chain.

Key aspects:

  • The MessagingHub uses Wormhole's Cross-Chain Query (CCQ) to get accurate point counts from all chains.

  • Reward distribution is calculated as: (Chain's Points / Total Points) * Total Rewards .

  • Each chain receives a pro-rata share of the total protocol fees based on its proportion of points.

  • This creates an incentive for chains to accumulate points to increase their share of rewards.

Data flow:

3. Reward Accumulation

The system allows users to accumulate rewards over multiple epochs without having to claim them immediately.

Key aspects:

  • Each user has a userNextClaimIndex that tracks the next epoch they can claim rewards from.

  • epochRewardsPerPoint records the rewards allocated per point for each epoch.

  • Users can claim multiple epochs of accumulated rewards in a single transaction.

  • The formula for a user's rewards for an epoch is: (User's Points * epochRewardsPerPoint[epoch]) / WAD .

4. USDC Distribution via CCTP/Wormhole

The cross-chain movement of rewards (primarily USDC) is handled through Circle's Cross-Chain Transfer Protocol (CCTP) and Wormhole's messaging system.

Key aspects:

  • The protocol uses CCTP to transfer USDC between chains, ensuring secure token transfers.

  • Wormhole's automatic relayer system delivers cross-chain messages with execution guarantees.

  • The MessagingHub sends both USDC tokens via CCTP and reward metadata via Wormhole.

  • When a chain receives USDC, it routes the tokens to its local RewardManager.

Cross-chain token flow:

This architecture ensures that rewards are efficiently distributed across chains while maintaining a consistent state of reward records throughout the entire protocol.