Yamata
Website
  • Yamata Nodes
    • DISCLAIMER
    • Transaction Processing
      • Order Submission Process
      • Sequencer Processing
      • Posting on the Blockchain
    • Order Validation
      • What are Validating Nodes (VNs)
      • Order Matching
      • Challenge Process
        • Discrepancy Detection
        • Challenge Initiation
        • Challenge Approval
      • Voting & Sequencer Defense
    • Reward Process
      • Transaction Fee Distribution
      • Challenge Results
      • Validating Nodes (VNs) Rewards
      • Withdrawal Process
    • Reputation System
      • Reputation Gain/Loss
      • Punishment Process
      • Reputation Score Ranges
    • Node Activation
      • Activation Fee
      • Node License NFT
      • Hosting
      • YAMATA Software
Powered by GitBook
On this page
  • Types of Discrepancies VNs Detect
  • Incorrect Sequencing of Orders by the Off-Chain Sequencer
  • Mismatch Between On-Chain and Off-Chain Data
  • Exclusion of Valid Orders by the Sequencer
  • Practical Scenario
  1. Yamata Nodes
  2. Order Validation
  3. Challenge Process

Discrepancy Detection

PreviousChallenge ProcessNextChallenge Initiation

Last updated 7 months ago

The Challenge Process begins when a Validating Node (VN) detects a discrepancy in the way transactions are processed. These discrepancies can arise in various forms, typically involving mismatches in the sequence or content of transactions. Below are examples of specific discrepancies that VNs monitor for, along with practical cases.

Types of Discrepancies VNs Detect

Incorrect Sequencing of Orders by the Off-Chain Sequencer

The sequencer is responsible for processing off-chain orders in the correct order. If the sequencer processes these orders out of order, VNs will detect this and raise a challenge.

Example:

  • Order 1: User A submits a sell order for 1 BTC to buy 1 ETH at 10:01 AM.

  • Order 2: User B submits a sell order for 1 ETH to buy 1 BTC at 10:02 AM.

The correct sequence should be that Order 1 is processed before Order 2. If the sequencer mistakenly processes Order 2 before Order 1, VNs will detect this as a discrepancy in the sequencing and trigger a challenge.


Mismatch Between On-Chain and Off-Chain Data

VNs also compare the transactions processed by the off-chain sequencer with the corresponding records on the blockchain. If the data submitted on-chain does not match the off-chain data processed by the sequencer, this can trigger a challenge.

Example:

  • On-Chain Data: The blockchain shows Order A as Sell 1 BTC for 1 ETH.

  • Off-Chain Sequencer: The sequencer records Order A as Sell 0.5 BTC for 1 ETH (incorrect data).

In this case, the on-chain transaction does not match the off-chain transaction, and the VNs detect this mismatch. They initiate a challenge to investigate why the data does not align.


Exclusion of Valid Orders by the Sequencer

Another key role of VNs is to ensure that all valid orders are processed and included. If the sequencer excludes a valid order from being posted on-chain, VNs will catch this and trigger a challenge.

Example:

  • Order 1: User A submits a valid order to sell 1 BTC for 1 ETH.

  • Order 2: User B submits a valid order to sell 1 ETH for 1 BTC.

Both orders are valid, but only Order 2 is posted on-chain by the sequencer. If Order 1 is excluded (not posted on-chain), VNs will detect that it was missing, by comparing it to the on-chain orders (Submission B) method and initiate a challenge.


Practical Scenario

Let’s consider a scenario where VNs detect an incorrect order match or exclusion.

Example:

  • Order A: Sell 1 BTC for 1 ETH (submitted by User A).

  • Order B: Sell 1 ETH for 1 BTC (submitted by User B).

  • Order C: Sell 1 ETH for 1 BTC (submitted by User C).

The orders are such that Order A could match with either Order B or Order C. The correct match depends on the order in which Order B and Order C arrived. If Order B arrived first, it should match with Order A. If the sequencer incorrectly matches Order A with Order C (despite Order B arriving earlier), VNs will detect this mis-sequencing and raise a challenge.

Additionally, if Order A is excluded entirely from the on-chain records, VNs will flag this as an exclusion issue and initiate a challenge to investigate why the order was not included.

Discrepancy Detection