| #ID | TYPE | DEBIT ➔ CREDIT | AMOUNT (THB) | STATUS |
|---|
Click any banking fault class below to inject a malicious or corrupted transaction into the APEX Invariant Oracle. Watch the engine mathematically intercept, quarantine to DLQ, and reject the payload in sub-millisecond real time.
APEX includes a state-space model checker derived directly from the formal TLA+ specification (TwoPhaseTransfer.tla). It explores every possible reachable permutation of concurrent holds, captures, timeouts, and rollbacks to guarantee that no invariant can ever be broken.
Simulates bank-grade two-phase reservations. When network drops or times out, funds stay reserved in UNKNOWN state without blind auto-refunds.
Active Holds Ledger
| HOLD ID | DEBIT ACC | AMOUNT | TTL EXPIRES | STATE |
|---|---|---|---|---|
| No active holds | ||||
Reconciles all internal journals against simulated PromptPay Switch EOD statements. Calculates net bilateral settlement and issues an Ed25519-signed closing audit certificate.
Every transaction journal is hashed into a SHA-256 Merkle Tree and signed with a 256-bit Ed25519 private key. Even a 1-satang discrepancy breaks the entire mathematical proof chain.
| CAPABILITY | REFERENCE SQLITE | POSTGRESQL 16 ENTERPRISE |
|---|---|---|
| Concurrency Control | SQLite Single-Writer Lock | Row-Level Locking (SELECT ... FOR UPDATE) |
| Solvency Invariant | Application-level Guard | CHECK (balance_satang ≥ 0) at DB Engine |
| Double-Debit Defense | Indexed Idempotency Table | UNIQUE Index constraint on idempotency_key |
| Event Sourcing | Synchronous Journal Table | Transactional Outbox (Single ACID Commit) |
| Throughput / TPS | 7,490+ TPS | 4,800+ TPS (Clustered) |
| Host Footprint | Zero memory overhead | 70.8 MB RSS (Native Linux Cluster) |