KORAMP

Records & Audit

How KORAMP records transactions: AuditLog, LedgerEntry, and webhook idempotency.

Audit Log

AuditLog records important actions with the actor (walletAddress, admin email, or system), entity, entity ID, metadata, and IP address. It's the system-of-record for who did what.

Double-Entry Ledger

LedgerEntry is a double-entry record per wallet and asset:

FieldDescription
walletAddressThe wallet the entry applies to.
assetIDR, SOL, ETH, or BNB.
directionCREDIT or DEBIT.
amountThe entry amount.
referenceA reference string.
topUpOrderId / sellOrderIdLinks to the originating order.

Webhook Idempotency

XenditWebhook enforces idempotency with a unique constraint on (kind, event, paymentRequestId, xenditPayoutId). Re-delivered webhooks update the existing row instead of creating duplicates, preventing double-fulfillment.

Privacy-Preserving Analytics

PageVisit records only path + UTC day with a counter — no IP, user-agent, or fingerprint. One row per (path, day), so traffic never creates unbounded rows.