Docs › Build with Beluga

Money & settlement

How amounts are represented, how fees are calculated, and which numbers are binding.

Amount rules

FieldRepresentationUse it for
Order amountIn, amountOut, feeInteger string, atomic units: 1 XMR = 1 XMR2 = 1012Settlement display and verification
Reserve vault_xmr, circulating_xmr2, proof balanceInteger string, atomic units (1012)Checking the backing
Quote fields (out, bid, avg, value, rates)Decimal numbersDisplay only; estimates
Percentages (feePct, premiumPct, vsUsPct)Percent, not fraction: 1.0 means 1.0%Display

Parse atomic strings as big integers. Never do money arithmetic in floating point.

Decimals

  • XMR has 12 decimals (piconero).
  • XMR2 on Hyperliquid has 8 decimals. A deposit is credited truncated to 8 decimals; the remainder (less than 0.00000001 XMR) stays in the vault.

How fees are calculated

  • Bridge deposit: 0%. XMR2 credited = XMR received, truncated to 8 decimals.
  • Redemption: fee = floor(amountIn × 100 / 10000) in atomic units (1.0%); XMR paid = amountIn − fee. The Monero network fee is paid by us.
  • Exchange: output = market amount × (1 − fee), with the fee per route on Fees & limits.

Funding instruction wins

  • A quote is not a deposit instruction. After creating an order, show the returned address and window exactly as returned.
  • Quotes are estimates. The final exchange rate is calculated after 1 confirmation of the deposit; the bridge is always 1:1.
  • Redemptions are amountless at creation: the payout is computed from the XMR2 actually received.