How hard is decrementing the shares of one user and incrementing the shares of another.
whose database are you incrementing/decrementing in? Real life stock trades happen across multiple exchanges with multiple intermediaries (brokers, market makers, end users). Without a blockchain, this is not trivial to coordinate safely
Your own. An an exchange you own 10 total shares and in your database you store who those 10 shares belong to.
There are multiple exchanges where stocks are traded, and order routing is typically transparent when using retail brokerages. The exchanges only provide the matching engine, while brokers handle custody. The process of transferring the ownership between brokerages is the clearing step which is handled by the DTCC.
Cryptocurrency exchanges provide both the matching engine and custody, so transferring ownership can be done instantly by updating records in the exchange’s database. The clearing step occurs when transferring coins to another wallet or exchange, when the transaction actually hits the blockchain.
> How hard is decrementing the shares of one user and incrementing the shares of another.
It’s surprisingly difficult. Clearinghouses (centralized) and blockchains (decentralized) exist to solve this very problem.