Header Ads

How does a Bitcoin transaction work?

Bitcoin transactions are secured by digital signatures and are sent from and to electronic bitcoin wallets. Everyone in the network knows about a transaction, and the history of a transaction can be traced back to the time the bitcoins were produced.

Keeping bitcoins is ok if you are a speculator waiting for the price to rise, but the real meaning of a currency is to spend it, right? So if you want to output bitcoins, how do transactions work?


There are no bitcoins, only the records of Bitcoin transactions


Here is the funny part of Bitcoin: They do not exist anywhere, not even on a hard drive. We are talking about the fact that someone has bitcoins, but if you look for a specific bitcoin address, there are no digital bitcoins, similar to the one you have euro or dollars on your bank account. You can not reference a physical object, not even a digital file, and say, "This is a bitcoin."

Instead, there are only records of transactions between different addresses, with credit that either increases or decreases. Any transaction that has ever been executed is stored in a huge public register (ledger) named "blockchain". If you want to calculate the balance of any Bitcoin address, you have to calculate it via the blockchain, because no information is stored in the address.


What does such a transaction look like?


If Alice Bob sends some bitcoins, then this transaction contains three pieces of information:

An input. This is a record of which sender's address before Alice sent these bitcoins (she got them from her girlfriend Eve).
A lot. This is the amount of Bitcoins that Alice sends Bob.
An output. This is the bitcoin address of Bob (receiver address).
How is Bitcoin sent?

To send bitcoins you need two things: a Bitcoin address and a private key. A Bitcoin address is randomly generated and is simply a sequence of letters and numbers. The private key is another sequence of letters and numbers, but unlike the Bitcoin address, it is kept secret.

The bitcoin address can be imagined as a locker with a glass side. Everyone knows what is in it, but only the private key can unlock it and put things in or take them out.

When Alice wants to send Bitcoins to Bob, she uses her private key to sign a message with the input (the previous transaction of the coins), the amount and the output (Bob's address).

Then she sends her bitcoins from her wallet to the wide Bitcoin network. There, Bitcoin Miner verify the transaction, put it into the transaction block, and possibly resolve it.

Why do I sometimes have to wait for my transaction to be confirmed?


Since a transaction has to be confirmed by miners, one is sometimes forced to wait until they are finished with the mining (mines). The Bitcoin protocol is set so that each block takes about 10 minutes to be scanned.

Some traders let someone wait for this block to be confirmed, which means that in the meantime you can quietly make a coffee and come back after a short while to accept the digital goods or services.

Otherwise, there are some traders who do not wait until the transaction has been confirmed. You take the risk, assuming you do not necessarily try to spend your bitcoins on other things before the transaction is confirmed. This is common in low transactions where the risk of fraud is not so high (micropayment). Each recipient can decide for themselves how many confirmations he asks. The more the more secure, but the longer the transaction takes.

What if the input and output quantity are not the same?

Since bitcoin exist only as records of transactions, many different transactions can be bound to a particular bitcoin address. Perhaps Jane has sent two Bitcoin, Philip has sent her a bitcoin and Eve only one, all as separate transactions at separate times.

They are not automatically converted into Alice Wallet to six existing bitcoins in one file. They are only available as different transaction records.

When Alice wants to send Bitcoins, her wallet will try to use transactional records with different amounts that add up to the amount of bitcoins she wanted to send Bob.

There is the possibility that Alice will not have the exact amount of bitcoins from her transactions when she sends to Bob. Maybe she just wants to send 1.5 BTC to Bob.
Powered by Blogger.