Shares (BPS)
Basis points accounting model (10,000 BPS = 100%) and integer mathematics.
SplitPay uses a strict basis points (BPS) financial model to represent fractional ownership and payment allocations without floating-point rounding errors.
What are Basis Points (BPS)?
One basis point equals one-hundredth of a percent (0.01%). Consequently:
Why Floating-Point Math is Prohibited
IEEE-754 floating-point calculations (e.g. 0.1 + 0.2 = 0.30000000000000004) are non-deterministic across different computer architectures and lead to fractional token loss. In financial smart contracts, non-determinism can break blockchain consensus.
SplitPay performs all arithmetic in checked 128-bit integers (i128) natively on the Soroban runtime.
Interactive Basis Points Calculator
Test different payment quantities and shares below to see how SplitPay calculates integer divisions and automatically allocates remainder stroops:
Interactive On-Chain Remainder Calculator
Live simulation of the Soroban contract's integer arithmetic and remainder policy.
| Member | Share | Raw Integer Allocation | Remainder Added | Final Disbursement |
|---|---|---|---|---|
| Member 0 (Primary) | 6000 BPS | 60 | +0 (Deterministic) | 60 |
| Member 1 | 4000 BPS | 40 | +0 | 40 |
| Protocol Sum | 10000 BPS | 100 | +0 | 100 = 100 (0 Stroop Loss) |
Mathematical Specification
For any payment amount A and member share S (in BPS):
To prevent fractional truncation loss, any difference between the sum of raw allocations and the gross payment amount is deterministically added to the first member (allocations[0]).