On Chain Content Registry
The On-Chain Content Registry in WebHash Protocol ensures permanent, verifiable, and decentralized storage tracking. It utilizes EVM-compatible smart contracts to register, verify, and audit content storage by participating nodes.
This system:
✅ Tracks which nodes store which Content Identifiers (CIDs) ✅ Enforces transparency and trust using cryptographic proofs ✅ Maintains accurate storage usage tracking per node ✅ Enables decentralized content pinning verification
The smart contracts that govern the On-Chain Content Registry are modular, upgradable using UUPS, and interoperable with WebHash's reputation and incentive systems.
1. Smart Contract Architecture Overview
The On-Chain Content Registry consists of three primary smart contracts:
Contract
Purpose
NodeRegistry
Maintains a ledger of registered nodes, including metadata and reputation scores.
ContentRegistry
Tracks which nodes store which CID, ensuring transparency and reward eligibility.
RewardContract
Automates reward distribution based on storage, uptime, and retrieval metrics.
2. Node Registration & Identity Management
A. NodeRegistry Contract
The NodeRegistry contract maintains a trustless, verifiable list of participating storage nodes.
Data Structure
Key Functions
B. Security & Verification
✅ Verifies node identity by linking IPFS Peer ID with an on-chain Ethereum address ✅ Ensures public traceability of all node activities ✅ Tracks storage usage to prevent overcommitment
3. Content Storage Tracking & Pinning Verification
A. ContentRegistry Contract
The ContentRegistry contract records which nodes store which CID, ensuring on-chain verifiability of decentralized storage.
Data Structure
Key Functions
B. On-Chain Storage Verification Process
1️⃣ Content Registration:
• Content is registered with its CID and size • System tracks the content metadata on-chain
2️⃣ Storage Confirmation:
• Nodes can confirm pinning specific CIDs • System automatically tracks storage usage • Prevents exceeding declared node capacity
3️⃣ Verification:
• Content pinning status is publicly verifiable • Storage usage is tracked per node • System maintains accurate pinned content counts
✅ Ensures full traceability of stored content ✅ Prevents false storage claims through capacity tracking ✅ Enables decentralized auditing of stored content
WebHash provides a robust foundation for decentralized content storage tracking and verification, ensuring transparency and reliability in the network.
4. Reward Distribution & Incentive System
A. RewardContract
The RewardContract automates fair, transparent compensation for nodes based on: ✔ Storage Capacity – Higher pinned data = More rewards. ✔ Uptime – Consistent availability = Increased incentives. ✔ Bandwidth Served – More retrievals = Additional compensation. ✔ Reputation-Based Boost – High-performing nodes earn extra.
Data Structure
Key Functions
B. Reward Distribution Logic
1️⃣ Metrics Submission (Every 24 Hours)
Nodes submit on-chain proofs of storage & uptime via
submitMetrics()
.If a node fails to submit, it receives penalty deductions.
2️⃣ Automated Reward Calculation
calculateRewards()
computes rewards at the end of each epoch (e.g., every 10,000 blocks).Uses a weighted formula for fair distribution:
Nodes with higher reputation scores receive boosted rewards.
3️⃣ Claiming Rewards
Nodes call
claimRewards()
to withdraw earned WebHash tokens.Rewards are locked for 3 epochs to prevent abuse.
✅ Ensures fair incentive distribution. ✅ Encourages high uptime and performance. ✅ Reduces risk of free-riders gaming the system.
WebHash eliminates centralized pinning dependencies, making permanent, decentralized website hosting a reality.
Last updated