You tried it, you liked it. It’s time to buy. You walk over to the cashier and pull out your wallet as the man at the counter demands $1023. You quickly check the price again, just to ensure that nothing odd sticks out.
Item X: 999.00Sales tax: 21.20Other tax: 2.80
You open the wallet and pull out two dollar bills: a $1000 note and a $100 note. The cashier fiddles with his deck of notes and smiling, he hands you back the change. Two receipts are printed. He keeps one. And one is handed over to you. A transaction has taken place.
A financial transaction is an agreement carried out between a buyer and a seller to exchange an asset for payment.
You tried it, you liked it. It’s time to buy. You hover over to checkout button; click it and it slides out your wallet. You take a quick glance at your cart. It reads: 1600 mɃ. Just to be sure you made no mistake, you take one final look.
Item x: 1500.00Mining fee: 50.00Other fee: 50.00
You scan the QR code presented to you and press pay and confirm. Behind the scenes, it takes two of the transactions you received before — one of 800 mɃ and the other of 900 mɃ. Combining these two previous transactions, it creates a fresh transaction: one of 1500 mɃ for the item; one of 50 mɃ to the miner that keeps the system running; one of 50 mɃ to the store and finally a remainder of 200 mɃ back to yourself so you can use it again.
transaction in physical world
transaction in virtual world
That is the crux of it and you call you care to know. But as you’d expect, behind the scenes it’s a bit more complicated than that. If you treat crypto as a blackbox then it is basically just inputs and outputs in a transactional exchange.
Q. How do you know my transaction was valid? Who checks it?Q. Where did I send my virtual money?Q. Is the virtual money in my wallet? Why can’t I just modify it?Q. How is it ensured that the seller actually received the funds?Q. Can someone else claim to be me?Q. Why do I need give my money to the miner? And how much?Q. What is this thing that we exchanged anyway? Just some numbers?Q. What if I want to reverse the transaction and return the item?
There are lots of questions. The virtual money can be confusing. A lot of moving parts are at play here and in due time, you will learn exactly how they operate. Let’s start with the basics.
In the physical world, this is not an unheard of concept. Fingerprints, retina scans, handwritten signatures are all various ways to validate one’s identity. In the virtual world, it is similar. Each transaction needs to signed. When you sign a transaction, you effectively say that you approve those funds to be transferred from your account into someone else’s account. But what really is the signature?
Here we use a technique that is known as public key cryptography.
Digital signature
**Public key**This is a key that everyone holds
**Private key**This is a key that only you hold
Message + Private key = Signed Message
Signed Message + Public key = Message
The precise implementation of public key cryptography used in Bitcoin is called Elliptic-curve cryptography. You can read more about it here.
A transaction is written down. It is signed by the buyer. The seller gets it. Where do they go?
Back to the physical world: at the end of the day, the cashier takes all of his collected receipts and gives it to his manager. He scrutinizes them as he flicks through the lump of cash that his shop has accumulated. If everything adds up, he takes the cash bundle over to the bank. Bank says thank you very much and deposits the money in their account while noting down that it belongs to the managers account. From there, things gets real tricky. Smaller banks give the money to the bigger banks who in turn gives it to even bigger banks. Anyone who has played a game of poker can tell you. If you are up against a high-roller, the odds are stacked against you. The Wall Street are the high rollers and the traditional banking system is riddled with power abuse allegations. Some conspiracy theorists even claim that Satoshi had deep links in Wall Street. We might never know the truth. But we do know that Bitcoin has been a trailblazer for decentralized money.
Here in the virtual space, transparency is important. To that end, there is a general ledger that everyone holds. Whenever anyone makes a transaction, the transaction goes over to the general ledger. All general ledgers are updated and the transaction is set in stone.
One might ask: how exactly are all ledgers around the world updated? That’s an important question. Because the whole purpose is defeated if there happens to be a central body that passes messages back and forth. Luckily, there isn’t one. Thanks to peer-to-peer technology. By the way, this ledger is known as blockchain.
Let’s recapitulate and dive a bit deeper.
A transaction consists of money-in and money-out. Money-in comes from transactions that were previously addressed to you. These are called unspent outputs. Once you use them in a transaction, these previous transactions are considered spent and you can not use them any more. All the successful transactions get listed on the general ledger, which contains all the transactions ever done since the beginning of cryptocurrency. Every day there are thousands of transactions occurring. Each of one them are required to be checked to ensure that nothing malicious has taken place. These validations are done by miners. Miners process a bulk of transactions in one go. They pack them all together and out comes a block. This is attached onto the top of the blockchain and alert goes to everyone. Anyone can find out if the miner acted vindictively, unless the majority of miners revolt against the system. This is known as the 51% attack. And it can cause the collapse of the cryptocurrency system.
I have only scratched the surface here. Leaving you with more questions than answers.> Why sort of incentive does miners have to keep them going?> Why would anyone want to verify what miners are doing?> Who regulates the money supply? Who settles disputes?> Why are transactions loaded onto a block?
The purpose was to simply whet your appetite for what is coming next. Money fuels the economy. And cryptocurrency allows the economy of the virtual world to be conceived.
Cryptocurrency still has a long way to go before it truly becomes Internet money. The foundation has been laid, but a lot of challenges lay ahead. Follow me on twitter: @uneeb123 to get latest updates.