# Order Validation

The goal of the **Order Validation** process in the Yamata system is to ensure that all transactions are processed fairly, transparently, and without errors, ensuring that orders processed by the off-chain sequencer align with the on-chain records.&#x20;

<figure><img src="https://651401021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY2TowO8fF4a1GlgpRfIZ%2Fuploads%2FRfZdnbOvfLhG9TO3w7CK%2Fimage.png?alt=media&#x26;token=6c855f0e-65b2-4a75-8f81-8f71327fe253" alt=""><figcaption><p>Order Validation Flow</p></figcaption></figure>

1. [**Introduction to Validating Nodes (VNs)**](https://docs.yamata.io/yamata-nodes/order-validation/what-are-validating-nodes-vns) **-** who are responsible for ensuring that all transactions are processed accurately and fairly. They monitor both the off-chain sequencer and on-chain data to detect any discrepancies.
2. [**Order Matching**](https://docs.yamata.io/yamata-nodes/order-validation/order-matching) **-** VNs validate that orders processed by the off-chain sequencer match their corresponding on-chain records.&#x20;
3. [**Challenge Process**](https://docs.yamata.io/yamata-nodes/order-validation/challenge-process)
   * [**Discrepancy Detection**](https://docs.yamata.io/yamata-nodes/order-validation/challenge-process/discrepancy-detection) between the off-chain and on-chain data, or any irregularity in the order processing.
   * [**Challenge Initiation**](https://docs.yamata.io/yamata-nodes/order-validation/challenge-process/challenge-initiation) requires the VN to provide clear **proof** to justify the initiated challenge.
   * [**Challenge Approval**](https://docs.yamata.io/yamata-nodes/order-validation/challenge-process/challenge-approval)**,** where the challenge is raised by 5 VNs and the process moves to further validation and defense.
4. [**Voting & Sequencer Defense**](https://docs.yamata.io/yamata-nodes/order-validation/voting-and-sequencer-defense) **-** where VNs vote on whether the sequencer was wrong. If a majority (½ + 1) agrees, the challenge succeeds, and the sequencer is penalized. If the sequencer can defend itself successfully, the challenge is dismissed, and the VNs are penalized for raising an invalid challenge.
