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
, andreceiver
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
- Oracle emits
PIIRequested(txHash, receiver)
- Validators listen to CRYMBO contract logs
- Validator queries the chain using the
txHash
- Validator signs a proof if criteria are met
- 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