DÆTA
  • DÆTA
  • DÆTA Storage
    • Overview
    • Vision
    • Problem Statement
    • Market Opportunity
  • Use DÆTA
    • DÆTA Account
    • DÆTA Client
    • Use DÆTA App
  • Core Concepts
    • Decentralized Storage
    • Storage Nodes
    • Storage Contracts
    • Encryption and Security
  • Node Operations
    • Storage Node
    • Node Management
    • Performance Optimization
  • DÆTA Framework
    • Key Components
      • Users
      • Nodes
      • Satellites
    • Data Flow
    • Redundancy and Data Repair
    • Blockchain Compatibility
    • Third-party Integrations
    • Industry Use Cases
  • DÆTA LVRG
    • Overview
    • Vision
  • Key Features
    • GPT-to-Earn
    • Open Data Marketplace
  • Data Components
    • Datasets
    • Autonomous Agents
  • Data Sovereignty & Decentralization
    • Data Sovereignty
    • Decentralization & Censorship Resistance
  • How to Get Started
    • Install DÆTA LVRG Extension
  • Tokenomics
    • DÆTA Token
    • Utility and Economic Mechanism
    • Staking and Rewards
    • Allocations
  • Resources
    • Roadmap
    • FAQ
    • Glossary
    • Contact
    • Legal Disclaimer
    • Compliance
  • External Links
    • Website
    • Twitter
    • Telegram
    • Discord
    • Blog
    • GitHub
    • Whitepaper
    • Token Audit
    • LVRG Audit
    • LinkTree
Powered by GitBook
On this page
  1. Core Concepts

Storage Contracts

Storage contracts in DÆTA define the agreements between users and storage providers, ensuring a decentralized and transparent relationship.

Storage contracts are smart contracts that govern the relationship between users (renters) and storage providers (nodes) on the DÆTA network.

Contract Lifecycle

state Diagram v2
stateDiagram-v2
    [*] --> Negotiation
    Negotiation --> Active: Terms Agreed
    Active --> Renewal: Contract Expiring
    Active --> Terminated: Terms Violated
    Active --> Completed: Contract Fulfilled
    Renewal --> Active: New Terms Agreed
    Renewal --> Terminated: No Agreement
    Completed --> [*]
    Terminated --> [*]

Key Contract Parameters

Length of the storage agreement.

90 days.

Amount of data to be stored.

100GB.

Number of copies to maintain.

3x.

Minimum node availability.

99.9%.

Frequency of payments to nodes.

Weekly.

Consequences for contract violations.

10% stake slash.

Sample Contract

Simplified Solidity
pragma solidity ^0.8.0;

contract DAETAStorageContract {
    address public renter;
    address public provider;
    uint256 public dataSize;
    uint256 public duration;
    uint256 public price;
    uint256 public startTime;
    bool public active;

    event ContractCreated(address renter, address provider, uint256 dataSize);
    event ContractFulfilled(address renter, address provider);

    constructor(address _provider, uint256 _dataSize, uint256 _duration) payable {
        renter = msg.sender;
        provider = _provider;
        dataSize = _dataSize;
        duration = _duration;
        price = msg.value;
        startTime = block.timestamp;
        active = true;

        emit ContractCreated(renter, provider, dataSize);
    }

    function fulfillContract() external {
        require(msg.sender == provider, "Only provider can fulfill");
        require(block.timestamp >= startTime + duration, "Contract not yet complete");
        require(active, "Contract no longer active");

        active = false;
        payable(provider).transfer(price);

        emit ContractFulfilled(renter, provider);
    }

    // Additional functions for disputes, early termination, etc.
}S
PreviousStorage NodesNextEncryption and Security

Last updated 7 months ago