8. Blockchain and applications Flashcards
Q: What is blockchain (hard)?
• Blockchain is a type of DLT in which transactions are recorded with an unchangeable cryptographic signature called a hash.
- A Digital ledger: Open to anyone and records every transaction in “blocks
- Each Block contains Data, Hash and the previous hash. The previous hash is what makes the “chain” og blocks.
- Every time a new transaction occurs on the blockchain, a record of that transaction is added to every participant’s ledger.
Q: What is a blockchain (short)?
A digital ledger that records transactions in blocks and is distributed across a network of computers.
Q: What happens when a new transaction occurs on the blockchain?
A record of that transaction is added to every participant’s ledger.
Q: What is Distributed Ledger Technology (DLT)?
Ledger: a digital database that stores and maintains a record of transactions in a decentralized manner
So the transactions are distributed across several ledgers
Q: How are transactions recorded in a blockchain?
With an unchangeable cryptographic signature called a hash.
Q: How is the blockchain stored in the network?
It is duplicated and spread across many computers.
Q: What is the purpose (pros) of Distributed Ledger Technology (DLT)?
a) Decentralization
b) Transparency
c) Security
d) Efficiency
Q: What makes a blockchain secure and unchangeable?
- Hashes or cryptography
- Decentralization (distributed across several nodes)
- Consensus mechanisms (PoW or PoS)
Q: What is the relationship between a block and the previous block in a blockchain?
Each block is linked to the previous block, through hashes, forming a chain.
Q: What is the main advantage of a blockchain?
1) Transparency (history of all transactions are openly available for anyone)
2) Decentralization (Distributed across many nodes [computers])
3) Security (cryptography/hashes)
4) Efficiency (smart contracts, reduce need for intermediates, reduce costs)
Q: What is the role of a cryptographic signature in a blockchain?
It secures the records and makes them unchangeable.
Q: How does a blockchain ensure data integrity?
1) Transparency: By distributing copies of the ledger to multiple participants.
2) Security: of the blockchain system itself
Q: What type of information can be stored in a blockchain?
Various types of data, not just financial transactions.
Q: What is the overall goal of using a blockchain?
To create a secure and decentralized system for recording and verifying transactions.
Q: How does DeFi differ from TradFi (Traditional Finance)?
DeFi differs in the processes used to provide services but performs similar functions to TradFi. The main difference are the
a) disintermediation of services by the use of self-executing code (smart contracts) on blockchains.
Q: What are decentralised applications (DApps) in DeFi?
Applications that allow users to interact with smart contracts and access DeFi services.
Allows financian services such as lending, borrowing, trading, and asset management, directly through the application.
Q: What vulnerabilities does DeFi inherit from TradFi?
1) Operational Fragilities
2) Liquidity and Maturity Mismatches
3) Leverage
- Operational Fragilities:
• Weaknesses in the system from human error, technical failures or design flawn.
• Example: A bug in a smart contract. - Liquidity and Maturity Mismatches:
Liquidity: How fast an asset can be converted into cash
Maturity: Life span of an investment or a debt
• A mismatch between these can occur when when short-term liabilities (what you owe soon) exceed short-term assets (what you have or can quickly convert to cash).
• Example: Asset locked in a smart contract for a certain period. Not able to withdraw without penalty. Similarly, banks may lend to long-term customers using short-term deposits, which creates problems If many depositors want their money back soon - Leverage:
• Can take on leverage which can lead to substantial losses
• Example: Smart Contracts lock it. Volatile market. Big risk
Q: What happened during the Terra Luna crash in 2022?
- Creation of TerraUSD (UST) and Luna: Terraform Labs created two types of tokens: TerraUSD (UST), which is a stablecoin (a cryptocurrency designed to maintain a stable value, in this case, pegged to the US dollar), and Luna, which is used to back the value of UST.
- Arbitrage Mechanism: The idea was that if the price of UST deviated from $1, there would be an opportunity for traders to make a profit. If UST was worth less than $1, a trader could buy UST cheaply and exchange it for $1 worth of Luna. This activity would help bring the price of UST back to $1.
- Burning of Luna to create UST: To create new UST, Luna tokens needed to be “burned” or removed from circulation. For instance, if a Luna token was worth $85, a trader could exchange it for 85 UST.
- Price Increase: The price of Luna rose dramatically, reaching a peak of $116 in April 2022.
- High Interest Rate: Traders could deposit UST on Terra’s lending platform (the Anchor Protocol) and earn a very high annual interest rate of 20%.
- Run on the Lending Platform: However, on May 2022, over $2 billion worth of UST was suddenly withdrawn from the Anchor Protocol. This is similar to a “bank run” in traditional finance, where many people withdraw their deposits at the same time, creating a liquidity crisis.
- Price Crash: In the days following this bank run, the price of Luna crashed dramatically, falling to just a fraction of a penny before being delisted (removed from exchanges).
- Impact: It’s estimated that this crash resulted in losses of $300 billion across the entire cryptocurrency market.
Q: What caused the FTX collapse in 2022?
FTX:
• A cryptocurrency exchange platform
Alemada Research:
• Hedge-find founded by Bankman-Fried
• Used FTT as collateral for loans
- Both were tied to the risky and volatile FTT.
- Investors found out; starting to withdraw its FTT holdings. Liquidity problem
- FTX searched for bailout: Binance said no after due diligence
- Bankruptcy
Q: How would you define DeFi in simple terms?
DeFi is a system of financial services that operate on a decentralized network:
1) Transparency - Public ledger
2) Security - Blockchain system
3) Efficiency - Remove intermediates by utilizing things as “smart contracts”
Q: What is the role of smart contracts in DeFi?
Automize the terms and conditions in a decentralized manner
Q: What are some examples of risks or vulnerabilities in DeFi?
a) Operational fragilities
such as weakness in smart contracts and protocols
b) Liquidity and maturity mismatches
c) Leverage
d) Interconnectedness
Interconnectedness refers to the extent to which different elements or participants in the DeFi ecosystem are interconnected or dependent on each other. If a vulnerability or failure occurs in one part of the ecosystem, it can have ripple effects and impact other interconnected components
Q: What is the purpose of a decentralized ledger in DeFi?
1) Transparency
2) Eliminate need for intermediaries
3) Security: tamper-proof record-keeping of transactions.
Q: How does DeFi differ from traditional financial systems?
DeFi operates on a decentralized network without reliance on central authorities, while traditional financial systems often involve intermediaries and centralized control.
Q: What is an algorithmic stablecoin?
A type of cryptocurrency designed to maintain a stable value by utilizing algorithms to regulate its supply and demand. Unlike traditional cryptocurrencies like Bitcoin or Ethereum, which can be highly volatile in value, algorithmic stablecoins aim to provide stability and reduce price fluctuations.
Q: What is a Peg?
A “peg” is a specified price for the rate of exchange between two assets. This is in direct contrast to “floating” currencies which have no hard price target and follow looser monetary policy
.
In the context of cryptocurrency, a peg refers to the specific price that a token is aiming to stay at. The majority-case use of a peg is for stablecoins;
Q: The Terra Luna crash in 2022
- Terraform Labs created the TerraUSD (UST) coin to be an algorithmic stablecoin designed to maintain its peg through on-chain arbitrage activity
- For UST to retain its peg, one UST could be changed for $1 worth of Luna at any time.
- To create UST, you must burn Luna (i.e., remove Luna from circulation)
- Luna token increased dramatically in price
- May 2022, over $2 billion worth of UST was unstaked (taken off the Anchor Protocol) – i.e., there was a run on the lending platform
- Over the next days, Luna collapsed
Q: What is the purpose of Hashing and Encryption?
a) Hashing: Validate Information:
Validate the integrity of the content (uniqueness)
b) Encryption: Protect sensitive information
Maintain data confidentiality and security.
Q: What is Hashing?
Hashing is the process of transforming data into a fixed-length string of characters using a hash function.
Q: What is the function of hashing in the crypto space?
In the crypto space, hashing is commonly used to create unique identifiers for data, such as transactions or blocks in a blockchain.
Q: How are hash functions designed?
• To validate information
• Validate the integrity of the content (uniqueness)
In simple terms, hashing is a process that takes an input, transforms it into a unique, irreversible code, and allows for efficient data verification. It’s a fundamental aspect of data security and integrity checks.
1) Uniqueness: Every unique input generates a distinct hash value. Even a minor change in the input will yield a drastically different hash value, ensuring the uniqueness of each data set.
2) One-way: Hash functions are designed to be irreversible. This means that once a hash value is produced, it’s computationally impractical to retrieve the original input from it. This characteristic is crucial for maintaining security.
3) Integrity: Hashing is used to verify the integrity of data. By comparing hash values, one can easily determine whether the data has been modified or tampered with. A change in data results in a different hash value, signaling a potential integrity breach
Hashing is a method used in computing for ensuring data integrity and security. It uses a specific function, known as a hash function, which takes an input and converts it into a fixed-size string of characters, known as a hash value or hash code.
Q: How does hashing ensure data integrity?
In simple terms, hashing is a process that takes an input, transforms it into a unique, irreversible code, and allows for efficient data verification. It’s a fundamental aspect of data security and integrity checks.
1) Uniqueness: Every unique input generates a distinct hash value. Even a minor change in the input will yield a drastically different hash value, ensuring the uniqueness of each data set.
2) One-way: Hash functions are designed to be irreversible. This means that once a hash value is produced, it’s computationally impractical to retrieve the original input from it. This characteristic is crucial for maintaining security.
3) Integrity: Hashing is used to verify the integrity of data. By comparing hash values, one can easily determine whether the data has been modified or tampered with. A change in data results in a different hash value, signaling a potential integrity breach
Hashing is a method used in computing for ensuring data integrity and security. It uses a specific function, known as a hash function, which takes an input and converts it into a fixed-size string of characters, known as a hash value or hash code.
Q: What is a Digital Signature?
An electronic verification of the sender. Used in blockchain to sign transactions. They provide three important properties: authentication, non-repudiation, and integrity:
a) Authentication: A digital signature confirms the identity of the sender by using the sender’s private key to encrypt a hash of the message or document.
b) Non-repudiation: The recipient of a digitally signed message can prove to a third party that the message was indeed sent by the claimed sender.
c) Integrity: if a signed message is changed or tampered with, the digital signature becomes invalid.
Q: How to create a valid digital signature?
Several ways, but a cryptographic hash, which is used in blockchains, has the two steps:
1. Hashing
2. Encryption
Q: What is Encryption?
Encryption is a process used to convert a message or information into a form that is unreadable to unauthorized parties. It ensures that only authorized individuals with the necessary decryption key can access and understand the original message.
Q: Explain the encryption process for signatures
The encryption process involves two cryptographic keys: a private key and a public key. The sender, who wants to create a digital signature, uses their private key to encrypt the signature.
1. The sender generates a pair of cryptographic keys: a private key and a public key.
2. To create a digital signature, the sender uses their private key to encrypt the signature.This encryption process ensures that the signature is unique and can only be decrypted using the corresponding public key.
3. The encrypted signature, also known as the digital signature, is then combined with the message that the sender wants to sign.
4. The signed message is sent to the recipient.
5. Upon receiving the signed message, the recipient uses the sender’s public key to decrypt the signature. This step verifies the authenticity of the signature because only the corresponding private key can successfully decrypt the encrypted signature.
6. The recipient then compares the decrypted signature with a newly computed hash of the received message. If the decrypted signature matches the computed hash, it ensures that the message hasn’t been tampered with during transit and that it originated from the sender.
Q: Similarities between hashing and encryption?
Both transform or change data into a different format
Q: Differences between hashing and encryption?
1) Encryption is a two-way function, while hashing is a one-way function that changes a plain text to a unique digest that is irreversible.
2) Hashing is used to validate the integrity of the content (uniqueness). Encryption has the primary purpose of maintaining data confidentiality and security.
Q: What is the “double spending problem”?
The risk that someone could fraudulently spend the same digital currency unit multiple times.
Q: What is the solution to the “double spending problem”, and why?
Blockchain.
Blockchain is a public ledger, recording ALL Bitcoin transactions with time stamps, and then chain them together securely using cryptography. This public ledger is stored and synchronized on every node - a distributed public ledger.
Q: What is a blockchain (simple)?
A distributed public ledger, recording all previous Bitcoin transactions
Q: What does blockchain solve?
Solve the double spending problem without a central authority.
Q: Who maintain blockchain?
Miners