AssumeA
send money to B
amount of 100
.
What do bank have to do?
First, Check A
have money more than 100
.
Second, withdraw amount of 100
from A
's account.
Third, deposit amount of 100
to B
's account.
It is really simple.
but, How it works that If there meet an error between second and third
maybe,, withdraw amount of 100
from A
's account, B
can't deposit amount of 100
.
finally amount of 200
will be disappear :(
The UTXO(Unspent Transaction Outputs) can solve this problem.
I'll explain UTXO with again upper example.
100
have onwership id that is0xAAA
then we can change upper flowchart like As follows
First, Check A
have money more than 100
.
Second, change 100
's onwhership id 0xAAA
to 0xBBB
There is no problem even they meet an error.
This is simple logic of UTXO.