KORAMP

Database

KORAMP's main Prisma models: assets, orders, payments, payouts, ledger, audit, security, and rewards.

Overview

KORAMP uses PostgreSQL (Neon) with Prisma. Below are the main models grouped by function.

Assets and Networks

ModelFunction
NetworkNetwork definitions (SOLANA, BASE, BSC).
AssetAsset definitions (SOL, ETH, BNB) and network relation.
PlatformWalletPlatform hot wallets per network.

Quotes and Orders

ModelFunction
QuoteLocked price offer (TOP_UP / SELL) with atomic consumption via usedAt.
TopUpOrderTop Up order, from CREATED toward completedAt.
SellOrderSell order with confirmations and requiredConfirmations.

Payments, Crypto, and Payouts

ModelFunction
PaymentXendit payment (QRIS) for Top Up.
CryptoDepositCrypto deposit for Sell.
CryptoWithdrawalCrypto withdrawal for Top Up.
PayoutIDR bank payout for Sell.
XenditWebhookXendit webhook trail with idempotency.

Ledger and Audit

ModelFunction
LedgerEntryDouble-entry record (CREDIT/DEBIT).
AuditLogTrail of important actions.
SystemSettingKey-based system settings.
FeeConfigFee configuration per asset and type.

Security

ModelFunction
SecurityEventSecurity events aggregated per hour.
IpBanProgressive temporary IP bans.
AdminAccessKeyAdmin credential (multi-factor, single-device session).

Analytics and Support

ModelFunction
PageVisitPage analytics (path + UTC day only).
SupportTicketWallet-based support tickets.
SupportMessageTicket conversation.

Wallet Challenge and Rewards

ModelFunction
WalletChallengeSingle-use nonce for proof of ownership.
RewardConfigReward configuration (singleton).
RewardCycleMonthly reward cycle.
RewardClaimReward claim with PENDING_PAYOUT status.

Legacy Providers

The KipayWebhook and TransfiWebhook models are kept for history of retired providers. New orders never write to them.