Bitcoin is a decentralized digital currency. There is no physical existence of Bitcoin, just the verification and value it has been given by a global peer-to-peer network. All these transactions are recorded in Blockchains.
The blockchain is very much like a public shared ledger. All the confirmed transactions performed ever using Bitcoins are recorded in this ledger. These blocks are an ultra-secure data, treated like cash. All the transactions are received and sent through wallets which are digitally signed. To ensure security, bitcoin wallets come with a private key or seed. These signatures ensure that the transaction is performed by the current owner of the wallet and provides with the mathematical proof. In reality, there is no transfer of Bitcoins but the change of ownership and quantities of Bitcoins.
How Does a Transaction Work?
If person A needs to transfer Bitcoins to person B, the transaction carries three parts.
- An Input- record of wallet of person A
- An Amount- the number of bitcoins person A sends to person B
- An output- person B’s wallet
How Can You send Bitcoins?
To send the Bitcoins to anybody you require two things.
- Bitcoin address
- Private key
A bitcoin address is generated by an individual randomly. It mainly consists of a sequence of numbers and letters.
A private is a secret key with a unique sequence of numbers and letters.
When person A wants to send coins to person B, she signs a message with her private key to authorize the transaction. The transaction will include,
- Input (source wallet)
- Number of Bitcoins to sent
- Output (person B’s address)
Person A then sends the number of Bitcoins to the Bitcoin network from her wallet. Once entered in the network, miners will then verify the transaction included in the blockchain. The miners will then solve the mathematical puzzle and in the end, it will verify that person B is the new owner of the specified number of coins.
Just like account ledgers containing amount and names, blockchains function almost the same. People exchange money by changing this file.
For instance, if person A sells a product to person B for $5, person A’s balance goes up by $5 and person B will have a reduced balance of $5.
There are no third parties involved in the system, like banks or other financial institutions. So, who takes control and responsibility of controlling and maintain this ledger? Every coin holder maintains their own copy of the ledger. All the participants can see each other’s ledger and their balances. In Bitcoin ledgers, these names are exchanged with specific numbers to ensure anonymity.
To keep every ledger synced and harmonized, there is a protocol that needs to be followed. To do a transaction you tell everyone by broadcasting a message with your account number, the receiver’s account number and the amount to be transferred. Every coin holder around in the world will update their ledger.
There are people who help in maintaining the system. You can simply use the system to perform the transaction without maintaining the ledger.
To ensure sender is the real owner of the account, Bitcoin requires a signature to verify it, but a mathematical signature.
When an account is created, a private key is generated mathematically linked to that account number. The private key and the text from the transaction are processed through a special cryptographic function to generate a signature. To make sure the signature is done by the wallet owner and to the specific transaction, another function allows the other people to verify the signature. These signatures cannot be copied as they are unique to each transaction.
The main problem with the system is that this cannot verify when a transaction was performed.
For example, if a person falsely has to withdraw 2 cheques out of an account but it has enough money to cover one account. the bank will refuse the second cheque due to an inadequate amount of cash after the with drawl of the first cheque. It is much harder to determine the order in Bitcoin. Due to the scattered individuals all over the world taking part in the transaction, there may be a delay in different orders in different places. Fraudsters could lie about these time lapses.
Two recipients might both think their transaction is first and ship a product allowing the fraudster two spent the money twice.
New transactions go into a pool of pending transactions. These transactions then get into the giant chain that locks in their order. A lottery is then held, enabling participants to choose a transaction of their choice to solve a special problem to link them to the end of the chain. The person to find the solution first wins and gets their transaction next in the chain.
That’s how pretty much all the transactions in the Bitcoin system are performed.