top of page
Writer's picturePrakul Neupane

Bitcoin - Cryptocurrency

Updated: Nov 10, 2022

Hello!

Welcome to my blog for my YouTube channel, Stick2Tech!


Today I will talk about Bitcoin, which is a cryptocurrency, a digital asset that can be a placeholder for real money.







Data Structure


There are two main data structures that support Bitcoin, and both of them use Hash Pointers. Bitcoin uses a combination of these two data structures.


1. Blockchain




I have discussed Blockchain in detail in my blog and Stick2Tech YouTube channel.

It is a structure where all the transactions have to be recorded in a chain of immutable transactions.


2. Merkle Tree



This data structure is named after the inventor Ralph Markle. As per Arvind Narayabnan’s book on bitcoin, “In a Merkle tree, data blocks are grouped in pairs, and the hash of each of these blocks is stored in a parent node. The Parent nodes are in turn grouped in pairs, and their hashes are stored one level up the tree. This pattern continues up the tree until we reach the root of the node.”


3. Combination of Blockchain and Merkel tree is used in Bitcoin





Merkle tree helps to identify any fraud transaction by following two methods.


1. Proof of membership:




If the data block is presented, the hash code path in the block will be able to identify the proof of membership.


2. Proof of non-membership



If the data block is not presented, the hash code path in the block will be able to identify the proof of non-membership.



Digital Signature


Another important algorithm needed for a Bitcoin transaction is a digital signature so that the transaction can be encrypted and can be authenticated.



1. Generate Keys

Two keys are generated. A secret key is used to encrypt a message, and a public key is used to verify a message.


2. Sign Message

The secret key is used to sign the message, and it takes a secret key and message as input, and output is the signature of the message.


3. isValid

This algorithm is used to verify if the message is a valid message with the signature.



A Deeper look at Bitcoin Transactions


Let's take an example where User 1 gets 100 Bitcoins. Then User 1 gives 25 coins to User 2. User 2 then gives 10 coins to User 3. Lastly, User 1 gives 25 coins to user 3.





Transaction 1: User 1 gets 100 Bitcoins

Input:0

Output: 1[0]




Transaction 2: User 1 gives 25 Bitcoins to User 2

Input:1[0]

Output: 2[0]:25 Bitcoins to User2 and 2[1]:75 Bitcoins to User 1





Transaction 3: User 2 gives 10 Bitcoins to User 3

Input:2[0]

Output: 3[0]:10 Bitcoins to User 3 and 3[1]:15 Bitcoins to User 2





Transaction 4: User 1 gives 25 Bitcoins to User 3

Input:2[1]

Output: 3[0]:25 Bitcoins to User 3 and 3[1]:50 Bitcoins to User 1






Putting it all together



There are users called bitcoin miners that try to generate bitcoins using complex computational algorithms that were previously undiscovered. These coins can be exchanged for real-life currency through a bitcoin exchange.


Bitcoin exchange helps to change between Bitcoin and traditional currencies for users who do not mine or would like to exchange traditional money for bitcoin.



Bitcoin users can download a digital wallet that can receive bitcoin with its public key and spend the bitcoin by signing transactions using its secret key. Each user that wants to use bitcoin has a wallet consisting of a Secret & Public key and an account in the Bitcoin exchange to buy Bitcoin. Public key acts like an email address to receive coins or transactions. Secret keys are used like a password to sign the transactions to send coins to the recipients. Secret keys have to be saved properly either on paper physically, with a strong password in the digital wallet, or a personal cloud storage drive.


These transactions are recorded in a digital ledger called Blockchain by a group of computers called Bitcoin nodes. You can find out details of Blockchain here. After each transaction (trading Bitcoins through an exchange, sending Bitcoin, or buying online), it is recorded in the Blockchain as a digital ledger[5] maintained by a group of computers called Bitcoin nodes.[3] Bitcoin uses the nonce block mined by Bitcoin miners to start a block as the first data in the Blockchain [2][3].


Bitcoin transactions consume the following signed data using the private key from the sender’s wallet as input[1][3]:

Input: Previous transaction of the Bitcoin.[1]

Amount: Amount to be transferred to the recipient.[1]

Output: Public key of the recipient’s wallet.[1]

As an output, Bitcoin records data for the transaction in the Blockchain and Merkle tree, and the recipient’s wallet receives the coin.


Key points to be noted



Bitcoin functions like a currency and is valued as gold as it has a limited mining future.


Bitcoin affected users by giving a new platform for investment in value, just like stocks. While people have gained money off of bitcoin’s rise in value for the last few years, its value has currently crashed, the effect being many people losing their money.


Overall, Bitcoin's purpose is to give an alternative to regular currency. This is beneficial for people who want a decentralized version of currency that is not controlled by the government or for people who want to take a risk and invest in its possible rising value.


Benefits



Some benefits to using Bitcoins are that it has a reputation of being one the first cryptocurrencies, accepted internationally, new investments, lower transaction fees, not government controlled and only 21 million coins can ever exists which makes it valued like gold.[9]


Shortcomings


However, there are shortcomings to using Bitcoin as it is vulnerable to scams, fraud and attacks, its value is volatile, newer cryptocurrencies are more secure and Bitcoin needs high amount of computing power and time investment to mine new coins.


Thank you for reading my Blog about Bitcoin, I will be making other blogs relatively soon and I want to hear your opinion about what I should talk about? Should I go more in-depth with this topic, or is there something you want specifically like Cryptocurrencies in relation to Blockchain, if this topic interested you, I encourage you to do your own research on the subject, or write in the comments below if you have any questions for me.[9]


Acknowledgments:

[1] https://www.bitcoin.com/get-started/how-bitcoin-transactions-work/

[2] https://bitcoin.org/en/how-it-works

[3] https://blockgeeks.com/guides/what-is-bitcoin/

[4] http://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html

[5] https://blog.goodaudience.com/blockchain-for-beginners-what-is-blockchain-519db8c6677a

[6] https://bitinfocharts.com/bitcoin/address/1HQ3Go3ggs8pFnXuHVHRytPCq5fGG8Hbhx

[7] https://towardsdatascience.com/all-you-need-to-know-about-the-blockchain-a23388109774

[8] https://coingape.com/bitcoin-btc-price-analysis-btc-penetrates-9000-as-it-takes-out-critical-resistance/


[9] https://www.moneycrashers.com/bitcoin-history-how-it-works-pros-cons/

[10] https://busy.org/@madkrieg/how-does-bitcoin-work

[11] https://steemit.com/bitcoin/@mdsohagm24/how-do-bitcoin-transactions-work

[12] https://www.coindesk.com/learn/bitcoin-101/what-is-bitcoin


[13] https://www.investopedia.com/articles/forex/091013/future-cryptocurrency.asp

[14] https://www.quora.com/Can-a-BitCoin-purchase-be-tracked-to-me-if-my-wallet-has-no-personal-information


43 views0 comments

Recent Posts

See All

Comments


bottom of page