Units and money
Units and money
Use exact integer amounts for money, Credits, shares, and basis points. FX rates are decimal observations, not integer currency amounts.
Core units
| Unit | Meaning |
|---|---|
amount_minor | Operator-facing currency amount stored and displayed as a zero-decimal integer. The legacy _minor suffix does not imply ISO currency exponent scaling. |
credits_equivalent | Opinion buying-power unit where 10000 = 1 USDT; not a Polyflight wallet amount. |
shares_micro | Opinion market share unit where 1000000 = 1 share. |
idr_per_usdt | Opinion execution FX rate: IDR for 1 USDT. Polyflight's frozen USDT_IDR observation is comparison evidence only. |
bps | Basis points with denominator 10000. |
Reference conversions
10000 credits_equivalent = 1 USDT
1000000 shares_micro = 1 share
100 bps = 1%
Rounding convention
- Opinion wallet FX conversions floor buying power and final external payout as documented in FX fees and rounding.
- AMM quote fees have their own rules: per-share fee Credits round up; buy collateral-to-Credits rounds up and sell collateral-to-Credits rounds down. Do not apply the wallet-FX floor rule to every fee or quote component.
- Preserve stored historical fees, valuation, and integer payouts; do not recalculate them from a current FX rate or current commercial terms.
Operator-facing implications
- compare integer amounts only in reconciliation
- keep wallet adapter amounts as integers
- display
10000as10,000in the operator currency, never as100.00 - apply only a field's documented scale: micro-shares, Credits-equivalent, and BPS have different denominators; native IDR wallet amounts have no cents division
- monetary aggregates such as Market PnL and Polyflight reports can be integer strings; parse with exact integer/decimal handling, not floating-point coercion
- retain minus signs on signed PnL/statement positions; do not convert signed settlement positions into absolute payout amounts
Product boundary
Opinion quotes, trades, sells, and redemptions use their documented FX snapshots and rounding formulas. Polyflight purchases, wins, loss acknowledgements, refunds, and compensation use exact native IDR and perform no wallet conversion. Polyflight's frozen Indodax observation only normalizes anonymous IDR and Credits option totals for shared-flight ranking; it never changes a user debit or credit.
Wallet mutation amounts are positive except for the narrowly defined Polyflight loss-credit contract, whose amount is exactly 0. A loss acknowledgement records the result without changing balance, cash clearing, or financial liabilities. Do not interpret a zero delivery as a payout or allow zero on generic wallet mutations.
Common fields by surface
- quotes and trades:
external_amount_minor,shares_micro - wallet adapter:
external_user_id,amount_minor,currency_code,idempotency_key - webhook payloads: final integer amounts only
- balance operations: integer amount plus direction and status
Cash versus fees versus liability
Market PnL reports pnl_minor = returned_minor - spent_minor from confirmed wallet movements, with reversals offsetting their cash buckets. quoted_fee_minor and quoted_fee_credits disclose executed-trade fees already reflected in those wallet movements; they are not an extra debit or a second PnL deduction. Pending outcomes and failed-payout debt are disclosed separately.
Monthly Opinion net due uses fee shares, recognition-date closed-market principal, and successful payout cash; Polyflight uses its separate signed commercial statement. Neither is the user's cash PnL, and neither an export nor a sent callback proves bank payment. See Opinion economics.
