The principles the system is built on
Portside is built around a double-entry ledger. These are the rules it enforces, and where each one is enforced.
Balances change only through ledger entries
Every entry's debits and credits sum to zero. The ledger is append-only, and the database itself rejects edits.
Amounts are whole numbers
1 USDC is stored as 1,000,000 minor units. No decimals, so no rounding drift.
Staff cannot move a user's money
There is no function that lets internal staff pay on a user's behalf. Attempts to exceed a role are refused and logged.
A balance cannot go negative
When two operations compete for the same balance, only one succeeds. A database constraint guarantees this, not application code.
Customer assets and platform revenue are kept apart
Platform fees go to their own account. The daily overview checks that total custody equals customer assets plus platform fees.




