Although blockchains can differ in form and function, all follow a basic transaction flow.
6 Steps to a Bitcoin Transaction
Step 1: Operation Initiated
Let’s follow the step with a basic Bitcoin transaction. If Alicia wants to send Billy some bitcoin, she will go to a Bitcoin wallet application on her phone or computer where she has some Bitcoin stored. Wallet applications are usually free downloads that create a digital wallet to purchase and/or store your cryptocurrency.
To initiate the transaction, Alicia would make a request of the system to send Bitcoin to Billy’s wallet by specifying the amount and Billy’s Bitcoin address. It is worth mentioning here that cryptocurrencies are a function of a particular blockchain, the Bitcoin blockchain only transacts bitcoin and the Ethereum blockchain can only exchange Ether.
Step 2: Smart Contract Triggered
When Alicia sends her transaction to the network, it triggers a smart contract that checks with the nodes on the network to make sure Alicia has the currency to spend, and that she hasn’t already spent it. Once checked, the transaction is added to a proposed block.
Step 3: Operators Spread Transaction
Proposed block is communicated to the network through the peer-to-peer protocols.
Step 4: Consensus
For the Bitcoin network to validate a block, nodes or miners must validate the correctness of a block by completing a math problem first. The node that completes the Proof of Work equation first is rewarded with some newly minted Bitcoin. Once a solution for the equation is reached, the other nodes can easily check its accuracy, thereby accepting the new block onto the blockchain.
Step 5: Spread the New Block
This block is spread throughout the network through the same peer-to-peer communications we used for the transaction. When block operators receive a copy of the new block, they add it to their copy of the distributed ledger. This guarantees that all members of the peer network agree on the current state of the blockchain’s distributed ledger.
Step 6: Transaction Completed
The user’s wallet monitors the creation of new blocks that include transactions associated with the user. When a block containing the completed code from the user’s operation is received, an event is created to notify the user that the operation is complete. When the block containing Alicia’s Bitcoin transfer to Billy is added to the blockchain, an alert will be sent to the affected wallets that the transaction was accepted and completed.