Why SAT Only? — The Integer Monetary Model

permalink SUBTC
#integer#model#monetary#sat

SERIES:
Breadcrumbs (WAproxy)

BREADCRUMB:
02

LANG:
EN

STATUS:
Stable

------------------------------------------------------------
SUMMARY
------------------------------------------------------------

WAproxy uses SAT as its internal monetary unit.

All financial calculations are performed using integers only.
Floating point arithmetic is strictly prohibited.

This ensures deterministic and predictable execution across
all supported coins.

------------------------------------------------------------
THE PROBLEM WITH FLOATING POINT
------------------------------------------------------------

Floating point arithmetic introduces:

- rounding errors
- precision drift
- inconsistent fee calculations
- non-deterministic results under retries

Financial execution must not depend on floating point math.

------------------------------------------------------------
THE SAT MODEL
------------------------------------------------------------

Inside WAproxy:

- All amounts are expressed in SAT (internal atomic unit).
- SAT is an integer.
- No decimal representation is allowed.

Example:

amount_sat = 15000
protocol_fee = amount_sat * 300 / 10000
receiver_gets = amount_sat - protocol_fee

All operations remain integer-safe.

------------------------------------------------------------
UNIFIED MONETARY ABSTRACTION
------------------------------------------------------------

WAproxy treats all supported coins through a unified internal unit.

This abstraction allows:

- identical fee logic across coins
- consistent minimum thresholds
- simplified calculation rules
- reduced integration complexity

Application layer handles market conversion.
WAproxy handles integer transport.

------------------------------------------------------------
WHY THIS DESIGN MATTERS
------------------------------------------------------------

Using SAT-only logic guarantees:

- deterministic fee deduction
- consistent idempotent retries
- reproducible execution results
- simplified auditing
- stable economic boundaries

Integer-based systems are easier to verify formally.

------------------------------------------------------------
EXECUTION INVARIANTS
------------------------------------------------------------

1. All amounts are integers.
2. No float parsing is permitted.
3. Protocol fee uses basis points (BPS).
4. Rounding must be deterministic.
5. Network fee remains external to amount_sat.

------------------------------------------------------------
RELATION TO MARKET VALUE
------------------------------------------------------------

Market pricing (e.g., USDT equivalence)
is calculated outside WAproxy.

WAproxy only executes:

amount_sat → protocol_fee → receiver_gets

It does not validate fiat equivalence.

------------------------------------------------------------
ARCHITECTURAL STATEMENT
------------------------------------------------------------

Integer-only monetary execution
is mandatory for deterministic value transport.