How Bitcoin Works ?

The bitcoin system, unlike traditional banking and payment systems, is based on decentralized trust. Instead of a central trusted authority, in bitcoin, trust is achieved as an emergent property from the interactions of different participants in the bitcoin system

Bitcoin Overview

In the overview diagram below, we see that the bitcoin system consists of users with wallets containing keys, transactions which are propagated across the network and miners who produce (through competitive computation) the consensus blockchain, the authoritative ledger of all transactions.

Bitcoin Overview
Bitcoin Overview

Bitcoin Transactions

In simple terms, a transaction tells the network that the owner of a number of bitcoins has authorized the transfer of some of those bitcoins to another owner. The new owner can now spend these bitcoins by creating another transaction that authorizes transfer to another owner, and so on, in a chain of ownership

Transactions are like lines in a double-entry bookkeeping ledger. In simple terms, each transaction contains one or more “inputs”, which are debits against a bitcoin account. On the other side of the transaction, there are one or more “outputs”, which are credits added to a bitcoin account. The inputs and outputs (debits and credits) do not necessarily add up to the same amount. Instead, outputs add up to slightly less than inputs and the difference represents an implied “transaction fee”, a small payment collected by the miner who includes the transaction in the ledger

Transaction as Double-Entry Bookkeeping
Transaction as Double-Entry Bookkeeping

The transaction also contains proof of ownership for each amount of bitcoin (inputs) whose value is transferred, in the form of a digital signature from the owner, which can be independently validated by anyone. In bitcoin terms, “spending” is signing a trans‐ action which transfers value from a previous transaction over to a new owner identified by a bitcoin address

Transactions move value from transaction inputs to transaction outputs. An input is where the coin value is coming from, usually a previous transaction’s output. A transaction output assigns a new owner to the value by associating it with a key. The destination key is called an encumbrance. It imposes a requirement for a signature for the funds to be redeemed in future transactions. Outputs from one transaction can be used as inputs in a new transaction, thus creating a chain of ownership as the value is moved from address to address.

Common Transaction Forms

The most common form of transaction is a simple payment from one address to another, which often includes some “change” returned to the original owner. This type of trans‐ action has one input and two outputs

Most Common Transaction
Most Common Transaction

Constructing a Transaction

$ curl https://blockchain.info/unspent?active=1Cdid9KFAaatwczBwBttQcwXYCpvK8h7FK
{
 "unspent_outputs":[
 {
 "tx_hash":"186f9f998a5...2836dd734d2804fe65fa35779",
 "tx_index":104810202,
 "tx_output_n": 0,
 "script":"76a9147f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a888ac",
"value": 10000000,
 "value_hex": "00989680",
 "confirmations":0
 }
 ]
}

Creating the outputs

A transaction output is created in the form of a script that creates an encumbrance on the value and can only be redeemed by the introduction of a solution to the script

Leave a Comment