The Beginners Guide To Crypto: Difference between revisions

From Seasonal Tokens
Jump to navigation Jump to search
 
(55 intermediate revisions by the same user not shown)
Line 14: Line 14:
Let's have a closer look at these issues:
Let's have a closer look at these issues:


==Quest: Electrum Wallet==


===Task: Install Electrum===
===Task: View Seed===
===Task: Private Key===
===Task: Bitcoin Addresses===


==Quest: Install Electrum==


==Quest: CEX==
Visit https://electrum.org/
CEX, credit card, examples. KYC


And download and install the Electrum wallet


===Task: Top Cryptocurrency Exchanges:===
For Android: https://play.google.com/store/apps/details?id=org.electrum.electrum&pli=1
 
Under the Wallet tab, click on seed to reveal your wallet seed,
The wallet seed is all you ever have, you don't even have Bitcoins, only the keys to move them from one
address to another in the blockchain.
 
If you lose the wallet seed, you lose everything.
 
Task:
 
Copy the 12 words in the correct order on paper.
Keep this physical copy where you won't forget it.
 
==Quest: Receive Bitcoin==
 
To receive Bitcoin you have to provide the sender with one of your Bitcoin addresses.
The sender will use your address in the "send" tab of a wallet, and click send.
When the transaction is processed by the network it will appear in your wallet.
 
You can see some of your addresses in the Addresses tab.
You can generate as many addresses as you want. In Bitcoin it is a security practice to use a new address for every transaction, because if somebody knows the address they can see
all transactions happening with that address.
 
Even though the bitcoin addresses are public, and they can be seen in the blockchain by anybody, as long as nobody knows that the address is yours there is no way to make the connection
between the address and the owner.
 
There are more sophisticated ways to send a payment request. Click on the "Receive" tab in the wallet.
You can send a payment request with a description, the requested amount and the "expiry" time. This time is how long the address will be reserved for this transaction only.
After that time the address can be used for other transactions. But Bitcoin addresses never expire.
 
Task: Create a payment request, add a description, a requested amount and select expiry time.
Copy the Bitcoin URI by clicking on the "Bitcoin URI" window (Uniform Resource Identifier). You will use this to complete the task.
and for the next quest.
 
 
==Quest: Send Bitcoin==
 
Sending Bitcoin is also very easy, you get the Bitcoin address of the person you want to send funds to, and paste it in the "Pay to" field in your wallet.
 
If you have a Bitcoin URI you can paste that in the "Pay to" field and the wallet will fill in the details of the transaction, to see how it will appear
to a person if you send them the URI. If you have the Bitcoin in your wallet, by clicking the Pay... button you would send it to yourself, and pay a fee for the transaction.
 
When you hit the Pay... button (if you have funds for the transaction) a window appears where you can set the fees to pay.
 
The network receives new transactions and stores in a memory pool (mempool) of unprocessed transactions, the ones paying higher fees get first in the next block.
The blocks have a limited space for transactions, if there is space in the block even the transactions with no fees attached can get in the block, but
when the network is busy your transaction can get stuck and take forever to be processed.
 
For this reason Electrum estimates the fees according to how fast you want your transaction to be processed.
Fees are proportional to the amount of data in the transaction, not to the amount of Bitcoin sent.
 
Task: Paste the URI you generated in the previous quest and share a screenshot of your "send" tab in the wallet.
 
'Exercise:'
 
After you hit the Pay... button, the request is sent to the Bitcoin network. When it gets processed you receive a confirmation message.
You can see the status of your transactions in the block chain. We will see this in another quest.
 
When you hit the Pay button the bitcoin sent is no longer displayed in the wallet to avoid confusion.
But you have the Bitcoin until the transaction is processed.
 
If the transaction is not processed because of low fees, it can stay for long time in the mempool, but your Bitcoins aren't going anywhere until the transaction is processed.
 
Sometimes when this happens you can send another transaction with higher fees, and it gets trough before the old transaction.
 
When the old transaction is considered, it fails because the transaction with more fees was processed first.
 
 
 
==Quest: Top Cryptocurrency Exchanges:==
 
So how to get Bitcoin? Either you have somebody to send it over to you, or you have to buy it in a Centralized Exchange.
In order to access one of these exchanges you have to do a Know your Customer process to verify your identity, after that you can buy Bitcoin
using a credit card, or bank transfer.
 
Visit this site:


https://coinmarketcap.com/rankings/exchanges/
https://coinmarketcap.com/rankings/exchanges/
Task: share a screenshot showing the top 10 centralized exchanges.
'Exercise'
How many exchanges are listed in Coinmarketcap?


CMC Liquidity score 0 to 1000
CMC Liquidity score 0 to 1000
Quest: CEX, credit card, examples. KYC
=Bitcoin and Cryptography=
==Cryptography==
Crypto currency is a technology based on cryptography. It will be very useful to know a few basic concepts to understand the language used in crypto.
The oldest use of cryptography is to send messages from one person to another but written in such a way that only the sender and the receiver can understand the message.
For this system to work, the sender and the receiver have to agree on a “key” to substitute the letters of the message for other set of symbols that only they know.
The sender takes the original message and applies the rules given by the “key” to convert the original message into an unintelligible message. The sender “encrypts” the message with the key.
This message can be delivered to the other person and it does not matter if others can read it, because without the “key” they can’t decipher the message.
When the receiver gets the message, he can convert it back to the original form using the same “key” that is known only for the sender and the receiver.
This is widely used in telecommunications to make sure that the information remains private even if it is being broadcaster trough a public network.
This type of cryptography requires that the sender and receiver have to agree and share the key before sending messages.
Cryptocurrency uses a different kind of cryptography that does not require the sender and the receiver to agree before sending messages.
==Public and Private Key Cryptography.==
Public Key cryptography involves a pair of keys:
A) A Private Key, which is supposed to be secret.
B) a Public Key, which can be shared openly.
* Information encrypted with the Public Key can only be decrypted with the corresponding Private Key.
* Information encrypted with the Private Key can only be decrypted with the corresponding Public Key.
And for creating digital signatures.
'''Relation to Bitcoin:'''
In Bitcoin, your Private Key is associated with your wallet seed, The Private Key can create many associated Public Keys associated to your "Bitcoin Addresses".
==Quest: Digital Signatures==
'''Example:'''
Alice wants to prove that a particular Bitcoin address belongs to her. So she signs a message with the Private Key
associated with the address.
Anybody with the message the bitcoin address and the digital signature can verify that the address belongs to her.
Only the owner of the Private Key associated with the bitcoin address can create the digital signature. Even the smallest change
in the message spoils the signature.
Verify the digital signature provided below.
Go to the Sign/Verify window under Tools in the Electrum wallet.
Paste the following information in the corresponding fields.
'''Message:'''
message
'''Bitcoin Address:'''
bc1q6fyqcyyhkn8cy76acnf385hunpfarfxr2p8jxu
'''Signature:'''
H0DBXVTGOZAzmgy/c2d1NB/Kl+vijA2ISoJFWwZoGcXWCz6687a6+fsY8B2j0+T6TEjGZ+AAG/71MFobEP2LIh4=
Click on Verify.
Only the owner of the private key associated with the Bitcoin address can create the digital signature.
Try changing anything and the signature stops working.
Task: Verify the digital signature and send a screenshot of the verification message.
Task: Make a small change in the original message and try verifying again the signature. Share a screenshot of the (failed) verification message.
==Quest: Encrypt / Decrypt a message==
'''Example:'''
* Bob wants to receive a secret message from Alice,
* Bob send’s Alice his Bob’s Public Key.
* Alice will use Bob’s Public Key to encrypt the message.
* The message can be sent trough a public channel and be visible to all, but only Bob can decrypt it using Bob’s Private Key.
Bob can reply to Alice as well: If Alice can decrypt the message with Bob’s Public Key, then she knows the message was created by somebody who has Bob’s Private key.
That is why it has to be really private: To make sure the message is from Bob if it was decrypted with Bob's Public key.
This method has the advantage that two unknown persons can send encrypted messages to each other by sharing their Public Keys.
Public and Private Pairs of keys are the heart of cryptocurrency technology, they match each other like lock and key. Let’s illustrate how it works in Bitcoin.
==Quest: Decrypt message==


Bob will send you an encrypted message.
First he will share with you his public key:
03e5ab3177320108be0ebafa44a23fc199b0e07fa81dcf35711d923d6da298e950
After that, he can send you encrypted messages over a public channel and only you can decrypt them.
Here is Bob's encrypted message:
QklFMQLVRrf24UKTrlarxhO7+M7iFVTFpwhbUYrdhA0roM8XBU/Iz/XAVM2ELypA73vp626kaWj9BYphZnA/ysmzS2Fq6lU6P/3C5oLDKkfg6WjHJbPAal/8W4V3Zkrlkn0FpLg=
Task: Use the encrypt/decrypt tool in Electrum's wallet to decrypt this message. Share a screenshot of the decrypted message. Input the Encrypted message and the Public key and hit "decrypt".
'''Exercise:'''
To create the above example, we navigated to the Encrypt/Decrypt tab under "tools" in the Electrum wallet.
then typed the message.
Input the Public Key that will be used to decrypt the message.
And click on Encrypt to create the encrypted message above.


=Crypto Market Cap:=
=Crypto Market Cap:=
Line 53: Line 264:
And the chart represents the sum of all market cap of those 15239 cryptocurrencies.
And the chart represents the sum of all market cap of those 15239 cryptocurrencies.


===Task: What is the total crypto market cap?===
Task: What is the total crypto market cap?


(Ans: Text)
(Ans: Text)
Line 71: Line 282:
[https://companiesmarketcap.com/gold/marketcap/ Gold Market Cap]
[https://companiesmarketcap.com/gold/marketcap/ Gold Market Cap]


===Task: What is the Gold Market Cap?===
Task: What is the Gold Market Cap?


(Ans: Text)
(Ans: Text)
Line 89: Line 300:




===Task: What is the most valued company by Market Cap?===
Task: What is the most valued company by Market Cap?


(Ans: text)
(Ans: text)
Line 101: Line 312:




= BTC Dominance Chart=


==Quest: (BTC Dominance Chart)==
Bitcoin is the major contributor to the Total Crypto Market Cap
Bitcoin is the major contributor to the Total Crypto Market Cap


Find the top 3 Cryptocurrencies by market cap.
Find the top 3 Cryptocurrencies by market cap.
==Quest: (BTC Dominance Chart)==


1) Visit the following website:
1) Visit the following website:
Line 116: Line 325:
contributing to the Total Crypto Market Cap.
contributing to the Total Crypto Market Cap.


===Task: What is the percentage of Bitcoin Market Cap. (Percent of the Total Crypto Market Cap)?===
Task: What is the percentage of Bitcoin Market Cap. (Percent of the Total Crypto Market Cap)?


=Bitcoin Price History=
=Bitcoin Price History=
Line 137: Line 346:
Select Logarithmic scale in the price chart.
Select Logarithmic scale in the price chart.


===Task: Take a screenshot of the graph in logarithmic scale.===
Task: Take a screenshot of the graph in logarithmic scale.


(Ans: Upload File)
(Ans: Upload File)
Line 159: Line 368:
(Introduce a picture of the required result)
(Introduce a picture of the required result)


===Task: Take a screenshot showing the percentage of price increase from the bottom of the last bear market to the present.===
Task: Take a screenshot showing the percentage of price increase from the bottom of the last bear market to the present.


(Ans: upload file)
(Ans: upload file)
Line 167: Line 376:
Introduce here the explanations of the various parts of the price action, halvings, bull runs, bear markets. (see brochure)
Introduce here the explanations of the various parts of the price action, halvings, bull runs, bear markets. (see brochure)


 
==Quest (Comparing BTC and ETH Price History)==
 
=Trading View=


Trading view has many useful functions to analyze markets. In this section we will use it to compare Bitcoin and Ethereum's price history.
Trading view has many useful functions to analyze markets. In this section we will use it to compare Bitcoin and Ethereum's price history.
Notice how Ethereum's price follows the same pattern as the Bitcoin price. When bitcoin price rises, it causes other cryptocurrencies price to rise.
Notice how Ethereum's price follows the same pattern as the Bitcoin price. When bitcoin price rises, it causes other cryptocurrencies price to rise.
This is called "alt-season". (alt-coins are all other cryptos except Bitcoin).
This is called "alt-season". (alt-coins are all other cryptos except Bitcoin).
==Quest (Comparing BTC and ETH Price History)==


1) Sign in to Trading View. You can sign in with your Google account.
1) Sign in to Trading View. You can sign in with your Google account.
Line 197: Line 402:
10) Notice that the difference in prices makes it difficult to compare the behavior of the prices. Select LOG scale
10) Notice that the difference in prices makes it difficult to compare the behavior of the prices. Select LOG scale
      
      
===Task: Take a screenshot of your chart comparing Bitcoin to Ethereum ===
Task: Take a screenshot of your chart comparing Bitcoin to Ethereum  


(Ans: Upload File)
(Ans: Upload File)
Line 212: Line 417:
Investors who know this can make significant profits with a long term view.
Investors who know this can make significant profits with a long term view.


= Summary / check point / =
== Module Summary / check point / ==


We have seen how much money is being invested in cryptocurrency, and compared to gold and the largest companies in the world.
We have seen how much money is being invested in cryptocurrency, and compared to gold and the largest companies in the world.
Line 228: Line 433:


=Bitcoin=
=Bitcoin=
Let us dive directly into the world of cryptocurrency.
Let’s go where Bitcoin started. The idea was first published on a cryptography mailing list, because the core ingredient of
cryptocurrency technology is: Public and Private Key Cryptography.


Basically you have a pair of "keys", the public and private keys, you can use the Private Key to encrypt a document or file,
Basically you have a pair of "keys", the public and private keys, you can use the Private Key to encrypt a document or file,
Line 244: Line 445:


==Quest: (Visit the Cryptography Mailing List)==
==Quest: (Visit the Cryptography Mailing List)==
Let us dive directly into the world of cryptocurrency.
Let’s go where Bitcoin started. The idea was first published on a cryptography mailing list, because the core ingredient of
cryptocurrency technology is: Public and Private Key Cryptography.


1) Visit this website:  
1) Visit this website:  
Line 252: Line 457:
the concept was presented in the Bitcoin "white paper" an article explaining the invention.
the concept was presented in the Bitcoin "white paper" an article explaining the invention.


===Task: Take a screenshot showing the introduction (Not the Abstract) of Bitcoin's white paper.===
Task: Take a screenshot showing the introduction (Not the Abstract) of Bitcoin's white paper.


(Ans: Upload File)
(Ans: Upload File)
Line 368: Line 573:
https://www.bitcoin.com/satoshi-archive/emails/cryptography/16/
https://www.bitcoin.com/satoshi-archive/emails/cryptography/16/


===Task: Take a screenshot of the email, from the line that says: Total circulation will be... Until Satoshi Nakamoto's signature===
Task: Take a screenshot of the email, from the line that says: Total circulation will be... Until Satoshi Nakamoto's signature


'''Exercise:'''
'''Exercise:'''
Line 379: Line 584:




===Task: During the first 4 years of operation, the nodes received 50 Bitcoin per block. find out what is the current bitcoin reward per block===
==Quest: find out what is the current bitcoin reward per block==


(Ans: Text)
(Ans: Text)
During the first 4 years of operation, the nodes received 50 Bitcoin per block.


'''Exercise'''
'''Exercise'''
Line 409: Line 616:




===Task: SHA 256 Reply with the hash of the number zero.===
Task: SHA 256 Reply with the hash of the number zero.


(ans: Text)
(ans: Text)
Line 452: Line 659:
Select "All" for the full range of data.  
Select "All" for the full range of data.  


===Task: Total Hash Rate: Take a screenshot of the total Hash Rate chart.===
Task: Total Hash Rate: Take a screenshot of the total Hash Rate chart.
(Ans: Upload File)
(Ans: Upload File)


Line 477: Line 684:




===Task: Cost of Production:Take a screenshot of the two charts.===
Task: Cost of Production:Take a screenshot of the two charts.


(ans: upload file)
(ans: upload file)
Line 489: Line 696:
==Summary / Check Point==
==Summary / Check Point==


===Proof of Work mining Solves Three Important Problems in Bitcoin:===
Proof of Work mining Solves Three Important Problems in Bitcoin:




Line 527: Line 734:
[https://bitnodes.io/ Node Explorer]
[https://bitnodes.io/ Node Explorer]


===Task:Take a screenshot of the nodes distribution around the world===
Task:Take a screenshot of the nodes distribution around the world
(Ans: Upload File )
(Ans: Upload File )




Task> Number of reachable nodes on Bitnodes.io
==Quest: Nodes per country==
 
Visit this website:
 
[https://newhedge.io/terminal/bitcoin/node-map Bitcoin Node Map]
 
Task: Take a screenshot showing the top 5 countries in number of nodes.
(Ans: Upload File)
 
 
== Quest Blockchain Explorer Introduction==
 
 
As we have mentioned before the blockchain is a public database, you can use a blockchain explorer to read any transaction.
We will look at some famous transactions to talk about some features of the metadata included with every transaction.
 
First mint transaction with 50 BTC or so…
 
==Quest: First Mint transaction==
 
This is the  transaction Hash of the first Mint transaction, (that is a transaction where a block was created.)
 
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
 
[https://www.blockchain.com/explorer/blocks/btc/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f First Mint Transaction]
 
Task:Take a screenshot of the transaction page and highlight the field where it says "Reward"
 
 
==Quest: First transaction between 2 persons> Satoshi to Hal Finney:==
 
This is the transaction hash of the first transaction between two persons:
 
f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16
 
[https://www.blockchain.com/explorer/transactions/btc/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 Satoshi to Hal Finney]
 
Task:Take a screenshot of the "Overview" pannel, showing the From: and To: Fields
 
'''Exercise'''
 
Notice that Satoshi sent 10 BTC to Hal Finney. However it sent 50 BTC and got 40 BTC back.


Task> Nodes per country.
This is important because Bitcoin addresses behave like "bills" or "checks" you have to transfer them all and get the change back.
At the beginning, all addresses contained amounts of BTC in multiples of 50 because all were obtained from mining.


https://newhedge.io/terminal/bitcoin/node-map


==Quest: First Bitcoin Sold==
Review the following transaction
[https://www.blockchain.com/explorer/transactions/btc/7dff938918f07619abd38e4510890396b1cef4fbeca154fb7aafba8843295ea2 First Bitcoin Sold]
Task: How many Bitcoins were sold?
(Ans: Imput Number)
==Quest: The latest Block mined==
Visit this website:
[https://www.blockchain.com/explorer Block Explorer ]
Click on the "Latest Blocks" field.
Click on the number of the top block in the list.
Task: Take a screenshot of the Bitcoin Block page where it shows the "Details" of the block.
(Ans: Upload File)
'''Exercise'''
Notice the field where it says: "Difficulty" and compare it to the difficulty, and "reward".
The reward includes the Minted BTC plus the transaction Fees paid by the transactions included in the block.


==Quest: How Secure is Bitcoin?==
==Quest: How Secure is Bitcoin?==


Visit some famous wallets:
We have seen how the network hashrate is an impediment for an attacker to make changes to the blockchain.
But let's consider the question from a practical point of view, there are many wallets with lots of Bitcoin that the community knows their public addresses,
some of them contain thousands of Bitcoins, and yet, nobody has ever been able to take the money. Let's visit one famous wallet and see it's content:


[https://bitinfocharts.com/bitcoin/address/1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF MtGox Hack Wallet]
[https://bitinfocharts.com/bitcoin/address/1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF MtGox Hack Wallet]


This is a famous wallet related to a major fraud carried by a company called MtGox in 2011.
It has 80K BTC since 2011, everybody knows the BTC are there, and yet, nobody has ever succeeded at hacking the wallet.
It has 80K BTC since 2011, everybody knows the BTC are there, and yet, nobody has ever succeeded at hacking the wallet.


Line 549: Line 825:
a bounty prize of 7 Billion dollars is very attractive.
a bounty prize of 7 Billion dollars is very attractive.


==Quest: Blockchain Explorer==
=Ethereum:=
 
The idea behind Ethereum is to use Blockchain technology to implement a Decentralized Virtual Computer. Ethereum is designed to be programmable allowing developers to create smart contracts: Self-executing agreements, and build decentralized applications (dApps) directly on its network.


Indtroduction.
Think of Bitcoin as "digital gold" and Ethereum as a decentralized computer where users and applications can transact directly with each other without the need of trusting third parties.
look for some famous transactions.
First transaction and metadata.


Look for wallet with lots of BTC and not moving.
address security in this way. It is public, everybody knows about it,
but nobody has taken the money in 15 years.


First mint transaction with 50 BTC or so…
As we have seen, Blockchain, cryptocurrency and peer to peer network are inseparable entities in cryptocurrency. Therefore Ethereum also has it's own cryptocurrency associated, called "Ether" (ETH).
Current block, a mint transaction now…
 
Ether is used as the economic incentive for network nodes to process requests from users and smart contracts running in the Ethereum Virtual Machine.
 
Ether is also used to pay for transactions and the execution of smart programs.
 
==Quest: Gas fees ==
 
Gas is the unit that measures the computational effort required to execute operations on the Ethereum network, such as sending ETH, interacting with a smart contract, or deploying a new contract.
 
Users of the EVM have to buy Gas with Ether to perform the desired operations. In this way developers can concentrate on the units of computational work and not worry about Ether's price in the markets.
 
This website shows the price of Gas in gwei. Giga Wei is the name of a unit of measurement equivalent to:  1 gwei = 0.000000001 ETH.
The important thing is to notice the fluctuations in the price of gas. Sometimes making an Ethereum transaction may be very expensive.
 
[https://etherscan.io/chart/gasprice Historical Gas price in Ether (GWei units)]
 
Task: Take a screenshot of the Historical Gas Price in Ethereum
(Ans: Upload File)
 
 
==Quest: Smart Contract==
 
We have seen that Tether is one of the top valued cryptocurrencies, and it is a digital asset running on the Ethereum network.
Tether does not have its own blockchain, it uses the Ethereum blockchain to operate.
 
Tether itself is controlled by it's smart contract. Let's use Etherscan to explore Tether's smart contract:
 
[https://etherscan.io/address/0xdac17f958d2ee523a2206206994597c13d831ec7#code Tether Smart Contract Code]
 
'''Exercise:'''
 
Observe the contract page, it has 3 main fields:
 
1) Overview: You can see the Ether Balance, and Token Holdings (digital assets other than Ether).
2) More info: Shows the contract creator and the Token Tracker Page link.
3) Multichain Info: The smart contract can exist on multiple blockchains. That information will display here. 
 
Scroll down to the Contract Source Code tab.
Click on the green "audit report" button.
Click on the Security Audit Report link.
Scroll down to Section 2.1 Owner Privileges.
 
Task: Share a screenshot of the Tether Token (USDT) Security Audit Page Section 2.1
(Ans: Upload File)
 
'''Exercise'''
 
This exercise is to remind us that a serious cryptocurrency project will have their smart contracts reviewed by experts in security.
And the Security Audits are made public.
 
In this example you can see in section 2.1 Owner's Privileges that the creators of the USDT contract can control various functions in the contract.
It is possible to make changes to the contract. The owner can "blacklist" any given address, freeze transactions, etc.
 
==Quest: Ethereum Address vs Bitcoin Address ==
 
An Ethereum address is like a bank account number. The account can hold many digital assets and interact with smart contracts.
 
Anybody with the address can see all the information related to the account, and sometimes even the name of the account owner,
for example this account from the centralized exchange Kraken:
 
[https://etherscan.io/address/0xda9dfa130df4de4673b89022ee50ff26f6ea73cf Kraken 4 Ethereum Account]
 
Task: Take a screenshot of the Kraken 4 account, showing the account details
 
'''Exercise'''
 
An Ethereum address is like a bank account number. People can see all token holdings of the account.
 
Whereas a Bitcoin address is like an envelope holding various unspent transaction outputs.
 
Bitcoin behaves like a physical object, like cash. The address is also public, anybody with the address can see the unspent transaction outputs.
Bitcoin was designed to be electronic cash. And Ethereum was designed as a virtual computer.
 
==Quest Decentralized Exchange DEX==
 
As we have seen the Ethereum blockchain can manage many digital assets, they are governed by their own smart contracts,
but transactions are handled by the Ethereum network.
 
This opens the possibility for Decentralized Markets to exist, where users can trade digital assets in a trust-less, permission-less way.
And Ethereum is only one of many blockchains that allow this type of economic activity.
 
Here you can see the Top Cryptocurrency Decentralized Exchanges:
 
[https://coinmarketcap.com/rankings/exchanges/dex/?type=spot DEX in CoinMarketCap]
 
'''Exercise'''
 
Notice that Uniswap V3 is present in many blockchains. We will explore more this example as it is one of the most used Decentralized Exchanges.
Click on Uniswap V3 Ethereum:
 
Task: Take a screenshot of the Uniswap v3 (Ethereum) page showing the: What is Uniswap? panel.
 
'''Exercise'''
 
In the What is Uniswap information panel, we read that Uniswap pioneered the Automated Market Maker model, instead of the traditional order-book-based used in exchanges.
This is a key concept for understanding how the Decentralized Markets Work, and we have to take a closer look at this.


==Quest: Decentralized Exchanges==


First transaction Hash
Decentralized exchanges (DEXs) represent a significant innovation in the cryptocurrency world, offering a way to trade assets without the need for a centralized authority. These platforms allow peer-to-peer trading directly from users' wallets, enhancing privacy and reducing the risk of theft from exchange breaches. One prominent example of a DEX is Uniswap V3
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f


https://www.blockchain.com/explorer/blocks/btc/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
[https://app.uniswap.org/swap Uniswap Swap Interface]


To implement a decentralized and automated way of trading digital assets (Tokens) in the Ethereum network (for example), Liquidity Pools are used.


First transaction between 2 persons> Satoshi to Hal Finney:
Liquidity Pools are smart contracts holding a token and Ether, so that the number of tokens has the same value (in dollars for example) as the number of Ether.


Hash ID
When a new token is added to the Decentralized Exchange, a new Liquidity Pool has to be created, by providing the Liquidity Pool contract with equal values of the token, and Ether.
f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16


https://www.blockchain.com/explorer/transactions/btc/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16
For a liquidity pool in Polygon for example, you need equal values of tokens and POL, and so on.  


First Bitcoin Sold
People providing liquidity to the decentralized markets earn some percent of the trades made.


https://www.blockchain.com/explorer/transactions/btc/7dff938918f07619abd38e4510890396b1cef4fbeca154fb7aafba8843295ea2


The latest Block mined
This site shows some of the top pools in Uniswap V3:


Observe the BTC reward. And Fees.
[https://app.uniswap.org/pool Uniswap Top Pools]


https://www.blockchain.com/explorer/blocks/btc/864924
Task: Share a screenshot showing the top 5 ETH Pools by Total Volume
(Ans: Upload File)


==Exploring an Address==
==Quest: Automated Market Making==


Look up an address that has been dormant for years, with lots of money in it.
Liquidity Pools are used to implement a decentralized, automated and trust-less markets. But they work
to discuss some features, differences from a transaction address, and the fact that nobody has moved the money,
differently than the traditional Order Book based exchanges, where people put buy and sell orders and the
even if the fact that it contains millions of dollars is public.
exchange matches the buyers with the sellers.


In a decentralized exchange a person trades with the liquidity pool, not with other person.


It is important to know that buying or selling a token in a decentralized exchange does affect the price
of the token. You get the price calculated after the impact of your purchase is taken into account.


Hashrate and price


https://newhedge.io/terminal/bitcoin/hashrate-vs-price


=Ethereum:=
Let's suppose that a liquidity pool has T amount of tokens, and E amount of Ether.


EVM


Smart contracts
The price of a token in units of Ether is the total Ether E divided by the number of tokens T:


P = E/T


Buyers take tokens and deposit Ether. Buying increases the price.


Sellers deposit tokens and take Ether from the pool. Selling decreases the price.


Gas fees


https://milkroad.com/ethereum/gas/
'''Exercise'''


https://etherscan.io/gastracker#chart_gasprice
When you buy you don't get the price listed, but a higher price calculated after you deposit your ETH and take your tokens.
And the more  you want to buy the more expensive it gets.


Similarly, when you sell, you don't get the listed price, but a smaller price calculated after you deposit your tokens and get the Ether.
And the more you sell the cheaper it gets.


EtherScan


https://etherscan.io/
Prices are determined implementing the condition that the product of the number of tokens and Ether remains constant:


DEX
T*E = k (where k is a constant)


https://coinmarketcap.com/rankings/exchanges/dex/?type=spot
This is chosen for various reasons, first of all the formula is simple and there is no need for active management.
It makes sure that the liquidity pool can never be completely drained of either asset.


Examples, explanations on Uniswap V3
Another important reason is that prices fulfilling this condition are sensitive to trade size. Larger trades have a more
significant impact on the price. This helps encouraging smaller, frequent trades, and discouraging large market moving trades.


Liquidity Pools:
=Web III=


Examples and explanations of features.
In practice, Web 3 refers to websites that can interact with blockchain data. Websites can display different content depending on the
information retrieved, or host a decentralized application where users can interact with smart contracts.


https://app.uniswap.org/swap
But the best way is to see it for yourself. We will take a guided tour of the Web III world in the next section: Test Drive.
where we will explore Seasonal Tokens, as an example of a crypto ecosystem of related smart contracts.


https://app.uniswap.org/pool
=Leftover=


Price Impact
==Quest: Private Keys and Addresses==


Try a swap and see.
In the wallet tab, click on Private keys, and then export.


Layer II
Task: Export the CSV file with your private keys.


Polygon.
'exercise'


PolygonScan
The Bitcoin wallet has a Master Private Key that can generate all the "child" private keys.
Every Bitcoin address has an associated child private key.


Compare features to Etherscan
The Bitcoin address is like the Public Key, and it has an associated Private Key.
Think of the address as a P.O box, and the private key is the only way to open it.
Anybody with your P.O box can send you bitcoin, but only the private key can transfer the BTC.


https://polygonscan.com/
If somebody has access to a private key, this person can transfer the funds on the associated address.
So keep this CSV file secret, or erase it for now.


Wrapped BTC
==Quest: Master Private Key==


https://www.kraken.com/learn/what-is-wrapped-bitcoin-wbtc
In the Electrum wallet, under the wallet tab, click on information.
Look for the field that says Master Private Key.


Wrapped tokens
The Master Private key generates all your Bitcoin addresses,
with this key, you can re generate all your child private keys,
Your wallet seed is related to this Master Private Key.


WEB III
If you have the Master key you can create another wallet and import your bitcoin addresses,
even if you lost the 12 words of the wallet seed.


=Test Drive=
And if anybody has access to the Master key, this person has access to all your Bitcoin.


Metamask


Website Integration
Under the "view" tab, click on "console". This will open the console.
type the following command: getmasterprivate()


Ethereum / Polygon Chains (Explorers Transactions)
It will ask you for your password.


Token smart contracts.
Task: share a screenshot of the console window where it is asking for your password. Do not share a screenshot where your Master Private Key is displayed!!!


Now enter your password.


Mint transactions.
The master private key is revealed.This can re generate all bitcoin addresses in any wallet using the BIP32 standard.
Because there are more than one way of encoding the private keys.


Mining Pool
To close the console click on the view tab again and de-select console.


GPU
'exercise'


BlackMiners
The Master Private Key serves as the root key from which all child keys and Bitcoin addresses are derived. Its primary uses include wallet recovery, deriving private keys, exporting to other wallets, and advanced wallet features. Always keep it secure and backed up.


Swaps
==Quest: Master Public Key==


Uniswap liquidity pools
Under the wallet tab, click on Information.
Notice the Master Public Key field.


Token Pair Contracts
The Master Public Key can be used to derive all child public keys and Bitcoin addresses in your wallet. This has multiple uses, for example: You can provide the Master Public Key to an e-commerce platform or accounting software to automatically generate addresses for customer payments.


Price trackers


Buy Sell
The Master Public Key cannot spend funds, so sharing it does not expose your Bitcoin. However, it does reveal all wallet addresses and transaction history derived from it. This can compromise privacy:


Farming
Anyone with the Master Public Key can see your entire transaction history and all derived addresses.
Avoid sharing it publicly unless necessary.


Creating a farm position NFT
You can find the Public Keys associated to your bitcoin addresses in the "view" tab, under addresses.
Click on addresses and then right click on the bitcoin address you want to see the public key.


Polygon Bridge
Task: share a screenshot of the address window after you right click on details.


Ways to make money with S.T
'exercise'


Trading Simulator Trade tokens for more tokens
Revealing a a child public key does not compromises your security. But people with the public key can see all the activity associated with the associated address.


Investors Club
but you can use public and private keys to digitally sign or encrypt/decrypt messages. We will have some fun with this later on.

Latest revision as of 02:48, 20 December 2024

Bitcoin in Practice

Before we go into the details of Bitcoin technology, let's see how it works. The same way you don't need to understand electronics to use a phone, using bitcoin is very easy even if you don't know anything about it.

However, knowing the basic fundamental principles will allow you to understand Bitcoin's price in the markets. And this is what will make you money in the long term.

So let's check how to use Bitcoin in your daily life. You connect to the network with a special software called "wallet" there are many wallets but we will use as an example Electrum wallet which you can install for free in your computer or phone.

Then you need to get some Bitcoin, and for that you have to buy it in a special market, called "Exchange". Let's have a closer look at these issues:


Quest: Install Electrum

Visit https://electrum.org/

And download and install the Electrum wallet

For Android: https://play.google.com/store/apps/details?id=org.electrum.electrum&pli=1

Under the Wallet tab, click on seed to reveal your wallet seed, The wallet seed is all you ever have, you don't even have Bitcoins, only the keys to move them from one address to another in the blockchain.

If you lose the wallet seed, you lose everything.

Task:

Copy the 12 words in the correct order on paper. Keep this physical copy where you won't forget it.

Quest: Receive Bitcoin

To receive Bitcoin you have to provide the sender with one of your Bitcoin addresses. The sender will use your address in the "send" tab of a wallet, and click send. When the transaction is processed by the network it will appear in your wallet.

You can see some of your addresses in the Addresses tab. You can generate as many addresses as you want. In Bitcoin it is a security practice to use a new address for every transaction, because if somebody knows the address they can see all transactions happening with that address.

Even though the bitcoin addresses are public, and they can be seen in the blockchain by anybody, as long as nobody knows that the address is yours there is no way to make the connection between the address and the owner.

There are more sophisticated ways to send a payment request. Click on the "Receive" tab in the wallet. You can send a payment request with a description, the requested amount and the "expiry" time. This time is how long the address will be reserved for this transaction only. After that time the address can be used for other transactions. But Bitcoin addresses never expire.

Task: Create a payment request, add a description, a requested amount and select expiry time. Copy the Bitcoin URI by clicking on the "Bitcoin URI" window (Uniform Resource Identifier). You will use this to complete the task. and for the next quest.


Quest: Send Bitcoin

Sending Bitcoin is also very easy, you get the Bitcoin address of the person you want to send funds to, and paste it in the "Pay to" field in your wallet.

If you have a Bitcoin URI you can paste that in the "Pay to" field and the wallet will fill in the details of the transaction, to see how it will appear to a person if you send them the URI. If you have the Bitcoin in your wallet, by clicking the Pay... button you would send it to yourself, and pay a fee for the transaction.

When you hit the Pay... button (if you have funds for the transaction) a window appears where you can set the fees to pay.

The network receives new transactions and stores in a memory pool (mempool) of unprocessed transactions, the ones paying higher fees get first in the next block. The blocks have a limited space for transactions, if there is space in the block even the transactions with no fees attached can get in the block, but when the network is busy your transaction can get stuck and take forever to be processed.

For this reason Electrum estimates the fees according to how fast you want your transaction to be processed. Fees are proportional to the amount of data in the transaction, not to the amount of Bitcoin sent.

Task: Paste the URI you generated in the previous quest and share a screenshot of your "send" tab in the wallet.

'Exercise:'

After you hit the Pay... button, the request is sent to the Bitcoin network. When it gets processed you receive a confirmation message. You can see the status of your transactions in the block chain. We will see this in another quest.

When you hit the Pay button the bitcoin sent is no longer displayed in the wallet to avoid confusion. But you have the Bitcoin until the transaction is processed.

If the transaction is not processed because of low fees, it can stay for long time in the mempool, but your Bitcoins aren't going anywhere until the transaction is processed.

Sometimes when this happens you can send another transaction with higher fees, and it gets trough before the old transaction.

When the old transaction is considered, it fails because the transaction with more fees was processed first.


Quest: Top Cryptocurrency Exchanges:

So how to get Bitcoin? Either you have somebody to send it over to you, or you have to buy it in a Centralized Exchange. In order to access one of these exchanges you have to do a Know your Customer process to verify your identity, after that you can buy Bitcoin using a credit card, or bank transfer.

Visit this site:

https://coinmarketcap.com/rankings/exchanges/

Task: share a screenshot showing the top 10 centralized exchanges.

'Exercise'

How many exchanges are listed in Coinmarketcap?

CMC Liquidity score 0 to 1000 Quest: CEX, credit card, examples. KYC

Bitcoin and Cryptography

Cryptography

Crypto currency is a technology based on cryptography. It will be very useful to know a few basic concepts to understand the language used in crypto.

The oldest use of cryptography is to send messages from one person to another but written in such a way that only the sender and the receiver can understand the message.

For this system to work, the sender and the receiver have to agree on a “key” to substitute the letters of the message for other set of symbols that only they know.

The sender takes the original message and applies the rules given by the “key” to convert the original message into an unintelligible message. The sender “encrypts” the message with the key.

This message can be delivered to the other person and it does not matter if others can read it, because without the “key” they can’t decipher the message.

When the receiver gets the message, he can convert it back to the original form using the same “key” that is known only for the sender and the receiver.

This is widely used in telecommunications to make sure that the information remains private even if it is being broadcaster trough a public network.

This type of cryptography requires that the sender and receiver have to agree and share the key before sending messages.

Cryptocurrency uses a different kind of cryptography that does not require the sender and the receiver to agree before sending messages.


Public and Private Key Cryptography.

Public Key cryptography involves a pair of keys:

A) A Private Key, which is supposed to be secret.

B) a Public Key, which can be shared openly.

  • Information encrypted with the Public Key can only be decrypted with the corresponding Private Key.
  • Information encrypted with the Private Key can only be decrypted with the corresponding Public Key.

And for creating digital signatures.

Relation to Bitcoin:

In Bitcoin, your Private Key is associated with your wallet seed, The Private Key can create many associated Public Keys associated to your "Bitcoin Addresses".


Quest: Digital Signatures

Example:

Alice wants to prove that a particular Bitcoin address belongs to her. So she signs a message with the Private Key associated with the address.


Anybody with the message the bitcoin address and the digital signature can verify that the address belongs to her. Only the owner of the Private Key associated with the bitcoin address can create the digital signature. Even the smallest change in the message spoils the signature.


Verify the digital signature provided below.


Go to the Sign/Verify window under Tools in the Electrum wallet.

Paste the following information in the corresponding fields.


Message:

message


Bitcoin Address:


bc1q6fyqcyyhkn8cy76acnf385hunpfarfxr2p8jxu


Signature:


H0DBXVTGOZAzmgy/c2d1NB/Kl+vijA2ISoJFWwZoGcXWCz6687a6+fsY8B2j0+T6TEjGZ+AAG/71MFobEP2LIh4=


Click on Verify.


Only the owner of the private key associated with the Bitcoin address can create the digital signature.

Try changing anything and the signature stops working.


Task: Verify the digital signature and send a screenshot of the verification message.

Task: Make a small change in the original message and try verifying again the signature. Share a screenshot of the (failed) verification message.


Quest: Encrypt / Decrypt a message

Example:

  • Bob wants to receive a secret message from Alice,
  • Bob send’s Alice his Bob’s Public Key.
  • Alice will use Bob’s Public Key to encrypt the message.
  • The message can be sent trough a public channel and be visible to all, but only Bob can decrypt it using Bob’s Private Key.


Bob can reply to Alice as well: If Alice can decrypt the message with Bob’s Public Key, then she knows the message was created by somebody who has Bob’s Private key. That is why it has to be really private: To make sure the message is from Bob if it was decrypted with Bob's Public key.

This method has the advantage that two unknown persons can send encrypted messages to each other by sharing their Public Keys. Public and Private Pairs of keys are the heart of cryptocurrency technology, they match each other like lock and key. Let’s illustrate how it works in Bitcoin.

Quest: Decrypt message

Bob will send you an encrypted message.

First he will share with you his public key:

03e5ab3177320108be0ebafa44a23fc199b0e07fa81dcf35711d923d6da298e950

After that, he can send you encrypted messages over a public channel and only you can decrypt them.

Here is Bob's encrypted message:

QklFMQLVRrf24UKTrlarxhO7+M7iFVTFpwhbUYrdhA0roM8XBU/Iz/XAVM2ELypA73vp626kaWj9BYphZnA/ysmzS2Fq6lU6P/3C5oLDKkfg6WjHJbPAal/8W4V3Zkrlkn0FpLg=

Task: Use the encrypt/decrypt tool in Electrum's wallet to decrypt this message. Share a screenshot of the decrypted message. Input the Encrypted message and the Public key and hit "decrypt".

Exercise:

To create the above example, we navigated to the Encrypt/Decrypt tab under "tools" in the Electrum wallet.

then typed the message. Input the Public Key that will be used to decrypt the message.

And click on Encrypt to create the encrypted message above.

Crypto Market Cap:

The Market Cap of a cryptocurrency is the amount of currency in the market multiplied by it's price in the market.


Quest: (Crypto Market Cap)

1) Visit the following website:

Coingecko Global Charts

2) Find the Total Crypto Market Cap Chart.

Make sure to select the full range of the chart.

(insert image of total crypto market cap here with notes for legibility)

In the graph you can see that Coingecko has collected the information of 15239 different cryptocurrencies, sold across 1154 markets around the world. And the chart represents the sum of all market cap of those 15239 cryptocurrencies.

Task: What is the total crypto market cap?

(Ans: Text) Write down this value, we will use it in the next task.

Notice:

Notice that at the time of this writing the total market cap is about 3 Trillion dollars. A trillion is 10^12. A billion is 1000 Millions and a Trillion is 1000 Billions.

Quest: (Gold Market Cap)

Golds market cap is the price of gold per ounce multiplied by the amount of gold stored in the worlds reserves.

1) Visit this website:

Gold Market Cap

Task: What is the Gold Market Cap?

(Ans: Text)

Exercise:

Compare the Gold Market Cap to the Total Crypto Market Cap. At the time of this writing Gold's market cap is around 17 Trillions. Therefore the Total Crypto Market Cap is over 17% of Gold's Market Cap, showing how important is this class of digital assets.

Quest: (Companies Market Cap)

The market cap of a company is the number of shares multiplied by the price of each share.

1) Visit this website:

Largest Companies by Market Cap


Task: What is the most valued company by Market Cap?

(Ans: text)

Exercise

Compare the Total Crypto Market Cap to the top valued companies in the world.

Notice that the most valued companies are related to computers. Cryptocurrency is a computer technology and it has achieved the same size as the largest companies in the world.


Quest: (BTC Dominance Chart)

Bitcoin is the major contributor to the Total Crypto Market Cap

Find the top 3 Cryptocurrencies by market cap.

1) Visit the following website:

Coingecko Global Charts

2) Find the Bitcoin Dominance Chart. Hover your mouse over the chart to display the top ten cryptocurrencies contributing to the Total Crypto Market Cap.

Task: What is the percentage of Bitcoin Market Cap. (Percent of the Total Crypto Market Cap)?

Bitcoin Price History

Bitcoin was released to public in 2009, but until 2000x didn't even have a price! This is the most important lesson in Cryptocurrency. Pay attention. There is a recurring pattern in Bitcoins price history. Every four years on average there is a bull run that brings Bitcoin's price to an all time high value. We will see why this happens in the next sections.

Quest: (View all Price History)

1) Visit this website:

Bitcoin Price History

(Insert image of btc price)

Select "MAX" as the range of data displayed.

Select Logarithmic scale in the price chart.

Task: Take a screenshot of the graph in logarithmic scale.

(Ans: Upload File)

Exercise:

Using a logarithmic scale on a data chart helps to manage large ranges of values by compressing the scale of higher values more than lower ones. This makes it easier to see patterns and compare data points across a wide range of magnitudes, highlighting trends that might be missed on a linear scale.

For example see the beginning of the BTC price chart, this large change in price was not visible compared to the larger more recent price spikes. And when you select log scale these price spikes are more visible.

Quest (Analyzing the Bitcoin Price History Chart)

1) In this exercise we will use TradingView:

TradingView Bitcoin Price Chart

Using the ruler icon in the left hand side of the chart, we will measure the height of the last Bitcoin price spike from the bottom of the bear market That happened around November 2022. Click and drag the mouse from the bottom of the chart to the peak, as shown in the picture.

(Introduce a picture of the required result)

Task: Take a screenshot showing the percentage of price increase from the bottom of the last bear market to the present.

(Ans: upload file)

Exercise:

Introduce here the explanations of the various parts of the price action, halvings, bull runs, bear markets. (see brochure)

Quest (Comparing BTC and ETH Price History)

Trading view has many useful functions to analyze markets. In this section we will use it to compare Bitcoin and Ethereum's price history. Notice how Ethereum's price follows the same pattern as the Bitcoin price. When bitcoin price rises, it causes other cryptocurrencies price to rise. This is called "alt-season". (alt-coins are all other cryptos except Bitcoin).

1) Sign in to Trading View. You can sign in with your Google account.

2) From the "Markets" tab select: Crypto.And From Crypto select Large Cap.

3) Right click on BTC and select: Add CRYPTO:BTCUSD to Watchlist > Select Watchlist or create a new list.

4) Right click on ETH and select: Add CRYPTO:ETHUSD to Watchlist > Select Watchlist or create a new list.

5) On the right hand side column you see your Watchlist. Select BTC to display Bitcoin's price chart.

6) Select Full Chart

7) Click on the Compare Button

8) Select ETHUSD notice that there are various markets available to see the price history. Choose the first one.

9) On the Gear icon at the bottom right select regular, not percent.

10) Notice that the difference in prices makes it difficult to compare the behavior of the prices. Select LOG scale

Task: Take a screenshot of your chart comparing Bitcoin to Ethereum

(Ans: Upload File)

Exercise

Notice how it was not easy to see the similarities in the regular chart. Changing the scale to a logarithmic scale made it possible to see that the Ethereum price chart looks very similar to Bitcoin's.

This is very important because we know that all other cryptos follow Bitcoin's behavior. And Bitcoin price action has a periodic behavior. Every 4 years there is a bull market leading to all time highs in prices, and then a bear market follows that can last up to 3 years.

Investors who know this can make significant profits with a long term view.

Module Summary / check point /

We have seen how much money is being invested in cryptocurrency, and compared to gold and the largest companies in the world. We observe that Bitcoin and Ethereum are the dominant cryptocurrencies.


Ethereum's price history follows closely the movements of Bitcoin. Other cryptocurrencies experience a similar behavior. this is called an "alt-season".


We saw that there is a periodic behavior in Bitcoin price history. This is the KEY observation in cryptocurrency.

Now, in order to understand the origins of this periodic behavior we have to learn more about Bitcoin. In the following section we will take a closer look at Bitcoin and discover what causes these price oscillations.

Bitcoin

Basically you have a pair of "keys", the public and private keys, you can use the Private Key to encrypt a document or file, it is converted into an unintelligible bunch of symbols, and only a person with the associated Public Key can convert back to its original form.

This is used to send information over public channels but only the receiver (who has your public key) can decipher. But another very important use of this is that you can use the Private Key to create a "Digital Signature" that can be added to a document or file. Whoever has the associated public key can verify that the document or file was signed by the owner of the Private Key.

In the next sections you will see how Digital Signatures are at the hearth of Cryptocurrency Technology.

Quest: (Visit the Cryptography Mailing List)

Let us dive directly into the world of cryptocurrency. Let’s go where Bitcoin started. The idea was first published on a cryptography mailing list, because the core ingredient of cryptocurrency technology is: Public and Private Key Cryptography.

1) Visit this website:

Bitcoin is first presented

This is the email where the mysterious author Satoshi Nakamoto announced the creation of Bitcoin. the concept was presented in the Bitcoin "white paper" an article explaining the invention.

Task: Take a screenshot showing the introduction (Not the Abstract) of Bitcoin's white paper.

(Ans: Upload File)

Exercise:

The most important function of cryptocurrency is described in the introduction of the Bitcoin article: What is needed is an electronic payment system based on cryptographic proof instead of trust. Allowing any two willing parties to transact directly with each other without the need of a trusted third party.

Most of the money used today is digital money, only few percent of the total money supply exists in physical form. The majority of transactions are made digitally, and they are processed, verified and approved by financial institutions banks and credit card companies.

In bitcoin the transactions are processed by a peer to peer computer network. Peer to Peer means that all computers in the network are on equal footing, there are no special nodes in the network, any network node can join or leave the network at any time. All they need to be part of the network is to use the same communication protocol implemented by a piece of software called Bitcoin client.

In other words, Bitcoin eliminates the need to trust third parties, governments, banks, institutions, companies, individuals. Instead it relies on Cryptography.

Bitcoin changes the monetary system and removes the need to trust people, and replaces this with the trust in Mathematics. Instead of trusting the human made laws, it puts the foundations of the monetary system in the laws of nature, and pure mathematics.

Quest: Reading the Abstract in Bitcoin's White Paper

For the related tasks: Find websites with explanations to broaden the resources for further reading. Ask for a specific word in a given paragraph. (to make sure people visited the sites).

Abstract.

A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without the burdens of going through a financial institution.

The important idea here is that Bitcoin, and cryptocurrency in general, is a form of Cash. With cash you give it directly to another person, no need of an intermediary to validate the transaction. The coins and bills are supposed to have all proofs that they are real.

This is easy to do in the physical world, but in the digital world of electronic communications it was not easy to do, many attempts were made but Bitcoin was the first system that successfully eliminated the need to trust a third party to validate the transactions.


Digital signatures provide part of the solution, but the main benefits are lost if a trusted party is still required to prevent double-spending.

A Digital Signature is the proof that a document was signed by the owner of the Private Key. Therefore you can create a document saying that you transfer the property of some Bitcoin to another person, and sign it with your Private Key. This is the definitive proof that you are the author of the document, and that you agree to transfer the property to another person.

This is better than a legal document because Cryptography makes sure that only you, (the owner of the Private Key) can sign the document. no need for a lawyer to testify that the document was signed by you.

But the problem remains that you could create two (or more) documents saying that you transfer the property to another person. Both documents will have your Digital Signature, and so they are valid from this point of view.

This problem is called "Double Spending", and to solve it it requires that all transactions have to be registered on a database, to make sure that nobody makes fraud in this way.

By the way, this is the only "viable" form of fraud that could be achieved in Bitcoin, Cryptography makes sure that it is impossible to find a Private Key from a Public Key.


We propose a solution to the double-spending problem using a peer-to-peer network.

Older versions of Digital Cash still needed a central server or computer to store and validate all transactions to avoid double spending. But Bitcoin solved the problem by storing and validating transactions using a peer to peer network.

Peer to Peer means that all computers connected to the network (network nodes) are on equal footing. All network nodes keep a copy of the database of all transactions. This database is called the Block Chain by the way it stores the transactions in blocks.


The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work.

Here we find one key concept in cryptocurrency: Hash Function. This is a cryptographic mathematical function that can take any information and apply a mathematical procedure to obtain a string of characters. The string is always of the same length, no matter the size of the input. The important thing is that every Hash is unique, there is no way that two different inputs can produce the same Hash. And even a minimal change in one file produces a completely different Hash. And knowing the Hash it is impossible to find out the input that produced it, except by trial and error. But it is so extremely difficult that it will take billions of years to find it by trial and error.

This is very important, because even if only one bit of information changes in the blockchain, the Hash is completely different, and so it is very easy to see that the database is corrupted.

Another key concept here is the Proof of Work. This is another technology used in computer networks to protect them from being abused by malicious actors. An example is very useful to understand this concept. Proof of Work is used in email software to prevent SPAM, every email that you will send requires the computer to perform a computational task that takes some time and energy to solve. This is not a problem if you are sending few emails, but if you want to send thousands, then the time and energy that it will take becomes a significant burden on the computer.

In Bitcoin, every block of the database requires a significant amount of time and energy to produce. If somebody wants to make a change in the database at some previous block, it has to produce a new blockchain and repeat all the proof of work, and produce a blockchain that is longer than the "real" or "honest" blockchain. It will need more computational power than the rest of the network.


The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.

Bitcoin nodes accept the longest chain as the "true" blockchain. If any malicious actor wants to make a change in the database, it has to re-do all the proof of work and surpass the "honest" block chain.| But because the proof of work requires time and energy, this attacker will need to have more computing power than the rest of the network combined. This is called a 51% attack, the idea being that if somebody has more than 50% of the computing power, it could create another blockchain.


As long as honest nodes control the most CPU power on the network, they can generate the longest chain and outpace any attackers.

A 51% attack has never happened in Bitcoin, and even if it was possible, the only thing that the attacker can do is to double spend Bitcoin. If anybody has that much computing power, it can make more money by supporting the network than by trying to make fraud. And this is an additional economic barrier for the possibility of fraud.

The network itself requires minimal structure. Messages are broadcasted on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.

None of the network nodes is special in any way, they can join or leave the network without affecting the performance. Anybody with the right hardware and software can join the network. When a node joins the network it takes the longest proof of work chain as the valid chain.

This means that anybody can see the record of all transactions. The blockchain is a public database, all transactions are visible. However, even if all public addresses are visible, it is not possible to associate those addresses to a specific person. Privacy can be maintained as long as users don't reveal their association to a particular address.

This is very useful for transparency and accounting, since an entity can reveal their connection to a public address so that anybody can see the movements in the address, this is particularly useful for non-profit organizations who want to make public and transparent their operations, and it would be amazing if governments and other public entities had their business open to people's scrutiny.

Quest: Bitcoin Client Released

1) Read the email where the Bitcoin client was released:

https://www.bitcoin.com/satoshi-archive/emails/cryptography/16/

Task: Take a screenshot of the email, from the line that says: Total circulation will be... Until Satoshi Nakamoto's signature

Exercise:

The total number of Bitcoins will be 21 million. They are distributed to the Bitcoin network nodes when they add blocks (transactions are processed in blocks) with the amount cut in half every 4 years.

The network nodes receive Bitcoin as economic incentive to process transactions and keep the database. It is anticipated that when the rewards are not enough to pay for the operation of network nodes, the system will live out of transaction fees established by open market competition, possibly with some nodes willing to process transactions for free.


Quest: find out what is the current bitcoin reward per block

(Ans: Text)

During the first 4 years of operation, the nodes received 50 Bitcoin per block.

Exercise

Every four years the reward is cut in half. This effectively doubles the cost of production overnight, leaving many miners out of business. This new scarcity puts an upward pressure on Bitcoin's price, and it is the cause of the periodic behavior in Bitcoin's price history. Go back to the log price history chart.

Quest: Bitcoin Mining

In the abstract of the Bitcoin white paper we read about Hash Functions and Proof of Work:

The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work.

Now we will see how these things fit in the concept of Bitcoin Mining.

A hash function takes an input of any length and outputs a string of characters of finite length. For example Bitcoin uses a hash function called SHA 256 that converts anything into a string of 64 characters


Visit the following website:

Hash Calculator

You can convert any text into a 64 characters long "hash".


Task: SHA 256 Reply with the hash of the number zero.

(ans: Text)

Exercise:

SHA 256 is used in various places in Bitcoin:

1) To create bitcoin public addresses from the Private Key. Notice the similarity of the output of SHA 256 to a bitcoin address.

2) For checking the integrity of the blockchain.

3) In the proof of work required to create new blocks.


Proof of Work and Mining:

All network nodes agree in the state of the blockchain up to the latest block of transactions, and all are working in creating the next block.

The proof of work consists on the following:

The nodes receive new transactions, add them to a new block under construction, add a random number called "nonce", and then take the SHA 256 hash of the potential new block.

If the hash of the block starts with certain number of zeroes, then the block is completed, and the node broadcast the new block to the rest of the network.

The network will check that the hash satisfies all conditions for a new block and add it to the blockchain, and start working on a new block with the transactions that are not included yet on any block.

The process of creating new blocks in this way is called "Mining". And the amount of zeroes required for the proof of work to be accepted is called the difficulty.

The difficulty is adjusted automatically trying to keep the time between new blocks close to ten minutes.

The amount of hashes that the network is performing to find a hash with the required number of zeroes is called the "Hashrate" of the network, and it is a measure of the computational power involved in the process of mining new blocs.

Quest: Total Hash Rate

Visit this website:

Total Hash Rate

Select "All" for the full range of data.

Task: Total Hash Rate: Take a screenshot of the total Hash Rate chart. (Ans: Upload File)

Exercise:

At the time of this writing the Bitcoin network hashrate is close to 800 Million Tera Hashes per second...(!!!) A Million Teras is called "Exa". (deca, hecto, kilo, mega, giga, peta, exa...)

So the hashrate is close to 800 Exa Hashes per second, that is 10 to the power of 18. This is a measure of how difficult it is to solve the proof of work. Therefore, to find one solution to the proof of work is a trial and error process, and takes lots of energy and resources.

In this way, Bitcoin is like a commodity, that has a real cost of production. It is directly connected to an economic reality, and it is not subject to speculation. the price however can be subject to speculation.


Quest: Proof of Work and cost of production

Visit the following website:

Bitcoin Production Cost

Notice there are two charts: One shows the Bitcoin Average Mining Cost and the Bitcoin price. The other chart shows the ratio: Bitcoin Average Mining Cost / Bitcoin Price.


Task: Cost of Production:Take a screenshot of the two charts.

(ans: upload file)

Exercise

In the second chart displaying the ratio: Bitcoin Average Mining Cost / Bitcoin Price, notice that when Bitcoin price equals the cost of production the ratio is one.

Therefore: When the line is below one, miners are making money if they sell at that price, and when the line is above one, miners are loosing money if they sell at that price.

Summary / Check Point

Proof of Work mining Solves Three Important Problems in Bitcoin:


1) It is a fair way to distribute the cryptocurrency among market participants. In this way there is no need of a trusted mint, or central bank issuing the currency.

2) It rewards the nodes contributing to the functioning of the network.

3) By using energy in the process it creates a physical barrier for attackers who might want to orchestrate a 51% attack on the network.

Proof of work effectively converts energy into currency. If the system relies on human laws, good will, altruism, or any other form of agreement, it would be less secure.


The Bitcoin reward per new block is cut in half every 4 years, this effectively doubles the cost of production overnight causing a sudden scarcity in the system. This eventually drives the price up leading to a bull market. Price speculation takes it further to all time heights and eventually everything resolves into a price bubble that explodes leading to a long bear market.

Go back to the log price history chart and review the halving dates.

The Block Chain

We have seen that the major technical breakthrough in Bitcoin is to eliminate the need to trust a third party to make a transaction. Most of the Fiat money used today is electronic, the difference with cryptocurrency technology is that Fiat transactions are processed by financial institutions, banks and credit card companies, whereas cryptocurrency transactions are processed by a Peer to Peer computer network.

The record of all transactions is stored in a public database called the Block Chain, because new transactions are stored in blocks produced every 10 minutes on average.

Every computer in the network stores a copy of the Block Chain, and it is receiving the new transactions made since the last block was added to the block chain.

Quest: Peer to Peer Computer Network

In a peer to peer computer network, all nodes are on equal footing, all run the "Bitcoin client" software that allows computers to communicate with each other.

Quest: Node Explorer

Visit this website:

Node Explorer

Task:Take a screenshot of the nodes distribution around the world (Ans: Upload File )


Quest: Nodes per country

Visit this website:

Bitcoin Node Map

Task: Take a screenshot showing the top 5 countries in number of nodes. (Ans: Upload File)


Quest Blockchain Explorer Introduction

As we have mentioned before the blockchain is a public database, you can use a blockchain explorer to read any transaction. We will look at some famous transactions to talk about some features of the metadata included with every transaction.

First mint transaction with 50 BTC or so…

Quest: First Mint transaction

This is the transaction Hash of the first Mint transaction, (that is a transaction where a block was created.)

000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

First Mint Transaction

Task:Take a screenshot of the transaction page and highlight the field where it says "Reward"


Quest: First transaction between 2 persons> Satoshi to Hal Finney:

This is the transaction hash of the first transaction between two persons:

f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16

Satoshi to Hal Finney

Task:Take a screenshot of the "Overview" pannel, showing the From: and To: Fields

Exercise

Notice that Satoshi sent 10 BTC to Hal Finney. However it sent 50 BTC and got 40 BTC back.

This is important because Bitcoin addresses behave like "bills" or "checks" you have to transfer them all and get the change back. At the beginning, all addresses contained amounts of BTC in multiples of 50 because all were obtained from mining.


Quest: First Bitcoin Sold

Review the following transaction

First Bitcoin Sold

Task: How many Bitcoins were sold? (Ans: Imput Number)

Quest: The latest Block mined

Visit this website:

Block Explorer

Click on the "Latest Blocks" field. Click on the number of the top block in the list.

Task: Take a screenshot of the Bitcoin Block page where it shows the "Details" of the block. (Ans: Upload File)

Exercise

Notice the field where it says: "Difficulty" and compare it to the difficulty, and "reward". The reward includes the Minted BTC plus the transaction Fees paid by the transactions included in the block.

Quest: How Secure is Bitcoin?

We have seen how the network hashrate is an impediment for an attacker to make changes to the blockchain. But let's consider the question from a practical point of view, there are many wallets with lots of Bitcoin that the community knows their public addresses, some of them contain thousands of Bitcoins, and yet, nobody has ever been able to take the money. Let's visit one famous wallet and see it's content:

MtGox Hack Wallet

This is a famous wallet related to a major fraud carried by a company called MtGox in 2011. It has 80K BTC since 2011, everybody knows the BTC are there, and yet, nobody has ever succeeded at hacking the wallet.

This is how secure a Bitcoin address is, even if everybody knows the public address, nobody can get the funds. And be sure that a bounty prize of 7 Billion dollars is very attractive.

Ethereum:

The idea behind Ethereum is to use Blockchain technology to implement a Decentralized Virtual Computer. Ethereum is designed to be programmable allowing developers to create smart contracts: Self-executing agreements, and build decentralized applications (dApps) directly on its network.

Think of Bitcoin as "digital gold" and Ethereum as a decentralized computer where users and applications can transact directly with each other without the need of trusting third parties.


As we have seen, Blockchain, cryptocurrency and peer to peer network are inseparable entities in cryptocurrency. Therefore Ethereum also has it's own cryptocurrency associated, called "Ether" (ETH).

Ether is used as the economic incentive for network nodes to process requests from users and smart contracts running in the Ethereum Virtual Machine.

Ether is also used to pay for transactions and the execution of smart programs.

Quest: Gas fees

Gas is the unit that measures the computational effort required to execute operations on the Ethereum network, such as sending ETH, interacting with a smart contract, or deploying a new contract.

Users of the EVM have to buy Gas with Ether to perform the desired operations. In this way developers can concentrate on the units of computational work and not worry about Ether's price in the markets.

This website shows the price of Gas in gwei. Giga Wei is the name of a unit of measurement equivalent to: 1 gwei = 0.000000001 ETH. The important thing is to notice the fluctuations in the price of gas. Sometimes making an Ethereum transaction may be very expensive.

Historical Gas price in Ether (GWei units)

Task: Take a screenshot of the Historical Gas Price in Ethereum (Ans: Upload File)


Quest: Smart Contract

We have seen that Tether is one of the top valued cryptocurrencies, and it is a digital asset running on the Ethereum network. Tether does not have its own blockchain, it uses the Ethereum blockchain to operate.

Tether itself is controlled by it's smart contract. Let's use Etherscan to explore Tether's smart contract:

Tether Smart Contract Code

Exercise:

Observe the contract page, it has 3 main fields:

1) Overview: You can see the Ether Balance, and Token Holdings (digital assets other than Ether). 2) More info: Shows the contract creator and the Token Tracker Page link. 3) Multichain Info: The smart contract can exist on multiple blockchains. That information will display here.

Scroll down to the Contract Source Code tab. Click on the green "audit report" button. Click on the Security Audit Report link. Scroll down to Section 2.1 Owner Privileges.

Task: Share a screenshot of the Tether Token (USDT) Security Audit Page Section 2.1 (Ans: Upload File)

Exercise

This exercise is to remind us that a serious cryptocurrency project will have their smart contracts reviewed by experts in security. And the Security Audits are made public.

In this example you can see in section 2.1 Owner's Privileges that the creators of the USDT contract can control various functions in the contract. It is possible to make changes to the contract. The owner can "blacklist" any given address, freeze transactions, etc.

Quest: Ethereum Address vs Bitcoin Address

An Ethereum address is like a bank account number. The account can hold many digital assets and interact with smart contracts.

Anybody with the address can see all the information related to the account, and sometimes even the name of the account owner, for example this account from the centralized exchange Kraken:

Kraken 4 Ethereum Account

Task: Take a screenshot of the Kraken 4 account, showing the account details

Exercise

An Ethereum address is like a bank account number. People can see all token holdings of the account.

Whereas a Bitcoin address is like an envelope holding various unspent transaction outputs.

Bitcoin behaves like a physical object, like cash. The address is also public, anybody with the address can see the unspent transaction outputs. Bitcoin was designed to be electronic cash. And Ethereum was designed as a virtual computer.

Quest Decentralized Exchange DEX

As we have seen the Ethereum blockchain can manage many digital assets, they are governed by their own smart contracts, but transactions are handled by the Ethereum network.

This opens the possibility for Decentralized Markets to exist, where users can trade digital assets in a trust-less, permission-less way. And Ethereum is only one of many blockchains that allow this type of economic activity.

Here you can see the Top Cryptocurrency Decentralized Exchanges:

DEX in CoinMarketCap

Exercise

Notice that Uniswap V3 is present in many blockchains. We will explore more this example as it is one of the most used Decentralized Exchanges. Click on Uniswap V3 Ethereum:

Task: Take a screenshot of the Uniswap v3 (Ethereum) page showing the: What is Uniswap? panel.

Exercise

In the What is Uniswap information panel, we read that Uniswap pioneered the Automated Market Maker model, instead of the traditional order-book-based used in exchanges. This is a key concept for understanding how the Decentralized Markets Work, and we have to take a closer look at this.

Quest: Decentralized Exchanges

Decentralized exchanges (DEXs) represent a significant innovation in the cryptocurrency world, offering a way to trade assets without the need for a centralized authority. These platforms allow peer-to-peer trading directly from users' wallets, enhancing privacy and reducing the risk of theft from exchange breaches. One prominent example of a DEX is Uniswap V3

Uniswap Swap Interface

To implement a decentralized and automated way of trading digital assets (Tokens) in the Ethereum network (for example), Liquidity Pools are used.

Liquidity Pools are smart contracts holding a token and Ether, so that the number of tokens has the same value (in dollars for example) as the number of Ether.

When a new token is added to the Decentralized Exchange, a new Liquidity Pool has to be created, by providing the Liquidity Pool contract with equal values of the token, and Ether.

For a liquidity pool in Polygon for example, you need equal values of tokens and POL, and so on.

People providing liquidity to the decentralized markets earn some percent of the trades made.


This site shows some of the top pools in Uniswap V3:

Uniswap Top Pools

Task: Share a screenshot showing the top 5 ETH Pools by Total Volume (Ans: Upload File)

Quest: Automated Market Making

Liquidity Pools are used to implement a decentralized, automated and trust-less markets. But they work differently than the traditional Order Book based exchanges, where people put buy and sell orders and the exchange matches the buyers with the sellers.

In a decentralized exchange a person trades with the liquidity pool, not with other person.

It is important to know that buying or selling a token in a decentralized exchange does affect the price of the token. You get the price calculated after the impact of your purchase is taken into account.


Let's suppose that a liquidity pool has T amount of tokens, and E amount of Ether.


The price of a token in units of Ether is the total Ether E divided by the number of tokens T:

P = E/T

Buyers take tokens and deposit Ether. Buying increases the price.


Sellers deposit tokens and take Ether from the pool. Selling decreases the price.


Exercise

When you buy you don't get the price listed, but a higher price calculated after you deposit your ETH and take your tokens. And the more you want to buy the more expensive it gets.

Similarly, when you sell, you don't get the listed price, but a smaller price calculated after you deposit your tokens and get the Ether. And the more you sell the cheaper it gets.


Prices are determined implementing the condition that the product of the number of tokens and Ether remains constant:

T*E = k (where k is a constant)

This is chosen for various reasons, first of all the formula is simple and there is no need for active management. It makes sure that the liquidity pool can never be completely drained of either asset.

Another important reason is that prices fulfilling this condition are sensitive to trade size. Larger trades have a more significant impact on the price. This helps encouraging smaller, frequent trades, and discouraging large market moving trades.

Web III

In practice, Web 3 refers to websites that can interact with blockchain data. Websites can display different content depending on the information retrieved, or host a decentralized application where users can interact with smart contracts.

But the best way is to see it for yourself. We will take a guided tour of the Web III world in the next section: Test Drive. where we will explore Seasonal Tokens, as an example of a crypto ecosystem of related smart contracts.

Leftover

Quest: Private Keys and Addresses

In the wallet tab, click on Private keys, and then export.

Task: Export the CSV file with your private keys.

'exercise'

The Bitcoin wallet has a Master Private Key that can generate all the "child" private keys. Every Bitcoin address has an associated child private key.

The Bitcoin address is like the Public Key, and it has an associated Private Key. Think of the address as a P.O box, and the private key is the only way to open it. Anybody with your P.O box can send you bitcoin, but only the private key can transfer the BTC.

If somebody has access to a private key, this person can transfer the funds on the associated address. So keep this CSV file secret, or erase it for now.

Quest: Master Private Key

In the Electrum wallet, under the wallet tab, click on information. Look for the field that says Master Private Key.

The Master Private key generates all your Bitcoin addresses, with this key, you can re generate all your child private keys, Your wallet seed is related to this Master Private Key.

If you have the Master key you can create another wallet and import your bitcoin addresses, even if you lost the 12 words of the wallet seed.

And if anybody has access to the Master key, this person has access to all your Bitcoin.


Under the "view" tab, click on "console". This will open the console. type the following command: getmasterprivate()

It will ask you for your password.

Task: share a screenshot of the console window where it is asking for your password. Do not share a screenshot where your Master Private Key is displayed!!!

Now enter your password.

The master private key is revealed.This can re generate all bitcoin addresses in any wallet using the BIP32 standard. Because there are more than one way of encoding the private keys.

To close the console click on the view tab again and de-select console.

'exercise'

The Master Private Key serves as the root key from which all child keys and Bitcoin addresses are derived. Its primary uses include wallet recovery, deriving private keys, exporting to other wallets, and advanced wallet features. Always keep it secure and backed up.

Quest: Master Public Key

Under the wallet tab, click on Information. Notice the Master Public Key field.

The Master Public Key can be used to derive all child public keys and Bitcoin addresses in your wallet. This has multiple uses, for example: You can provide the Master Public Key to an e-commerce platform or accounting software to automatically generate addresses for customer payments.


The Master Public Key cannot spend funds, so sharing it does not expose your Bitcoin. However, it does reveal all wallet addresses and transaction history derived from it. This can compromise privacy:

Anyone with the Master Public Key can see your entire transaction history and all derived addresses. Avoid sharing it publicly unless necessary.

You can find the Public Keys associated to your bitcoin addresses in the "view" tab, under addresses. Click on addresses and then right click on the bitcoin address you want to see the public key.

Task: share a screenshot of the address window after you right click on details.

'exercise'

Revealing a a child public key does not compromises your security. But people with the public key can see all the activity associated with the associated address.

but you can use public and private keys to digitally sign or encrypt/decrypt messages. We will have some fun with this later on.