EPH AI
  • OVERVIEW
    • Introduction
    • Vision
    • Mission
    • Market problems
    • EPH AI Solutions
  • PRODUCT
    • Key features
      • Staking
      • Lending and earn
      • Renting and cashback
      • Referral Program
      • AI Builder
    • Technical Architecture
      • Blockchain Layer
      • AI Resource Layer
      • AI Model Layer
    • Use cases
      • For Node Providers
      • For Consumers
    • Security and privacy
  • TOKEN ECONOMY
    • Token economy
    • Token utility
    • Tokenomics
  • AFFILIATE STRUCTURE
    • Model
    • Reward recipient
    • Rewards
    • Additional scheme
  • ADDITIONAL INFORMATION
    • Roadmap
    • Community
  • LEGAL
    • Legal disclaimer
    • Risks
    • Anti-cheat regulations
Powered by GitBook
On this page
  1. PRODUCT
  2. Technical Architecture

Blockchain Layer

The Blockchain Layer manages all transactions on the platform, ensuring security, transparency, and immutability. It utilizes the Binance Smart Chain (BNB Chain) to handle smart contracts, tokenization, and transaction processing.

Components

  • Smart Contracts: Manage transactions and enforce rules without intermediaries.

    Contract Functions:

    • createListing(address seller, uint modelId, uint price): Creates a new listing for an AI model or resource.

    • purchaseListing(address buyer, uint listingId): Facilitates the purchase of a listed item.

    • releaseFunds(address seller, uint listingId): Releases funds to the seller upon successful transaction completion.

    • resolveDispute(uint listingId, address arbitrator): Handles disputes between buyers and sellers.

  • Tokenization: Utilize BEP-20 tokens for transactions within the platform.

    Token Functions:

    • mint(address to, uint256 amount): Mints new tokens.

    • transfer(address from, address to, uint256 amount): Transfers tokens between users.

    • burn(address from, uint256 amount): Burns tokens to reduce supply and control inflation.

  • Transaction Management: Ensure secure and transparent transactions.

Smart Contract in Solidity (for listing AI resources)

// 
pragma solidity ^0.8.0;

contract AIResourceMarketplace {
    struct Resource {
        uint id;
        address owner;
        string resourceType;
        uint price;
        bool available;
    }

    mapping(uint => Resource) public resources;
    uint public resourceCount;

    event ResourceListed(uint id, address owner, string resourceType, uint price);
    event ResourcePurchased(uint id, address buyer, uint price);

    function listResource(string memory _resourceType, uint _price) public {
        resourceCount++;
        resources[resourceCount] = Resource(resourceCount, msg.sender, _resourceType, _price, true);
        emit ResourceListed(resourceCount, msg.sender, _resourceType, _price);
    }

    function purchaseResource(uint _id) public payable {
        Resource memory _resource = resources[_id];
        require(_resource.available, "Resource not available");
        require(msg.value == _resource.price, "Incorrect value");

        _resource.owner.transfer(msg.value);
        _resource.available = false;
        resources[_id] = _resource;

        emit ResourcePurchased(_id, msg.sender, _resource.price);
    }
}
PreviousTechnical ArchitectureNextAI Resource Layer

Last updated 7 months ago