The first problem is that Bitcoin and other blockchains are by design completely
unforgiving.
If there is a bug in your software which lets people steal coins, too bad, nothing
to be done.
Some environments need software that has to be perfect, or as close as we can make it, such
as space probes that have to run for years or decades, and implanted medical devices where
a bug could kill the patient. Programmers have software design techniques for those
environments, but they generally start with a clear model of what the environment is and
what sort of threats the device will have to face. Then they write and test the code as
completely as they can, and burn it into a read-only memory in the device, which prevents
deliberate or accidental later changes to the code.
Running an online cryptocurrency exchange is about as far from that model as one
can imagine.
The exchange's web site faces the Internet where one can expect non-stop hostile
attacks using rapidly evolving techniques.
The software that runs the web site and the databases is ordinary server stuff,
reasonably good quality, but way too big and way too dynamic to allow the sorts
of techniques that space probes use.
Nonetheless there are plenty of ways to try and make an exchange secure.
A bitcoin exchange receives bitcoins and money from its customers, who then trade one for
the other, and later ask for the results of the trade back.
The bitcoins and money that the customers have sent stay in inventory until they're
returned to the customers.
If the exchange closes its books once a day, at that point the bitcoins in inventory
(which are public since the bitcoin ledger is public) should match the amount the
customers have sent minus the amount returned.
Similarly the amount in the exchange's bank account should match the net cash sent.
The thing in the middle is a black hole, since with most bitcoin exchanges you have
no idea where your bitcoins or cash have gone until you get them back, or sometimes
you don't.
To make it hard to steal the bitcoins, an exchange might keep the inventory in a cold
wallet, one where the private key needed to sign transactions is not on any computer
connected to the Internet.
Once a day they might burn a list of bitcoin withdrawals onto a CD, take the CD into a vault
where there's a computer with the private wallet key, create and sign the withdrawal transactions,
and burn them onto another CD, leave the computer, the first CD, and a copy of the second CD
in the vault, and take the second CD to an online computer that can send out the transactions.
They could do something similar for cash withdrawals, with a bank that required a cryptographic
signature with a key stored on an offline computer for withdrawal instructions.
None of this is exotic, and while it wouldn't make anything fraud-proof, it'd at least be possible
to audit what's happening and have a daily check of
whether the money and bitcoins are where they are supposed to be.
But when I read about the endless stories of crooks breaking into exchanges and stealing cryptocurrencies
from hot (online) wallets, it's painfully clear that the exchanges, at least the ones that got
hacked, don't do even this sort of simple stuff.
Admittedly, this would slow things down. If there's one CD burned per day, you can only withdraw
your money or bitcoins once per day.
Personally, I think that's entirely reasonable -- my stockbroker takes two days to transfer cash
and longer than that to transfer securities, but we all seem to manage.