Xeal
  • Xeal
    • Xeal: Real World NFTs and Memes
    • TL;DR
    • Whitepaper
    • Token Distribution
    • Community & Links
  • VISION
    • 7 Key Values
    • Xeal and AI
      • Watermarks and AI generated content
      • Xeal and AI Agents
  • GETTING STARTED
    • xToken: Next Generation of Memecoins
      • Deflationary xToken
      • Fee Mechanism Diagram
    • xNFT: Next Generation of NFTs
      • IP Assets and xNFTs
      • Community Managed NFT Collections
      • Wrapped NFTs as xNFTs
    • Invisible Watermarks - Steganography
    • Invisible Watermarks - Blockchain
      • Watermark Register
      • Watermark Upkeep
    • Mobile App Scanning
  • DEV GUIDE
    • Contracts
    • FAQ
  • OTHER
    • Careers
      • Frontend Engineer
      • Backend Engineer
    • Media Kit
    • Disclaimer
Powered by GitBook
On this page
  • Node Processing and Upkeep
  • Process Flow
  • Verification
  • Protocol Benefits
  1. GETTING STARTED
  2. Invisible Watermarks - Blockchain

Watermark Upkeep

Node Processing and Upkeep

The upkeep contract enables anyone to verify watermarked asset validity and retrieve watermark information without relying on a centralized database.

Process Flow

  1. Nodes store Merkle nodes in IPFS

  2. Nodes submit Merkle root and IPFS URI to the Upkeep contract through performUpkeep:

function performUpkeep(
    uint256 _chainId,
    uint256 _partitionId,
    bytes32 _merkleRoot,
    string calldata merkleTreeURI
)

Verification

Watermark batches in a partition can be verified using the verifyMerkleProof method:

function verifyMerkleProof(
    uint256 _chainId,
    uint256 _partitionId,
    bytes32[] calldata _proof,
    bytes32 _leaf
) external view returns (bool) {
    bytes32 merkleRoot = merkleProofs[_chainId][_partitionId].merkleRoot;
    if (merkleRoot == bytes32(0)) {
        revert InvalidPartitionId();
    }
    return MerkleProof.verify(_proof, merkleRoot, _leaf);
}

Parameters for verification are available in the PerformUpkeep event:

event PerformUpkeep(
    uint256 indexed chainId,
    uint256 indexed partitionId,
    bytes32 indexed watermarkTreeRoot,
    string merkleTreeURI
);

The event's merkleTreeURI contains watermark hashes and IPFS links to media assets.

Protocol Benefits

  1. Multiple watermarks can be registered in a single transaction, reducing gas costs

  2. Users pay appropriate fees for watermark processing

  3. Creators can defer watermark fees to buyers through lazy minting

PreviousWatermark RegisterNextMobile App Scanning

Last updated 6 months ago