0xViking.eth(🧱,🚀) 🔮 🇮🇳 Profile picture
Jan 19, 2022 39 tweets 22 min read Read on X
Another day, another WTF is thread

In the last three threads we have seen about WEB3, BLOCKCHAIN and CRYPTOCURRECNY.

Today let's see about the the very first decentralized cryptocurrency ever created which is Bitcoin.

"WTF is BITCOIN?"

1/ Image
@Bitcoin was introduced to address the root problem with conventional currency and the trust that is required to make it work.

You can read this thread to understand how currency evolved over time 👉 bit.ly/WTFisCRYPTOCUR…

In General trust make systems brittle.

2/
@Bitcoin @Bitcoin originally was proposed in 2008 whitepaper* "Bitcoin: A Peer-to-Peer Electronic Cash System" by a person, or group of people, using the alias "Satoshi Nakamoto". It was launched in January 2009.

*Whitepapers explain the purpose and technology behind a project.

3/ Image
@Bitcoin Bitcoin is a decentralized digital currency that enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate with no central authority: transaction management and money issuance are carried out collectively by the network.

4/ Image
@Bitcoin Bitcoin is designed around the idea of using cryptography to control the creation and transfer of money, rather than relying on central authorities

Distributed cryptocurrency was first described in 1998 by Wei Dai weidai.com/bmoney.txt on the cypherpunks mailing list

5/
@Bitcoin So how does this Bitcoin work?

- Lets assume there are 4 friends Alice, Bob, Charlie and you
- Everytime you guys exchange money, it will be inconvinient exchange each time in cash?
- So decided to use a communal ledger that records all payments that you intend to clear

6/ Image
@Bitcoin - Ledger will be public and accessible to everyone, and can add a new line
- At the end you guys decided to look all the transactions and decided to pay out. If you spend more than you reeive, you keep the money in pot and If you receive more than you spend you take from pot

7/ Image
@Bitcoin The problem with this sort of public ledger is anyone can add line.

- Bob can add a line saying "Bob paid you $100" without your knowledge

- We lack the trust here, We don't know whether the line was added by the person who it was meant to be added

8/ Image
@Bitcoin This can be solved by digital signatures in cryptography

- Like a handwritten signatures in the physical world, the idea here is that you should be able to add something next to a transaction that proves you saw and approved it which cannot be forged/tampered.

9/ Image
@Bitcoin In general any digital data is just 0's and 1's, So can't the digital signature just be copied and forged?

- Well in cryptography, everyone has their own public and private key pair
- Where private key is only known to your and public key intend to be publicly known

10/ Image
@Bitcoin - In real world your signature looks same in what ever document you sign

- But the digital signature you do using your public/private keys it changes completely even for the slightest change to your message you are signing

- In bitcoin the digital signature is 256 digits

11/
@Bitcoin In general any digital signature scheme will consist of two functions, one to produce a signature on a message, and another to verify that a signature is valid.

✅Sign(Message, private key) = Signature

✅Verify(Signature, Message, public key) = True/False

12/
@Bitcoin The basic idea is to make it infeasible to find/guess the signature

- So in bitcoin the number of possibilities of the signature to guess is 2^256
- Bitcoin uses the Elliptic Curve Digital Signature Algorithm using the curve Secp256k1 and the hash function SHA256

13/ Image
@Bitcoin This alone doesn't guarantee that the data cannot be forged.

For example You sign a transaction "You pay Alice $50" and add to the ledger.
Now Alice cannot add a new line just like that because of this signature thing but what if Alice just copies the line inserted by you

14/ Image
@Bitcoin To solve this, when you sign a transaction, include an unique ID associated with that transaction.

That way, if "You pay Bob $100" multiple times, each transaction requires a completely new signature.

Now we have huge aspect of trust because of this digital signatures

15/ Image
@Bitcoin But there is one more issue -

What if one of your friend charlie with a lot of debt doesn't want to pay at the end when you guys tally and runs away

To solve this, We can check the "overdrawn" condition something similar to "Double spend" condition in the real world

16/
@Bitcoin - In the start system knows balance of every account

- On each and every transaction, system verifies if the payment is valid or not by checking all of his previous transactions with the balance

- If user spends more than they have then transaction is marked as invalid

17/ Image
@Bitcoin ONE THING TO REMEMBER IS "BITCOIN IS JUST A LEDGER", The exchange for bitcoin to real world currency is like the conversion of EURO to USD and vice versa., on open market.

To “own” a Bitcoin just means having a positive balance on the Bitcoin ledger

18/ Image
@Bitcoin We have solved one form of trust issue, But there is one more:

- Where the ledger is being hosted, if it is on one server it is just being owned and controlled by the owner of that server

- Owner can do what ever they want

- So we have to trust that owner as well

19/ Image
@Bitcoin We can solve this by making it decentralized:

- Keeping a copy of each ledger with every participant of that network

- When ever a new line is to be added to the ledger, The signer will broadcast the message to every other participant in that network

20/ Image
@Bitcoin There is still one more issue:

How to make sure that data in each ledger is same all the time
or
To make everyone agree on which ledger is the valid one

Like for example you hear multiple transactions, but not sure whether the same were heard by every other participant.

21/ Image
@Bitcoin To solve this "Satoshi" described a protocol in the original bitcoin whitepaper called "PROOF OF WORK"

- This protocol solves the problem of which ledger to be trusted
- The protocol says TRUST which ever ledger has the most computational work put into it.

22/ Image
@Bitcoin Because to make a fradulant transaction to be valid it requires a infeasible amount of computational work

- The computational work involves cryptographic hash functions

- Hash function takes input of any message/file and the output is a string of fixed length called hash

23/ Image
@Bitcoin - Everytime Output looks random but with the same message the output will always be same

- Even if a single character is edited in the message whole output will be changed

- This cryptographic hash function is infeasible to compute in the reversse direction

24/ Image
@Bitcoin ofcourse there is no hard proof that it is not possible to compute in reverse direction but it makes very very hard and requires a way much resources that we have in our generation

So how exactly does this hash function help solve our problem👇

25/
@Bitcoin If you remember in the tweet 15/ of this thread we said we add a unique ID to the ledger which makes the signature change.

Well let see how we select that unique ID specific to Bitcoin: If you compute the hash of the ledger with the newly added ID the first 30 shoule be 0

26/ Image
@Bitcoin - The probability of finding that unique number which will effect the output to have 30 zeros in the starting is 1/2^30 which is like 1 Billion.

- So to find that number it takes lot of computation power because they have to go through ~1 billion combinations

27/ Image
@Bitcoin Since this involves a lot of WORK to verfity that it is valid this process if called "PROOF OF WORK"

So even if a single character is chaged in the message later, it has to go through the entire process of changing the hash, guessing the unique number etc.,

28/ Image
@Bitcoin First organize the given ledger in to BLOCKS, where each block consists list of transactions together with proof of work(that unique id)

The block is valid only if it has proof of work

To make it systematic, every block should refer to the hash of the previous block

29/ Image
@Bitcoin Since it looks like a chain, because of those references to the previous blocks now on the ledgers combinely called BLOCKCHAIN.

if you need more info on BLOCKCHAIN please go ahead and read this thread 👉bit.ly/WTFisBLOCKCHAIN

30/
@Bitcoin To summarize this is how it works:

So called block creator(Miner) listens to the transactions being broadcasts and then calculates the unique number(proof of work) by doing a lot of work.Once it is done the block then will be broadcasted to everyone.

This is called Mining

31/
@Bitcoin Since this involves a lot of work the miner will be rewarded by system allows the creator to put a special transaction on top of the list which is like "Miner 1 gets 10 Bitcoin".

This is called block reward :
- It has no sender/signature
- Adds to total supply

32/ Image
@Bitcoin The blocks that are valid and are added to the network depends on Proof of work.

This process of agreeing on which is valid in a decentralized way is called CONSENSUS.

There are different types of CONSENSUS algorithms out but bitcoin was intoduced with "PROOF OF WORK"

33/
@Bitcoin one more thing to remember:
-The way of deciding the number of zeros at the start of hash varies.

- In bitcoin blockchain the number of zeros will increase as the number of miners keep incereasing so as to keep the idle time of adding block is always ~10 minutes

34/ Image
@Bitcoin For Every 210,000 blocks i.e., ~4 years the block rewards will be halved

So right now the blockrewaard might be 6.25 per block.

you can find more about the blockreward here
👉blockexplorer.one/bitcoin/mainnet

35/ Image
@Bitcoin Since the reward will be decreased over time there would be a maximum amount of bitcoins minted overall which in this case it is 21Million.

But this doesn't mean miners will not be rewarded later, Miners will also take transaction fee inaddition to the block reward.

36/
@Bitcoin This brings to the end of this excellent thread.

I know this is pretty long but tried my best to make sure to cover maximum concepts that were involved in bitcoin.

I really appricate your time for reading this thread this long.

Share the thread to who you think must read

37/
@Bitcoin Resources:

The only resource i would love to provide it this video
by @3blue1brown

95% of this images i took were from this.

Original Whitepaper by Satoshi 👉bitcoin.org/bitcoin.pdf

38/
@Bitcoin @3blue1brown Thank you for reading it till here.

I am a budding developer in web3, Started #21DaysOfLearnandShare to learn more and share.

If you like my explanation,
✅Like the post
✅RETWEETS are APPRICIATED
✅Please follow @0xViking for more such content

Thanks again
0xViking

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with 0xViking.eth(🧱,🚀) 🔮 🇮🇳

0xViking.eth(🧱,🚀) 🔮 🇮🇳 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @0xViking

Mar 1, 2022
Day-5(#R2D5)

Focusing on JavaScript alone can change your life.

JavaScript lets you become a:

✅ Frontend Developer
✅ Backend Developer
✅ Blockchain/Web3 Developer
✅ Game Developer
✅ Embedded Systems Engineer
✅ Mobile App Developer

Resources🧵👇
Yes, our main topic today is

"JAVASCRIPT"

This thread is part of the WEB3 developer roadmap.
bit.ly/WEB3-ROADMAP

#100DaysOfWeb3 #100DaysOfCode #web3 #developer #21DaysOfLearnandShare
As I told you already JS alone can change your life so I cannot restrict how many days you want to spend JS as part of the roadmap.

But If you decide to have strong building blocks in JS check:-

One of the best interactive courses I found by @scrimba

scrimba.com/learn/learnjav…
Read 13 tweets
Feb 28, 2022
Day-4(#R2D4)

Today's here are the resources about:-
HTTP Caching, RPC Protocol, Browser’s developer tools

As part of the WEB3 developer roadmap.
bit.ly/WEB3-ROADMAP

🧵👇

#100DaysOfWeb3 #100DaysOfCode #web3 #developer #21DaysOfLearnandShare
1/
Caching :

As yesterday mentioned our browser tries to check the local cache first to resolve DNS.

Similarly, there are CDN services that provide complete websites from their cache using the HTTP protocol.

cloudflare.com/en-in/learning…

2/
RPC Protocol :

Normally our programs and processes run locally in our system, but there are some protocols that support execution in a remote system. Such as RPC protocol, which makes it easy for the peer-to-peer networks.

guru99.com/remote-procedu…

3/
Read 6 tweets
Feb 27, 2022
Well, today let us see some more very basic yet important that we use daily and don't notice what happens in the background.

How does a WEB BROWSER work?
What is DNS, HTTP protocol?

You can start directly from 9/ tweet if you don't need basic introduction stuff.

🧵👇

1/ Image
Companies typically make free web-browsers with some financial interest in how you use their product.

With this, they are able to track your computing habits and make revenue by selling your data to third-party vendors

2/
Okay, what exactly is a web browser?

In short, it is the place where you interact with the web.

Remember: The words internet and web are not interchangeable, They are related but two different things
Read 28 tweets
Feb 26, 2022
Let's talk about some basic "Networking Concepts"

This is part of the web3 developer roadmap
bit.ly/WEB3-ROADMAP

🧵👇

1/

#100DaysOfCode #100DaysOfWeb3 #21DaysOfLearnandShare #R2D2(total-Day23)
Networking is the word we use when we talk about connecting computers together so that they can share data with each other.

Local networks range from simple networks consisting of two computers to networks connecting hundreds of thousands of devices

2/
Who owns the internet?
internet is not owned by any individual or group.

The internet is a worldwide collection of interconnected networks (network of networks), cooperating with each other to exchange information using common standards

3/
Read 21 tweets
Feb 25, 2022
Welcome to the first thread on our roadmap

"LINUX and Bash commands"

Below we will discuss why Linux is important, what Open Source Software is, and the basic usage of the Linux terminal

let's dive in 🧵👇

#100daysofweb3 #100daysofcode #web3 #linux #21DaysOfLearnandShare
1/ Image
You might have interfaced with Linux many times before because so many devices run Linux.

Phones, TVs, Point-Of-Sale devices, Networking devices, Game consoles, In-flight entertainment systems as well as stock exchanges.

2/
You might have also heard about the recent buzzword "cloud", which is just a Linux system.

Your favorite applications on the internet like mail, productivity suites, watching entertainment every product run in the cloud on Linux based systems.

3/
Read 24 tweets
Jan 22, 2022
Have you recently heard the word "DeFi" or "Decentralized finance" and never know what is that or anything about it?

Well here i am, to help you understand the basic details of it in simple terms

So, Lets dive in "WTF is DeFi?"

👇🧵

1/
- In the previous "WTF is" thread about ETHEREUM part 1 i told that ethereum was created with the intention to decentralize everything.

- Smart Contracts help acheive decentralization of majority of things on blockchain.

Check this 👉bit.ly/WTFisSMARTCONT…

2/
- Financial system is one main thing that runs by centralized entities like governments and intermediaries like banks

- DeFi relies heavily on - Cryptography, Blockchain & Smart Contracts

- According to @defipulse today in DeFi Total Value Locked(TVL) is $92.36B 😱

3/
Read 24 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(