Bitcoin Transactions - from "Send" to "Receive" - YouTube

Channel: 99Bitcoins

[11]
Hello guys and gals, I'm Nate from 99Bitcoins,
[14]
and welcome to Bitcoin Whiteboard Tuesday!
[17]
Every few weeks we’re going to send you a cool new video, just like this one,
[20]
explaining some basic concepts around Bitcoin.
[23]
This way you can learn about Bitcoin yourself
[26]
or forward these videos to friends or family members who have questions.
[29]
Today’s topic is the path of Bitcoin from “send” to “receive”.
[34]
In this episode, we’re going to go over exactly what happens to a single Bitcoin
[38]
from the moment you hit the “send” button in your wallet
[40]
until it’s received on the other end.
[43]
Hopefully, once we finish this lesson,
[45]
you’ll have a good understanding of how the Bitcoin network works
[48]
and what’s the role of each specific player in the Bitcoin ecosystem.
[53]
So let’s get started!
[54]
The path from send to receive has 3 parts: Signing, broadcasting and confirming.
[60]
Let’s start with the first part – signing.
[63]
When I hit the “send” button in my wallet,
[66]
what I’m actually doing is telling my wallet:
[68]
“Hey wallet, I want to send 1 Bitcoin to my friend Steve.
[72]
Here is Steve’s Bitcoin address.”
[74]
The wallet, in response, creates a transaction message
[77]
containing information about me, the sender, Steve, the recipient
[81]
and the amount being sent (in this case, one Bitcoin).
[85]
Afterward, the wallet produces a unique digital signature for this message
[89]
by mathematically mixing it with my private key.
[92]
In our previous lesson, I’ve discussed the concept of the private key.
[96]
It’s basically a long string of letters and numbers
[98]
that act as the “password” for your Bitcoins.
[101]
Whoever knows my private key has control of my Bitcoins.
[105]
A digital signature is a way to prove that I own the private key to my Bitcoins
[109]
by using only my public key which I have no issue exposing,
[112]
thus keeping my private key, well, private.
[115]
Also, digital signatures are different each time you sign a transaction –
[119]
that’s why they are even more secure than a real signature
[122]
since they are unique for each and every transaction.
[125]
So if I send Steve one Bitcoin today and then another Bitcoin tomorrow,
[129]
each of these transactions will have a different digital signature.
[133]
After signing the transaction message, the wallet then groups the signature,
[137]
along with my transaction message, into a small file.
[139]
And this concludes our first step of signing.
[142]
Now we can move on to the next step – broadcasting.
[146]
In the broadcasting step, the wallet starts sending out the file
[149]
to other computers that hold a copy of the Blockchain.
[153]
These computers are also known as nodes.
[156]
Each node that receives the file verifies that it’s legit.
[160]
It’s basically looking to see that I actually have the funds I want to spend
[163]
and that my signature checks out,
[165]
much like a banker would check your account balance
[167]
before clearing your check.
[169]
Once my file is verified,
[171]
it’s then passed on to other nodes in the network that repeat this process.
[175]
When a node receives a file,
[177]
it keeps it in a holding area called the Mempool.
[180]
The Mempool, short for memory pool,
[182]
is a space dedicated for valid but still unconfirmed transactions.
[187]
Once the transaction message finds its way
[189]
to the Mempool of the different online nodes on the network,
[192]
we can say the second step of broadcasting is officially finished.
[197]
Now I want to take a quick pause
[198]
and talk about the status of our transaction at this point.
[202]
In order to actually see what’s going on with our transaction
[205]
while it’s making its path along the Bitcoin network,
[207]
we can use a block explorer.
[210]
A block explorer is a tool, usually in the form of a website,
[214]
that allows you to search and navigate through the Blockchain.
[217]
Using a block explorer,
[219]
you can check the balance of different Bitcoin addresses,
[221]
track transactions and get a wide variety of statistics about the network.
[227]
So at this point,
[228]
if we look at our transaction through the block explorer,
[230]
we will see that it is marked as “unconfirmed”,
[233]
meaning that it was broadcasted to the network and had its digital signature verified
[238]
but it still isn’t part of the Blockchain.
[241]
This type of transaction is also referred to sometimes as
[244]
a zero confirmation transaction.
[247]
An unconfirmed transaction should be treated as its name implies – unconfirmed.
[252]
This means that the transaction can still get canceled,
[254]
and there’s no guarantee it will ever enter the Blockchain.
[258]
If your business sells or ships goods and you accept payment in Bitcoin,
[261]
you should never accept an unconfirmed transaction
[264]
as a proof of payment.
[266]
Now we can now move on to the final step – confirming our transaction.
[270]
If you’ve watched our previous lesson about Bitcoin mining,
[273]
then you already know that miners group transactions together,
[276]
meaning they take those files sitting around in the Mempool,
[279]
group them together and create a block of transactions.
[282]
There is a limit to how many transactions can be inserted into each block.
[286]
Therefore, miners will usually pick the transactions that have
[290]
the highest mining fees attached to them first.
[293]
Miners will then compete with each other
[295]
in order to get their block into the Blockchain.
[298]
The mining competition is based on mathematical calculations,
[302]
and the miner with the most computational power
[304]
will have the best chance of winning.
[306]
Once a miner wins the competition and gets his block into the Blockchain,
[310]
all of the transactions that were in that block
[312]
will be considered as confirmed.
[315]
Basically, the miners are writing the history book of Bitcoin transactions,
[320]
and whoever wins the competition gets to write the next page.
[324]
On average, a new block of transactions will be mined,
[326]
or inserted into the Blockchain, every 10 minutes.
[329]
Keep in mind that this is on average.
[332]
Sometimes you’ll get 2 blocks confirmed within 1 minute,
[334]
and sometimes it can take more than an hour.
[337]
If a block was mined with your transaction in it,
[340]
you’ll notice it will now show on the block explorer
[342]
as having one confirmation.
[345]
As more and more blocks are added afterward, the confirmation number will grow.
[350]
Think of it as a building of blocks with our block at the very bottom.
[353]
Every additional block set on top of our own block
[356]
makes it harder to remove.
[358]
That’s why it’s usually suggested to wait for at least 6 blocks
[361]
before considering a transaction as fully confirmed
[364]
without any chance of cancellation.
[366]
That’s it!
[367]
Our transaction is now fully confirmed and received.
[370]
Hopefully, you now have a better understanding
[372]
of how the Bitcoin network operates.
[375]
If you have any additional questions about what we just covered,
[378]
feel free to leave them in the comment section below.
[380]
I hope you enjoyed this episode of Bitcoin Whiteboard Tuesday,
[384]
and I’ll see you
 in a bit.