# Is there any literature on how stock exchanges guarantee consistency?

How do we know that artificial shares of some stock aren't created (perhaps going untracked) on exchanges. After all being man made digital systems they are prone to errors.

## An example:

Suppose a customer A and B,C meet at an exchange $E_1$ and B, C both want to buy a share of some stock S, and $E_1$ has a glitch that fills both of their orders using the same shares from A, now suppose (B,C) are high frequency traders, they could potentially execute an enormous volume of trades on other exchanges (which can't reasonably control for errors in $E_1$) and quickly this can break the consistency and accuracy of data across the entire market (also debugging the origin of the inconsistency could become extremely difficult as the problem spreads across multiple exchanges).

It seems to me that errors on any one exchange compromise the integrity the entire system, all it takes is one inconsistent player.

In database design there is a process known as ACID:

"In computer science, ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction."

These tenets ensure that databases have the required integrity are are the sorts of things engaged in bank account communication, flight controls etc.

Transactions that take place on exchanges are of such high value that their protocols will adopt these exact same tenets, if not additional ones. Within the construct of the database system therefore, there are failsafes built in that do not permit what you describe, for specifically that reason.

Whilst I do not argue against the reliability of communication, i.e. one party being reported a trade erroneously and acting as a result of that communication, the underlying transaction will not physically have taken place and any disputes will be down to the lawyers.

As a trader (HFT arbitrage trader) you are very aware of the cost of missing a leg in a trade. If you suspect a trade is erroneous it is foolhardy to continue under the assumption it has taken place since any litigation will be restricted to the loss only from that transaction and secondary /ancillary transactions which are derivatives of that first trade (and potentially loss making) can ruin you.

• I have never heard of erroneous trades because of software problems at the exchange (the software is too well built for that) , but the exchange does have the right to cancel trades and they sometimes use this in case of human errors such as fat finger trades for huge amounts at bizarre prices. The responsiiblity for dealing with this is up to the participants. Aug 18, 2018 at 15:53
• @AlexC, I have never received trade execution information directly from an exchange (and strongly suspect you are right), but I have experienced horrendous digital feed problems with indirect brokers like Bloomberg/BARX/ICAP futures, misreporting or misexecuting. And responsibility often does fall on the participant as you state.
– Attack68
Aug 18, 2018 at 16:08