Skip to main content

Transaction Validation Logic

Transaction validators play a crucial role in ensuring that identity exchange flows on CRYMBO are initiated by legitimate VASPs and bound to real transactions on-chain.

Responsibilities

Transaction validators must:

  • Monitor the blockchain for requestPIIForTransaction calls
  • Verify that the txHash, network, and receiver are valid
  • Ensure the sender is a KYB-approved VASP
  • Confirm the transaction exists and matches the oracle call

Validation Criteria

A transaction request is considered valid if:

  • The txHash exists on the specified chain
  • The receiver address is a whitelisted operational wallet of a VASP
  • The transaction metadata matches the call on-chain
  • The oracle’s event and request timestamp are recent and not expired

Validation Flow

  1. Oracle emits PIIRequested(txHash, receiver)
  2. Validators listen to CRYMBO contract logs
  3. Validator queries the chain using the txHash
  4. Validator signs a proof if criteria are met
  5. Oracle aggregates validator proofs and proceeds with data request

Example Event

event PIIRequested(
string network,
bytes32 txHash,
address receiver
);

Anti-Abuse Protection

  • Requests must be signed by the sender’s operational wallet
  • Validators use nonce + timestamp to prevent replay
  • Rate limits are enforced on per-VASP and per-IP basis

📌 Next Step: Dive into KYC Validation Logic