Introducing Rewards v2 by WOOF!

WOOF! introduces a significant upgrade to the rewards system: Rewards V2. This new version enhances flexibility, transparency, and efficiency in distributing incentives to users participating in the protocol. Rewards V2 complements the existing rewards system, providing additional functionality and customization options.

What is Rewards V2?

Rewards V2 is an updated mechanism for distributing rewards in Compound V3, introducing a more efficient and scalable approach by leveraging Merkle trees to track and distribute incentives to eligible users. The system supports both retroactive and ongoing rewards distribution, ensuring fairness and flexibility. Moreover, Rewards V2 allows rewards to be distributed in any ERC-20 token, not just COMP, giving governance and integrators the freedom to customize incentive structures.

Key Features

  • Merkle Tree-Based Rewards: Uses a Merkle tree structure for efficient reward distribution with minimized gas costs.
  • Support for Any Token Rewards: Rewards can be distributed in COMP or any other ERC-20 token chosen by governance.
  • Batch Processing: Allows accumulation and claim of rewards over multiple epochs.
  • On-Chain Validation: Ensures rewards distribution remains transparent and verifiable.
  • Configurable Reward Policies: Supports various reward distribution strategies based on governance decisions.
  • Retroactive Claims: Enables users to claim rewards for past activities, even if they did not claim them earlier.
  • Complements the Existing System: Rewards V2 adds flexibility and new capabilities to the current rewards model, without changing existing smart contracts infrastructure.

How does Rewards V2 work?

Rewards V2 operates by periodically generating and storing Merkle trees that encapsulate reward entitlements for users. This approach significantly reduces the on-chain storage and computational costs. The system works as follows:

  1. Data Collection - User interaction data is aggregated, including borrowing and supplying activities in the protocol.
  2. Reward Calculation - The reward amounts are computed based on predefined governance rules.
  3. Merkle Tree Generation - A Merkle tree is generated from the reward data, with proofs allowing users to verify their entitlements.
  4. Merkle Root Submission - The computed Merkle root is stored on-chain to serve as a reference for reward claims.
  5. User Claims - Users submit their Merkle proofs to claim accrued rewards efficiently.

How to use Rewards V2

For Users

  1. Check Your Rewards
    • Users can query their reward entitlements through the Compound UI or directly via smart contracts.
    • Each reward cycle has a corresponding Merkle proof that verifies the user’s eligibility.
  2. Claim Your Rewards
    • Submit the Merkle proof to the CometRewardsV2 contract to claim your tokens.
    • Rewards can be claimed in COMP or any ERC-20 token designated by governance.
    • Gas costs are minimized due to the efficient batch processing mechanism.

For Developers

  1. Deploy the Rewards V2 Contract
    • Developers need to deploy an instance of the CometRewardsV2 contract to manage reward distribution.
  2. Generate the Merkle Tree
    • Use the provided scripts in the Compound repository to process user activity data and generate a Merkle tree.
  3. Submit the Merkle Root
    • Once the tree is generated, submit the Merkle root to the deployed rewards contract.
    • This establishes the rewards structure for the current epoch.
  4. Store the Merkle Tree JSON
    • The full Merkle tree JSON can be stored in the repository or any decentralized storage solution.
    • Any user can regenerate the Merkle tree and validate rewards independently.
  5. Facilitate Reward Claims
    • Users can retrieve their proofs and submit them to the smart contract to claim rewards.
    • Developers can integrate automated claim scripts to simplify the process for users.

Artifacts and additional resources

For a more detailed understanding of how to generate Merkle proofs and integrate Rewards V2 into your project, please refer to the following resources:

Why upgrade to Rewards V2?

Rewards V2 introduces an optimized, gas-efficient, and scalable method for distributing incentives. The new system ensures:

  • Lower transaction costs compared to the previous direct-distribution model.
  • Improved user experience by enabling batch processing and retroactive claims.
  • Seamless governance control over incentive structures and distribution policies.
  • Greater transparency and verifiability with on-chain Merkle root storage.
  • Flexibility in Reward Tokens, allowing incentives in multiple ERC-20 tokens instead of being limited to COMP.
  • Complements the Existing Rewards System, enabling protocols to combine both mechanisms for tailored incentive models.

With the launch of Rewards V2, Compound V3 continues to evolve, bringing enhanced efficiency and user-friendly features to the protocol. Whether you are a user looking to maximize your rewards or a developer aiming to integrate incentive mechanisms into your project, Rewards V2 provides the necessary tools and flexibility to support your needs.

Next steps

  1. Security audit fixes finalization and report
  2. Formal on-chain proposal for adoption of Rewards v2
  3. Front-end integration
  4. Launch for the next incentivization campaign
9 Likes