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
  • NFT Watermarks
  • Lazy Mint
  • Mint
  • Authorized Mint
  • For pointer watermarks
  • Watermark Registration Process
  • Watermark Threshold
  • Watermark Tracking
  • Request Limits
  1. GETTING STARTED
  2. Invisible Watermarks - Blockchain

Watermark Register

NFT Watermarks

NFT watermarks can be directly embedded into the media asset using three methods: lazy mint, mint, and authorized mint.

Lazy Mint

Creators can create vouchers without cost to propose derivative IP Assets for the collection. Other users can then use these vouchers to mint NFTs by paying the appropriate fees.

The parameters for the voucher are as follows:

Property Name
Type
Description

requestId

bytes32

A unique ID used by the register.sol contract to specify which voucher or NFT the watermark request belongs to

maximumUse

number

How many times the voucher can be used

tradeToken

string

The token that the user pays with if xERC20 not present

watermarkPaymentToken

string

The token that watermark is paid in

creator

string

Address of the creator of the voucher

collection

string

Address of the collection the voucher belongs to

price

number

Price the creator sets for the mint. Must be greater than the minimum price set by the collection

signature

bytes32

Signature of the voucher

The requestId is the key variable in this process:

  • A random, standardized requestId is provided by the sequencer when creating a voucher

  • The sequencer maintains the watermark requests queue

  • When the register contract emits a register event, it includes the requestId

  • Xeal nodes listen for this event and provide the watermark

  • Upkeep nodes store these watermarks in batch in the upkeep contract

A single voucher can create multiple NFTs using the maximumUse variable. NFTs created by the same creator using a single voucher share the same requestId but have different targetIds.

The targetId determines watermark assignment:

  • If targetId is 0: The sequencer assigns a random watermark with the specified requestId

  • If targetId is greater than 1: The system matches the corresponding targetId for watermarking and minting

Mint

When a collection is marked as permissionless (isPermissionless = true), anyone can mint an NFT by paying the minimum fee specified by the xNFT contract, without using lazy mint.

Authorized Mint

In collections marked as permissioned (isPermissionless = false), only the collection owner can mint NFT tokens without fees.

For pointer watermarks

A NFT token owner can use requestPointerWatermark to mint a watermark that points to the NFT. Only the NFT's information and the NFT owner information will be shown in the mobile verification.

Watermark Registration Process

  1. The process begins by calling the requestWatermarkMap function from the register.sol contract:

function requestWatermarkMap(
    address _nftContract,
    uint256 _tokenId,
    address _watermarkPaymentToken,
    uint256 _watermarkCount,
    bytes32 _watermarkRequestId,
    uint256 _watermarkTargetId
) external payable
  1. This Register contract can be called from any Xeal-supported chain.

  2. Nodes listen for events emitted by this function call.

  3. When a partition threshold for the watermark is met, the Register contract emits a PartitionIdIncremented event:

event PartitionIdIncremented(uint256 newPartitionId, uint256 chainId);
  1. This event notifies the node to collect all records for the watermark registers and create a Merkle proof.

Watermark Threshold

The Register.sol contract manages fee collection and event emission for watermark processing by nodes. It enforces a maximum limit on watermark requests per call to maintain atomic operations and prevent node throttling.

Watermark Tracking

The contract maintains two key counters:

  • currentWatermarkCount: Tracks the number of watermarks in the current partition

  • partitionId: Identifies the current partition

The partitionId increments when currentWatermarkCount reaches the watermarkThreshold. The watermarkThreshold defines the maximum number of watermarks that can fit in a partition.

Request Limits

The maximum number of watermarks allowed in a request is calculated as:

watermarkThreshold - currentWatermarkCount + nextWatermarkThreshold

nextWatermarkThreshold is used when the protocol updates the threshold value:

  • Changes to threshold only take effect after partitionId increment

  • When partitionId increments, nextWatermarkThreshold becomes the new watermarkThreshold

  • After the increment, nextWatermarkThreshold resets to 0

PreviousInvisible Watermarks - BlockchainNextWatermark Upkeep

Last updated 6 months ago