Webhash Documentation
  • About WebHash
    • What is Webhash Protocol?
    • Digital Decay & Illusion of Decentralization
    • 3 Layer Solution
  • The three layers
    • Hosting Layer
      • Replication Algorithm
      • Technical Specification & Node Setup
      • Incentives and Penalty Mechanism
      • On Chain Content Registry
    • Gateway Layer
      • Content Retrival
      • Integrated Caching
      • Technical Specification
    • Application Layer
      • Developer-focused (like Vercel)
      • No-Code community (like Webflow)
      • AI Agent for complete beginners (prompt-to-website)
      • Web2 → WebHash
    • Website Permanance
      • Storage Pool
      • Inflationary Token Issuance
      • Self-Replication
      • Reputation
      • Community Archival Efforts
  • WebHash Token - $HASH
    • WebHash Token - $HASH
  • Eco-System Products
    • Modly AI
    • Hash Dweb Gateway: Chrome Extension
    • Eth.cd
    • Write.link
    • Widecanvas AI
    • Hash.is
    • eth.lk – Ethereum Gateway
    • arb.qa – Arbitrum Gateway
    • bnb.qa – Binance Smart Chain Gateway
    • HashVault
  • Token Trails
  • Governance
    • WebHash DAO
    • Governance Structure
    • Key Functions of the DAO
    • Content Moderation & Protection
    • Governance Process & Voting
    • The Future of WebHash DAO
Powered by GitBook
On this page
  1. The three layers
  2. Website Permanance

Storage Pool

The Storage Pool is a smart contract (or set of smart contracts) designed to:

  • Accumulate, manage, and distribute funds that incentivize node operators to store and serve content.

  • Enable a user (publisher) to pay once for hosting (the "endowment"), with automated micropayments to nodes over time.

  • Invest portions of these funds in yield-bearing strategies, ensuring long-term sustainability.

Key Objectives

  1. Long-Term Funding

    • Combine a one-time user deposit with protocol-level inflation.

  2. Automated Reward Distribution

    • Continuously pay nodes that prove they store the content.

  3. Secure Custody

    • Protect deposited and invested funds from misuse or unauthorized withdrawal.

  4. Upgradable Governance

    • Allow the community (DAO or protocol committee) to adjust parameters (reward rates, investment strategies) as conditions evolve.

Roles & Responsibilities

Publisher (User)

  • Pays One-Time Fee: Deposits a lump sum (in tokens or stablecoins) into the Storage Pool.

  • Specifies Content: Links the deposit to a specific piece of content (e.g., via a content hash).

Node Operators

  • Store Data: Host the funded content on their infrastructure.

  • Submit Proofs: Periodically prove they hold and can serve the data (Proof-of-Storage).

  • Receive Rewards: Earn micropayments proportionate to their proven storage and possibly enhanced by a reputation score.

Smart Contract (Storage Pool)

  • Funds Custody: Holds the endowment, plus additional inflows (inflation, donations, etc.).

  • State Tracking: Maintains mappings of content hashes, node data, reward balances, etc.

  • Distributes Rewards: Releases funds based on proof submissions and any associated reputation metrics.

Governance Entity (DAO or Protocol Committee)

  • Manages Configuration: Sets reward schedules, inflation splits, and investment parameters.

  • Implements Upgrades: Deploys new contract logic when needed.

  • Handles Disputes: Mediates conflicts or fraudulent claims about proofs or storage.

Smart Contract Architecture

In practice, the Storage Pool can be split into separate modules for clarity and security:

  1. Core Pool Contract

    • Funds Custody: Retains enough liquid assets to handle near-term reward distributions.

    • State Tracking: Maps content hashes to total funding, node addresses to proof records, etc.

  2. Proof Registration Module

    • Oracles / Off-Chain Verification: Collects or checks cryptographic proofs of data storage.

    • Reward Calculation: Ties verified proof outcomes to the node’s share of payouts.

  3. Inflation Integration Module

    • Receives New Tokens: From the protocol’s token-minting process.

    • Routes to Pool: Increases the global balance used for node rewards.

  4. Endowment Investment Contract

    • Manages Surplus Capital: Invests the majority of funds in yield-bearing opportunities.

    • Periodic Transfers: Sends harvested yields (and principal if needed) back to the Core Pool.

  5. Governance/Upgrade Module

    • DAO-Controlled: Implements changes (e.g., reward adjustments, new strategies) via proposals and on-chain voting.

    • Proxy/Upgradeable Logic: Allows safe upgrades without migrating user funds.

Data Structures & State Variables

Below is a representative example of variables in the Core Pool Contract. Actual implementations may vary, but the conceptual roles remain consistent.

Global Parameters

uint256 public lastRewardBlock;          // Tracks the last reward distribution block/epoch
uint256 public rewardCycleInterval;      // Interval (in blocks or time) between distributions

mapping(bytes32 => ContentInfo) public contentMap; // contentHash → ContentInfo

ContentInfo Struct

struct ContentInfo {
    uint256 totalFunded;       // Total tokens allocated to this content
    uint256 lastDistribution;  // Last time (block or epoch) a distribution occurred
    // Additional fields like 'reputationMultiplier', 'sponsorAddress', etc.
}

Node Tracking

mapping(address => NodeInfo) public nodeMap; // nodeAddress → NodeInfo

struct NodeInfo {
    uint256 totalStaked;       // Optional: staking for security or spam prevention
    uint256 reputationScore;   // Current reputation rating
    // Potentially track which content hashes this node stores
}

Reward State

uint256 public globalPoolBalance;   // Sum of user deposits + unallocated inflation
// Additional tracking for unclaimed rewards, past distributions, etc.

Inflation Handling

If inflation is managed externally (e.g., a separate minting contract), the Core Pool Contract can implement:

function onInflationReceived(uint256 amount) external {
    globalPoolBalance += amount;
    // Possibly trigger an event or immediate partial distribution
}

Investing Storage Pool Funds

Why Invest?

  • Perpetual Funding: A single lump sum risks depleting over time; yield generation extends its viability.

  • Mitigating Volatility: Diversified investments (lending, staking, real-world assets) can offset token price fluctuations.

  • Covering Future Cost Surges: Storage/bandwidth costs may rise or node participation incentives may require more funding.

Endowment Management Architecture

  1. Core Storage Pool Contract

    • Holds only the liquid capital needed for a few distribution cycles.

  2. Endowment Investment Contract

    • Overseen by DAO or multi-sign.

    • Invests the larger portion of the funds in yield-bearing strategies.

    • Periodically harvests and rebalances, transferring yields/principal to the Core Pool as needed.

DAO or Governance Oversight

  • Investment Strategy: The community decides on risk level, preferred DeFi platforms, or staking services.

  • Risk Management: Sets maximum allocations per strategy, monitors performance, and can withdraw in emergencies.

  • Upgrades & Policy Changes: Adapts to new yield protocols, ends risky positions, or rebalances according to market conditions.

Potential Investment Strategies

Note: Actual strategies depend on the DAO’s risk appetite, availability of stable protocols, and broader market conditions.

  1. DeFi Lending (e.g., Aave/Compound)

    • Earn interest by lending stablecoins or accepted tokens to borrowers.

    • Risk: Smart contract exploits, borrower defaults, liquidity shortfalls.

  2. Staking or Liquid Staking (e.g., Ethereum, Polkadot, Lido)

    • Gain rewards for helping secure Proof-of-Stake networks.

    • Risk: Slashing penalties for validator misconduct, token price volatility.

  3. Yield-Farming Aggregators (e.g., Yearn, Beefy)

    • Automated optimization across multiple DeFi pools.

    • Risk: Stacked contract complexities, potential impermanent loss on AMMs.

  4. Real-World Asset Tokenization (e.g., Centrifuge, Maple)

    • Invest in tokenized bonds, mortgages, or other off-chain instruments.

    • Risk: Legal/counterparty risk, regulatory uncertainties, potential defaults.

  5. Diversified Approach

    • Distributes endowment across multiple strategies to balance risk and return.

Yield Distribution Mechanisms

Periodic Harvesting

  • The Endowment Investment Contract collects interest, staking rewards, or yield-farming gains (e.g., monthly).

  • Converts volatile tokens to stable assets if necessary to maintain consistent reward flows.

  • Sends the harvested amount to the Core Pool, where it’s added to globalPoolBalance and used for the next reward cycle.

Automatic Rebalancing

  • If the Core Pool balance drops below a threshold (e.g., enough for only one reward cycle), the system triggers a rebalance.

  • Additional funds are withdrawn from the investment side to replenish the Core Pool.

Reinforcing the Principal

  • A portion of yields (e.g., 30%) can be automatically reinvested, compounding the endowment.

  • This helps the fund grow over time, reducing the chance of depletion.

Risk Management & Safeguards

  1. Multi-Sign or DAO-Controlled Operations

    • Large withdrawals or strategy changes require community or multi-sign approval.

  2. Monitoring & Auditing

    • Real-Time Dashboards track yields, allocations, net asset value.

    • Periodic Audits of the smart contracts and investment integrations.

  3. Diversification & Caps

    • Limit how much the endowment invests in any single protocol.

    • Tier strategies by risk category to avoid overexposure.

  4. Emergency Withdrawal Mechanisms

    • Fail-Safe Switch: Allows urgent exit from compromised or underperforming strategies.

    • Timelocks: Give the community time to veto suspicious actions before they execute on-chain.

Example Flow: From Investment to Rewards

  1. User Payment

    • A publisher deposits 10,000 tokens to sponsor their website. The tokens go into the Core Pool.

  2. Excess Transfer

    • The governance logic sees that 2,000 tokens suffice for the next few reward cycles. It transfers 8,000 tokens to the Endowment Investment Contract.

  3. Investment Allocation

    • The contract invests 4,000 tokens in a DeFi lending protocol (e.g., Aave) and 4,000 in ETH staking.

  4. Accumulation

    • Over a month, DeFi lending yields 100 tokens in interest, and staking yields 150 tokens.

  5. Harvest

    • The Endowment Contract harvests 250 tokens. It sends 200 tokens back to the Core Pool for immediate rewards, reinvesting the remaining 50 tokens to grow the principal.

  6. Reward Payout

    • During the distribution cycle, nodes that proved storage for the website content share the 200 harvested tokens, plus any unspent balance.

  7. Rebalance If Needed

    • If the Core Pool’s liquid balance runs low, the contract automatically withdraws additional funds from the endowment to maintain stable payouts.

Integration with Protocol-Level Inflation

Alongside endowment-based funding, the WebHash protocol may introduce token inflation:

  1. Inflationary Token Issuance

    • A portion of newly minted tokens flows directly to the Storage Pool to cover immediate rewards.

    • Another portion can go to the Endowment Investment Contract to strengthen the principal.

  2. Dynamic Adjustments

    • Over time, the protocol might reduce the inflation rate, relying more on yields to fund node rewards.

    • Governance can fine-tune how much inflation is directed toward immediate distribution vs. long-term investment.

PreviousWebsite PermananceNextInflationary Token Issuance

Last updated 2 months ago