Hacker News new | ask | show | jobs
by retrac 1570 days ago
> What prevents me from going to two ATMs at exactly the same time and withdrawing my entire balance? Is there a single central location for instantaneous money transfers like ATMs?

I am a bit familiar with Interac in Canada, the EFTPOS (pin and chip retail) system here. Aside from the EFTPOS system, it also serves as a domestic interbank transfer service. When you withdraw money from an ATM, the ATM bank connects to your bank via the interbank Interac system, and submits your authorisation to transfer the funds out of your account into the ATM bank's receiving account and gives you the money. This is an atomic transaction done real time, so no double spending allowed. I believe it's conceptually quite similar for the European EFTPOS systems and Cirrus/Maestro in the US. Credit cards work a fair bit differently though.

And yes, the transfer from customer to merchant is in fact usually immediate. If someone buys something in my store, I can 10 seconds later use the debit card linked to the account to spend the funds. That's why reversing fraudulent debit card transactions can be a major pain with not much in the way of guarantee of restitution.

1 comments

Does this mean there's a central server / database every ATM for a particular bank queries?

I'm thinking if there are multiple servers you could theoretically do it at the exact same time. Or if there are multiple servers but one database, is the database locked for your account when performing the request?

Yes. Each bank provides an access point to the interbank network. Which is a fairly centralised service run collectively by the participating banks. There's one database (approximately) per bank. That holds your account figures, etc. Atomic transactions are used, so yes, the account is locked on both ends until the funds go through or the transaction fails.

In the early days (1980s, 90s) this all tended to crash on Black Friday and Boxing Day, taking the whole thing down for entire banks and, a few times, nationwide. Been a good 20 years since that happened regularly though.