The Beginners Guide To Crypto: Difference between revisions

From Seasonal Tokens
Jump to navigation Jump to search
Line 772: Line 772:
Sellers deposit tokens and take Ether from the pool. Selling decreases 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.
When you buy you don't get the price listed, but a higher price calculated after you deposit your ETH and take your tokens.
Line 778: Line 780:
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.
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.
And the more you sell the cheaper it gets.





Revision as of 01:15, 29 November 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: Electrum Wallet

Task: Install Electrum

Task: View Seed

Task: Private Key

Task: Bitcoin Addresses

Quest: CEX

CEX, credit card, examples. KYC


Task: Top Cryptocurrency Exchanges:

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

CMC Liquidity score 0 to 1000


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.


BTC Dominance Chart

Bitcoin is the major contributor to the Total Crypto Market Cap

Find the top 3 Cryptocurrencies by market cap.

Quest: (BTC Dominance Chart)

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)


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. 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).

Quest (Comparing BTC and ETH Price History)

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.

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

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, 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)

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.


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

(Ans: Text)

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)


Blockchain Explorer

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.

Test Drive

Metamask

Website Integration

Ethereum / Polygon Chains (Explorers Transactions)

Token smart contracts.


Mint transactions.

Mining Pool

GPU

BlackMiners

Swaps

Uniswap liquidity pools

Token Pair Contracts

Price trackers

Buy Sell

Farming

Creating a farm position NFT

Polygon Bridge

Ways to make money with S.T

Trading Simulator Trade tokens for more tokens

Investors Club


Features left for Test Drive:

Price Impact

Layer II

Polygon.

PolygonScan

Compare features to Etherscan

https://polygonscan.com/

Wrapped BTC

https://www.kraken.com/learn/what-is-wrapped-bitcoin-wbtc

Wrapped tokens

WEB III