Post-transaction audit system that links user sessions to on-chain transactions, detects discrepancies between simulated and executed transactions, and governance-locks suspect node stakes.
Even with bundle integrity enforcement, the marketplace includes a final safety net: every transaction is audited after the fact by comparing the expected transaction (from the quorum simulation) against the actual on-chain transaction.
The previous layers (SRI, content probing, attestation) prevent code tampering. But what if:
Session-TX reconciliation catches these by auditing on-chain state — it doesn't depend on code integrity at all.
When a user initiates a purchase, the serving node runs the quorum simulation and records the mapping:
sessionHash ↔ txPlanHash ↔ walletAddress ↔ servingNodeIdThis links the user's UI session to the specific transaction plan that the quorum attested.
After a transaction appears on-chain, honest nodes observe it and extract:
The engine compares the on-chain observation against the registered session plan:
| Check | What It Catches |
|---|---|
| TX_PLAN_HASH_MISMATCH | On-chain tx doesn't match the attested plan — node substituted a different transaction |
| UNATTESTED_TX_DURING_SESSION | A transaction occurred from the user's wallet during a session with no corresponding attestation — node injected an unauthorized tx |
| UNEXPECTED_RECIPIENT | Funds went to addresses not in the original plan — payment diversion attack |
| AMOUNT_MISMATCH | Transfer amount differs from the simulated amount — partial theft |
Discrepancies trigger immediate governance actions:
| Severity | Trigger | Governance Lock | Misbehavior Strike |
|---|---|---|---|
| WARNING | Amount mismatch | 48 hours | No |
| CRITICAL | Plan hash mismatch, unexpected recipient, unattested tx | 168 hours (7 days) | Yes |
Governance lock prevents the suspect node from unstaking its collateral while under investigation. This is implemented via applyGovernanceLock() which extends the node's withdrawableAt timestamp.
Misbehavior strike feeds into the escalating penalty system (24h → 72h → 168h → permanent ban).
In addition to server-side reconciliation, the client independently verifies the quorum result:
txPlanHash.This prevents a compromised loading node from faking the entire quorum response.
Each node maintains an in-memory cache of recent tx-plan attestations (10-minute TTL). When a client directly queries a witness at GET /node/tx-attest/verify/{hash}, the witness looks up the hash in this cache and confirms or denies its attestation.
TX_SESSION_DISCREPANCY
discrepancyId: string
sessionHash: string (64 hex)
walletAddress: string
chain: "BTC" | "ETH" | "SOL"
onChainTxHash: string
expectedTxPlanHash: string (64 hex)
servingNodeId: string
cohortNodeIds: string[]
reason: "TX_PLAN_HASH_MISMATCH" | "UNATTESTED_TX_DURING_SESSION" |
"SIMULATION_RESULT_DIVERGENCE" | "UNEXPECTED_RECIPIENT" | "AMOUNT_MISMATCH"
severity: "WARNING" | "CRITICAL"
stakeLocked: boolean
lockHours: number
detectedAt: ISO timestampThe full transaction security stack, from first to last line of defense:
| Layer | What It Protects | Who Enforces It |
|---|---|---|
| SRI integrity attributes | Code authenticity | Browser (cannot be bypassed by JS) |
| Bundle manifest consensus | Node code agreement | All nodes via gossip |
| Content probing | Against two-directory attacks | Honest nodes (browser-like requests) |
| Client bundle attestation | Against IP discrimination | Client + peer nodes |
| TX-plan quorum | Transaction plan agreement | Witness nodes (67% BFT) |
| Client witness verification | Against fake quorum results | Client + witness nodes directly |
| Session-TX reconciliation | Against post-attestation tampering | All honest nodes + on-chain state |
| Governance stake lock | Flight risk during investigation | Smart contract / protocol |
| Misbehavior strikes | Repeat offenders | Escalating penalties → permanent ban |