Bitcoin Guide - Possible attacks at the end of the chain (Blockchain) #Part7

Bitcoin Guide - Possible attacks at the end of the chain (Blockchain) #Part7

By Roberto D. | CryptoFarm | 24 Feb 2020


Possible attacks at the end of the chain (Blockchain)

The fact that for minutes there may be ambiguity at the end of the chain has implications for transaction security.

For example, if one of your transactions is part of one of the shorter branches, it will lose its place in favor of the longest chain blocks.

Therefore the transaction will return to the group of unconfirmed transactions and find its place in a subsequent block.

Unfortunately, the fact that a transaction can lose its place offers the side to the problem of double spending.

How a double spending attack could occur in the Blockchain

A sends the money to B and B waits for confirmation of the transaction on the blockchain to send its product to A.

However, A could create a longer alternative blockchain, replacing the transaction to B with a transaction to someone else.

At this point the transaction to B would end up in the group of unconfirmed transactions, but since A replaced this transaction with a transaction to others, at this point the transaction to B would be considered invalid because it would refer to an input already spent!

351665157-8df49d0919eda413211b630d17e96e71372ee7ec07686dd527454cde786b1454.png

How do you defend yourself from this attack?

In reality it is difficult for Alice to create an ad hoc chain, the whole thing is in the creation of the HASH.

As already explained, to solve a block, the HASH of a block must be below a certain value.
This is done by trying different random numbers at the end of a block as we can see below:

351665157-6058fbea8930805a07771cd8cac30c0011d14c65196a87b70a3f54a0909c3b5b.png

Once resolved, the HASH value becomes a fingerprint that uniquely identifies that block and if any character of that block changes, the HASH also changes.

This fingerprint is used as an identifier for the previous block in the next block.
Once this is achieved, it is impossible to change a block in the middle of the chain since the next block will no longer point to the block with the right HASH.

Furthermore, a block cannot be resolved before the previous block: the data relating to the previous block is present in the block itself and therefore it is also given to the HASH function which solves the block.

This is the reason why A cannot create an ad hoc chain: A can only start solving blocks once the block from which it wants to start has already been solved and its value is known.

The only way A has to create an alternative chain is by actually solving freezes faster than all the other computers on the network.

It is as if each computer were a lottery ticket: in theory A could also have more computers, and therefore more tickets, but also in this case the odds of winning are against A.

 

The 50% attack

Only if he controls 50% of the network's computing power will he have a 50% chance of solving a block before someone else.
And even in this case the odds of solving many blocks in a row before the others would still be less than 50%.

Blockchain transactions are protected by this sort of mathematical "race".
Given this mechanism, we can deduce that transactions in the oldest blocks in the chain are more secure.

A person who wants to defraud through double spending should be faster than others in solving the blocks and the speed should increase proportionally to the length of the chain.

Therefore it is believed that this system is only vulnerable near the end of the chain and this is the reason why it is advisable to wait for the confirmation of several blocks before considering the BTC received as definitive.

 


Useful/Stonks link ALL TRUSTED:

My Exchange:

Airdrop/Giveaway:

Faucet:

Cloud Mining FREE:

Earn for internet connection:

How do you rate this article?

2


Roberto D.
Roberto D.

Born, and still living, in Italy. Passionate about cryptocurrencies since I discovered ethereum in 2016 https://linktr.ee/robertod


CryptoFarm
CryptoFarm

All about crypto and airdrop

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.