Blockchain Transactions

In Blockchain system, transactions does not happen like normal banking transactions, like in banking system if you send someone money transaction is complete and details are stored somewhere that’s it, But in blockchain it does not happen that way let us understand it through a example by building a transaction:-

  • Mark – Me – 0.1 BTC
  • James – Me – 0.3 BTC
  • Susan – Me – 0.6 BTC
  • Tom – Me – 0.7 BTC

Here these guys are sending me some bitcoins, these all transactions are called UTXOs Which stands for unspent transaction output as there is no thing such as wallet in blockchain, all we have is blockchain itself.

Now i have a UTXO with 4 unspent transactions in it and let’s say i want to buy a car for 0.5 BTC the transaction for it should be like this :

INPUT – OUTPUT

0.6 BTC from susan -> 0.5 BTC to the car shop – UTXO for the car shop

-> 0.1 BTC to me – UTXO for me

The rule here is that whatever goes in input that must come in output now lets us update UTXOs after this transaction

  • Mark – Me – 0.1 BTC
  • James – Me – 0.3 BTC
  • Me – Me – 0.1 BTC
  • Tom – Me – 0.7 BTC

Now as we can see transaction of susan from my initial UTXOs are gone and 0.1 BTC transaction comes in place of it.

Transaction Fees in Blockchain

In blockchain we need to attach some fees to the transaction so that miners put our transaction in a block, the higher the fee we put the more are the chances of a successful transaction. Let us understand this with an example:

This are my leftover UTXOs now suppose i want to buy a bike and some fruits for 0.3 BTC and 0.05 BTC respectively.

  • Mark – Me – 0.1 BTC
  • James – Me – 0.3 BTC
  • Me – Me – 0.1 BTC
  • Tom – Me – 0.7 BTC

Transactions for it:

INPUT – OUTPUT

0.3 BTC from james -> 0.3 BTC to the car shop – UTXO for the bike shop

0.1 BTC from mark -> 0.05 BTC to the fruit shop – UTXO for the fruit shop

-> 0.02 BTC to myself – UTXO for me

-> 0.03 BTC to miner – UTXO for the miner

Let’s look at updated UTXOs now after all the transactions done above :-

  • Me – Me – 0.1 BTC
  • Tom – Me – 0.7 BTC
  • Me – Me – 0.02 BTC

This is how transactions works in a blockchain if you have any doubts fill the comment form and feel free to ask. In our next article we will talk about concept of wallets in blockchain.

Leave a Reply

Your email address will not be published.