The car gets delivered a few days later, and my Bitcoins are transferred from me to the car company. If I succeed, I will possess both the luxurious car and my Bitcoins, allowing me to spend those Bitcoins again. A blockchain governs a ledger of data, for example transaction data. Because the blockchain protocol can govern this for us, we no longer need a third party to do this, such as a government or bank.
This is what makes most blockchains decentralised. The protocol of the Bitcoin blockchain is based on democracy, meaning that the majority of the participants miners on the network will get to decide what version of the blockchain represents the truth.
When a Bitcoin owner signs off on a transaction, it is put into a local pool of unconfirmed transactions. Miners select transactions from these pools to form a block of transactions. In order to add this block of transactions to the blockchain, they need to find a solution to a very difficult mathematical problem. They try to find this solution using computational power. This is called hashing read more about the hashing algorithm here. The more computational power a miner has, the better their chances are to find a solution before other miners find theirs.
When a miner finds a solution, it will be broadcasted along with their block to the other miners and they will only verify it if all transactions inside the block are valid according to the existing record of transactions on the blockchain.
Note that even a corrupted miner can never create a transaction for someone else because they would need the digital signature of that person in order to do that their private key.
Now pay attention. A malicious miner can however, try to reverse existing transactions. When a miner finds a solution, it is supposed to be broadcasted to all other miners so that they can verify it whereafter the block is added to the blockchain the miners reach consensus. However, a corrupt miner can create an offspring of the blockchain by not broadcasting the solutions of his blocks to the rest of the network. There are now two versions of the blockchain.
One version that is being followed by the uncorrupted miners, and one that is being followed by the corrupted miner. The corrupted miner is now working on his own version of that blockchain and is not broadcasting it to the rest of the network.
It is isolated to the rest of the network. The corrupted miner can now spend all his Bitcoins on the truthful version of the blockchain, the one that all the other miners are working on. On the truthful blockchain, his Bitcoins are now spent. Meanwhile, he does not include these transactions on his isolated version of the blockchain. On his isolated version of the blockchain, he still has those Bitcoins.
Meanwhile, he is still picking up blocks and he verifies them all by himself on his isolated version of the blockchain. This is where all trouble starts… The blockchain is programmed to follow a model of democratic governance, aka the majority. This is how the blockchain determines which version of its chain is the truth, and in turn what all balances of wallets are based on. A race has now started. Whoever has the most hashing power will add blocks to their version of the chain faster.
The corrupted miner will now try to add blocks to his isolated blockchain faster than the other miners add blocks to their blockchain the truthful one. As soon as the corrupted miner creates a longer blockchain, he suddenly broadcasts this version of the blockchain to the rest of the network. The rest of the network will now detect that this corrupt version of the blockchain is actually longer than the one they were working on, and the protocol forces them to switch to this chain.
The corrupted blockchain is now considered the truthful blockchain, and all transactions that are not included on this chain will be reversed immediately. The attacker has spent his Bitcoins on a Lamborghini before, but this transaction was not included in his stealthchain, the chain that is now in control, and so he is now once again in control of those Bitcoins.
He is able to spend them again. This is a double-spend attack. In reality these attacks are extremely hard to perform. Like mentioned before, a miner will need more hashing power than the rest of the network combined to achieve this. Considering the fact that there are perhaps even hundreds of thousands of miners on the Bitcoin blockchain, a malicious miner would have to spend enormous amounts of money on mining hardware to compete with the rest of the network.
Even the strongest computers on earth are not directly competitive with the total computational power on this network. For example the risk of getting caught and prosecuted, but also electricity costs, renting space and storage for all the mining hardware, covering your tracks and laundering the money. An operation like this is simply put way too much effort for what it will give the attacker in return, at least in case of the Bitcoin blockchain.
In fact, an attack was performed quite recently april on the Verge XVG blockchain. In this specific case, the attacker found a bug in the code of the verge blockchain protocol that allowed him to produce new blocks at an extremely fast pace, enabling him to create a longer version of the Verge blockchain in a short period of time. A credible team of blockchain developers will probably notice a bug like this and prevent it from being abused.
Smaller blockchains that operate on this algorithm though, like a small altcoin, may be significantly more vulnerable to such attacks considering there is not way as much computational power for the attacker to compete with. This also brings us to one of the latest hot topics in blockchain recently; ASIC mining.
ASIC mining is a mining technology developed by various early Bitcoin mining companies to enhance mining hardware, making it much more powerful. A lot of people in the industry are debating right now about whether ASIC miners make certain mining individuals or groups too powerful. The problem is though, that big mining companies like Bitmain are suspected to control a large amount of the ASIC mining operations.
Even though these organisations distribute this technology to individuals as well, they presumably only do so after using it for a long time themselves first.
Some people in blockchain debate on whether this makes them too powerful or not. Ideally, a blockchain should be governed by as many individual miners as possible. This is what makes it more decentralised after all. Kraken is the only major exchange that was never hacked or compromised because security is simply their highest priority. I use this exchange myself and would never use any other. Was this article helpful?
Help others find it by applauding or sharing. For more clear and easy to understand blockchain explanations you can read:. Beginner 1: How blockchain works in 7 steps. Beginner 2: How mining works and how transactions are processed. Beginner 4: Nodes and masternodes. Beginner 5: Mining difficulty and block time.
Free blockchain exam — 20 questions to determine your level — beginner, advanced or expert. Blockchain Terminology: Basic terminology to get you started. You can follow me on medium if you want to stay tuned for more educational blockchain articles. Thank you for reading! Sign in. Get started. Jimi S. A race — reversing existing transactions by broadcasting a new chain The corrupted miner will now try to add blocks to his isolated blockchain faster than the other miners add blocks to their blockchain the truthful one.
So how is Bitcoin secured against this? Good Audience The front page of Deep Tech. Don't miss the latest advancements in artificial intelligence, machine learning, and blockchain. Straight from practitioners. Blockchain Cryptocurrency Bitcoin Technology Ethereum. Areas of interest: Financial technology, biotechnology, blockchain, energy sector, traditional stock markets and other financial markets. Good Audience Follow. The front page of Deep Tech.
See responses Discover Medium. Make Medium yours. Become a member. About Help Legal.
Bitcoin is like uappens in many ways. Like gold, bitcoin cannot simply be created arbitrarily. Gold must be mined out of the ground, and bitcoin must be mined via digital means. Linked with this process is the stipulation set forth by the founders of bitcoin that, like gold, it must have a limited and finite supply. In fact, there are only 21 million bitcoins that can be mined in total.
Once miners unearth 21 million Bitcoins, that will be the total number of Bitcoins that will ever exist. Bitcoins can be lost due to irrecoverable passwords, forgotten wallets from when Bitcoin was worth little, from hardware failure or because of the death of the bitcoin owner. This is a pretty important concept to understand in order to fully understand when the last Bitcoin will be mined. Originally, 50 bitcoins were earned as a reward for mining a block. Then it dropped 25 bitcoins, and then to So if we do the math, if there is a halving event every four years, the last Bitcoin should be mined sometime in the year Will the whole system shut down because Bitcoins are no longer awarded for mining new blocks? Probably not.
How Does Bitcoin Prevent Double Spending?
However, the more valuable a bitcoin is the more miners will mine! While there are some good thoughts in this answer, it makes nappens lot of assumptions it could provide more evidence. Areas of interest: Financial technology, biotechnology, blockchain, energy sector, traditional ehat markets and other financial markets. The attacker has spent his Bitcoins on a Lamborghini before, but this transaction was not included in his stealthchain, the chain that is now in control, and so he is now once again in control link those Bitcoins. This means that there is a limit to how many transactions can fit in Bitcoin's blocks, according to the data contained in said transactions. Like mentioned before, a miner will need more hashing power than the rest of lf network combined to achieve. The difficulty of the proof of work algorithm is periodically adjusted so that it will take 10 min for the network to finally calculate an acceptable solution. True, there is a limit on the blocksize, so if whst transaction volume in a block window approximately 10 minutes exceeds the block size you can expect a miniature "auction" where transactions fight botcoin space here the block by bidding up the minimum transaction fee needed to get in. This is a double-spend attack. It's also important to keep in mind that the bitcoin network itself is likely to change significantly between now and. Bitcoin How to Buy Bitcoin. Bitcoin Basics. Miners will still be incentivized to validate the bitcoin blockchain because they will collect transaction fees from users. Now pay attention.
NEXT: bitcoin fake trading