ComFox Docs
  • 👋Welcome
  • ☀️Introduction
  • 😭market dilemma
  • 🔨ComFox's Solution
  • 💥Core Philosoph
  • Technology
    • Terminology
    • Daily Mandatory Reward Release
    • On-Chain Automatic Dividend Algorithm
  • Triple token buyback for price increase
  • Three-Dimensional Ecosystem
  • Investor Income Matrix
  • Empowerment System For Projects
  • Value Symbiosis Engine
  • Zero-Knowledge Proof for Referral Rewards Distribution
  • FairMint Protocol
  • PowerSwap Engine
  • BurnDAO Mechanism
  • Economics
    • Token Model
    • LPH Mining Rewards
    • TH Mining Rewards
    • TS Ranking
    • Selling Mechanism
  • Advantages
    • 👀Advantages
    • ⏰Triple-Win Ecosystem
    • 📊Strengths of project issuers:
  • Tutorials & Links
    • 📗Tutorials
    • 🔗Links
Powered by GitBook
On this page
Export as PDF

Zero-Knowledge Proof for Referral Rewards Distribution

PreviousValue Symbiosis EngineNextFairMint Protocol

Last updated 10 days ago

Referral rewards are calculated off-chain using Merkle trees and verified on-chain (off-chain computation, on-chain proof). The source data for the Merkle tree is entirely derived from on-chain data. Anyone can use third-party tools or write their own code to calculate the Merkle tree's Root value and compare it with the Root value stored in the MiningPool contract to verify the authenticity of reward distribution.

  1. How to Obtain Your Reward Proof?

For example, Account 1's reward proof consists of the following data: User1, Rewards1, Hash2, Hash34—essentially all data related to calculating the Root value.

  1. What is a Zero-Knowledge Proof?

When submitting reward proof data to the smart contract, the contract calculates the Root value. If the calculated Root value matches the one stored in the contract, the proof is valid, and rewards can be claimed. Before users submit reward proof data to the contract, the contract only stores a Root value and no other user reward data. Yet, it can verify how much reward a user should receive—this is the essence of zero-knowledge proof.