Shares (BPS)
Concepts

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:

10,000 BPS = 100.00% (Total Pool Allocation)
6,000 BPS = 60.00%
4,000 BPS = 40.00%
2,500 BPS = 25.00%
50 BPS = 0.50%
1 BPS = 0.01%

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.

= 60.00%
= 40.00%
Total BPS Sum:
10000 / 10,000 BPS
MemberShareRaw Integer AllocationRemainder AddedFinal Disbursement
Member 0 (Primary)6000 BPS60+0 (Deterministic)60
Member 14000 BPS40+040
Protocol Sum10000 BPS100+0100 = 100 (0 Stroop Loss)

Mathematical Specification

For any payment amount A and member share S (in BPS):

allocation_raw = (A × S) / 10,000

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]).