Currently, the bitcoin network is processing about 4-4.5 transactions per second and up to 7 per second, with a current total of about 10million transactions per year.
Graphic Courtesy of blockchain.com
To understand how bitcoin transactions work, we need to first understand a few concepts. Once these are understood, how transactions work will be much easier to understand.
KeyPairs (Public and Private)
The bitcoin network requires all users to have keypairs. A keypair is made of one public and one private key.
Private keys are a single 256-bit number. You can create one yourself or have it generated. From this private key, a public key is generated using the Elliptic Curve Digital Signature Algorithm (ECDSA). The resulting public key string of numbers cannot be used in reverse to find a private key. This new key pair is used to encrypt/decrypt data as well as lock data where only the private key can be used to unlock it.
Basic Authentication Process
Bitcoin authenticates transactions and senders with digital signatures created using keypairs. The sender wants the correct bitcoin amount to be transferred to the right person(wallet), and the receiver wants to ensure the data is accurate and from the sender.
At this point, data, the public key, and the digital signature are provided to the receiver.
The Bitcoin Transaction(receiving)
Now that we know the basics of the transaction, let’s dive into some specifics.
You decide to sell your vintage car, and a buyer (we’ll call him Nakamura) offers to pay you with bitcoin, so you must provide a bitcoin address. You create an address by hashing your public key, resulting in a “PubKeyHash” and converting that to a bitcoin address which starts with a 1 or 3 with the base58check format.
You can reverse engineer the PublicKeyhash from the address but cannot even obtain the public key from the PublicKeyHash.
With the provided address, Nakamura (your car buyer) will create a transaction output containing:
When you eventually want to spend the ten bitcoins, your private key will be used to feed the PubKey Script and unlock the received Bitcoin.
The transaction must be validated and mined by the miners (usually within 10 minutes but sometimes longer) to be completed, and then your wallet will indicate the ten-bitcoin deposit. The wallet does not “contain” the money like a real-world wallet; just an output called an Unspent Transaction Output (UTXO). UTXOs are unlocked when you send some or all the bitcoin to another address creating a new UTXO.
The bitcoin network is not an account-based system but a matrix of UTXOs. The wallets hold keys to unlock those UTXOs and transfer them to others.
The Bitcoin Transaction (Sending)
If you send any amount of satoshis, you will create a new UTXO for that transaction and either send all the bitcoin with the single new UTXO or a second new UXTO is created with the remainder which is sent right back to you.
Now you want to spend that bitcoin from the car sale to buy a collection of Pokémon cards from Ash (He’s got them all). You will therefore create a new input and output.
You start with the transaction ID and Index to locate the UTXO and the PubKey Script from the sale of the car (blue rectangle above).
You then create a new Signature Script which is for the satisfaction of the PubKey Script. The Signature script has a signature (all the transaction data for sending to Ash) and your public key. The data is:
This data is hashed twice with the SHA256 algorithm and signed with your private key. This product is then added to your public key to create the new Signature Script. Orange rectangle above
Your output contains the satoshi’s to be transferred, a new index, and a new PubKey Script with Ash’s address he provides to lock the bitcoin to his address.
Miners and the PubKey Script
When the transaction is sent to the miners, they will take the Signature Script and run it with the PubKey Script. With a “true” result, the transaction is added to the block and then validated.
The PubKey Script explained
Graphic modified from dashcore.readme.io
The PubKey Script uses the following stacked six-step process to verify (return a T or F) the transaction:
Ash now gives you your beloved Pokémon collection.
The Bitcoin Transaction Validation process is a set of checks to ensure that the network stays accurate and allows for privacy by not transmitting personal information to make transactions. The transaction process has been proven to be a robust system that can prevent tampering and give confidence to its users.
Disclaimer: The author of this text, Jean Chalopin, is a global business leader with a background encompassing banking, biotech, and entertainment. Mr. Chalopin is Chairman of Deltec International Group, www.deltecbank.com.
The co-author of this text, Robin Trehan, has a Bachelor’s degree in Economics, a Master’s in International Business and Finance, and an MBA in Electronic Business. Mr. Trehan is a Senior VP at Deltec International Group, www.deltecbank.com.
The views, thoughts, and opinions expressed in this text are solely the views of the authors, and do not necessarily reflect those of Deltec International Group, its subsidiaries, and/or its employees.
Thank you for your interest in the Deltec Initiatives Foundation. You can contact us using the form below.
Before sending a message to us, kindly note that we do not accept requests for funding. Thank you for your understanding.