KORAMP

Quote & Pricing

How KORAMP quotes work: market price, spread, service fee, network fee, tax, locked price, and expiry.

Quote Model

A quote is a locked price for a Top Up or Sell. It's created before an order and consumed atomically when the order is created.

Components

ComponentDescription
marketPriceReference market price for the asset.
spreadDifference between market price and the applied rate.
serviceFeeService fee in IDR.
networkFeeNetwork fee in IDR (or SOL ATA fee for SOL Top Up, deducted from crypto output).
taxTax in IDR, computed from the configured tax rate.
totalIdrFinal IDR amount the user pays (Top Up) or receives (Sell, as totalIdrPayout).
cryptoAmountCrypto amount to be received (Top Up) or sent (Sell).
expiresAtQuote expiry timestamp; cannot be used after this.

Atomic Consumption

A quote can only be used once. Consumption is atomic (single UPDATE ... WHERE usedAt IS NULL), so concurrent order creations can't reuse the same quote. This prevents double-spend of a locked price.

Expiry

Quotes have an expiresAt timestamp. After expiry:

  • Creating an order with the quote fails.
  • The user must request a new quote (price may have changed).

Fee Configuration

Fees are defined per asset and order type in FeeConfig:

  • serviceFeeRate, networkFeeRate, taxRate (percent of gross).
  • minOrderIdr, maxOrderIdr (order limits).
  • solAtaFeeIdr — SOL ATA fee in SOL units (deducted from the crypto output when the recipient wallet doesn't yet have an ATA).

See Architecture → Database for the full schema.