What is Bitcoin?
Bitcoin, the programmable money. This is the best known definition of this new type of currency. The power of Bitcoin is very large because transactions can be accompanied by instructions that are executed in the desired way. This is making Bitcoin an environment where creativity is taking it to new horizons, but most transactions are simple: Input and output. Discover how Bitcoin transactions work.
How Bitcoin transactions work?
Bitcoin transactions are understood as bitcoin shipments. All of them are nothing more than records stored in the chain of blocks (BlockChain). It might sound confusing but it can be easily simplified. Imagine the following scenario: María sends bitcoins to Pedro.
The transaction will have three parts:
1. Input. Sections of an address of Mary that contain bitcoins.
2. Quantity. The amount of Bitcoins that Maria sends to Pedro.
3. Outputs. Pedro’s purse.
This structure has a curious design, with inputs and outputs, but with a very specific objective: to maintain Bitcoin’s security. All signed with the cryptographic keys that certify their validity.
The previous example shows the main ingredients that every transaction in Bitcoin has. This operation is internally represented under Bitcoin scripting (the internal programming code owned by Bitcoin), and although its potential is very large, the vast majority of transactions in Bitcoin currently respond to that scheme. Every Bitcoin user owns this named ‘purse’ which hold’s the bitcoins. These bitcoins can be transferred, invested or withheld.
Imagine that Maria has control of an address with 1 bitcoin. If you just want to send Pedro 0.3 bitcoins and the concept of “entries” would not exist, there would be no way that the system could know which part of that 1 is the 0.3 sent and can be forwarded. Therefore, there is the concept of entries, which are associated with the bitcoins that arrive at an address.
In this way enough entries are taken to reach the desired amount, and if to reach 0.3 you had to select 3 entries of 0.12 each, with the result being 0.36, the remaining 0.06 are sent to your own address indicating it as an output next to the address to which you wanted to send 0.3.
In that case, we would have this scenario of inputs and outputs:
The proper address where the remaining 0.06 BTC is sent can be the same address as any associated with the entries or a new one. This is called change direction or return address. It’s where the laps are sent.
It is also important to understand that in the same transaction there can be as many entries of the same address or as many as desired. The same happens with the exits. This allows multiple shipments to different people to be made in the same transaction with a single commission payment to the miners. This functionality is exploited by some purses to save costs.
The form that has internally the protocol of rewarding the miners comes from the funds that are not assigned to any direction. All the remaining bitcoins in a transaction that are not assigned to any address are left by the miner who mines the block with your transaction inside and are impossible to recover.
How do you send it?
To send bitcoins you need two things: a Bitcoin address and a private key.
The Bitcoin address is the public key of the private key of the owner of those bitcoins. Both keys are a sequence of letters and numbers, but the address (the public key) follows a certain pattern that begins with the character “1” (which is the indicator that it is a Bitcoin address and not another type of cryptocurrency).
In turn, the private key is generated from a seed that you or the software you use automatically assigns to you. They tend to be complex seeds to prevent other people from finding the same string of characters that derive in the same private and public key as yours. Said brute-force attack is impossible if the software you use has followed minimal precautions in its development.
But returning to the stage of Maria and Pedro …
When María wants to send Bitcoins to Pedro, she uses her password or private keys to sign each of the transaction’s entries (the origin).
How Bitcoin uses asymmetric encryption of public and private key, the nodes can quickly validate if the transaction is a transaction authorized by its owner because they can corroborate it with the source address, which is the public key as we said above.
This transaction is retransmitted and shared by all the nodes of the network, registering it in their corresponding block chains.
Some nodes, in addition, are miners. Which will use that transaction with thousands more to solve a mathematical problem. Learn more here about the miners.
Why do I sometimes have to wait several minutes for the operation to be performed?
Bitcoins can always be sent and will be seen in the destination in seconds. It is not necessary to come from previously confirmed tickets to be forwarded. The confirmations only give security to the recipient that the money is his, due to attacks of the type “Double expense” or “Control of mining of 51%”
The Bitcoin protocol states that each block is mined in an average of 10 minutes. It is not something fixed, sometimes 3 blocks can be mined in an hour and in the next 10. But the network is self-regulating so that the daily average of mine blocks revolves around 10 minutes.
Are commissions charged for making Bitcoin transactions?
At the moment they are not required, but they are recommended in most cases, since doing so determines obtaining confirmations more quickly.
Shipments can be made without paying commissions since at the moment there are still miners who operate them, but they are becoming less and less.
Normally a simple transaction or composed of multiple inputs and outputs has a cost of 0.0001 BTC ($ 0.03) if you want to have a high priority.
It is also important to understand that the commissions paid are determined by the number of entries and exits that are put into a transaction, not by the amount of money sent, among the most determining factors.
If your transaction is loaded with inputs and outputs it means a transaction with more data to analyze and distribute, which will ask you for more commission to give you the high priority label. High priority means that your transaction is added in the next block, starting to receive confirmations.
If you want to know in more detail how the commission is determined, we leave this page where they explain the algorithm to determine it and consider a transaction with high priority.
As the reward for mining in the form of bitcoins decreases in profitability, the miners will apply commissions to Bitcoin transactions in exchange for providing computational power to the network so that the system is sustainable, although it is estimated that they never exceed those traditionally charged by banks. and other entities.
What if I just want to send part of a bitcoin?
Each bitcoin can be divided up to one hundred million parts. A “satoshi” is what is called the smallest unit of a bitcoin, in honor of the creator of Bitcoin, the unknown “Satoshi Nakamoto”.
In a transaction you can send as many satoshis as you want, as long as they exceed the 546 satoshis (0.00000546 BTC) which is the minimum amount to avoid collapsing the network, which is known as “Bitcoin dust limit”.
Bitcoin Scripting is real?
Yes, you have listened well, Bitcoin Scripting. That’s why it’s called programmable money. The traditional purses are only responsible for making a specific type of combination of this language that ultimately results in a shipment of bitcoins as we have described previously. But Bitcoin Scripting allows infinite combinations of that language to make Bitcoin transactions with different behaviors. Everything through its language.
There is also a field in all Bitcoin transactions called OP_RETURN that can be used to transmit any type of information.
But this is an extensive and fascinating section that deserves its own chapter since it is the point where many new and creative applications are born to all kinds of sectors.