Blockchain v2 Flashcards

1
Q

Q: What is the role of smart contracts in DeFi?

A

Smart contracts automate and enforce the terms and conditions of transactions in a decentralized manner.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Q: What is an algorithmic stablecoin? Also, provide an example

A

• Maintain stable value by utilizing algorithms to regulate supply and demand.
• Unlike volatile Bitcoin and Ethereum

Example:
If price of coin is above $1, algorithm will increase the supply. New tokens created that dilute the value and bring the price down

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Q: What is a Peg?

A

• Fixed Exchange Rates between two assets
• Different to “floating currencies”
• Stablecoins

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Q: What is the purpose of Hashing and Encryption?

A

a) Hashing: Validate Information (uniqueness)

b) Encryption: Protect sensitive information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Q: What is Hashing?

A

Hashing: Validate information

Unique identifier for the transaction data. Each transaction has its own. When the block is added to the blockchain, the hash value of the previous block is also included in the new block’s data. This creates a chain of blocks where each block’s hash value is dependent on the data of the previous block.

• One-way: the code will not be reversed but stored in the chain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Q: How are hash functions designed?

A

Hash functions are designed to be one-way, meaning it is computationally infeasible to derive the original input from its hash.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Q: How does hashing ensure data integrity?

A

Hashing ensures data integrity by allowing quick and efficient verification of whether the data has been tampered with. Even a small change in the input data will result in a completely different hash value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Whats meant by hashing beeing one-way?

A

When it is said that hash functions are designed to be one-way, it means that it is extremely difficult, computationally speaking, to reverse the process and determine the original input from its hash value. In other words, given the output (the hash), it is nearly impossible to figure out what the original data or message was. This property ensures the security and integrity of the hash function, making it suitable for tasks like password storage and data verification.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Q: How to create a valid digital signature?

A
  1. Sender uses private key to encrypt the signature
  2. The recipient uses the sender’s public key to decrypt the signature (verifies the authenticity)
  3. Recipient compares decrypted signature with a newly computet hash. If it matches, its good
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Q: What is Encryption?

A

Encryption: Protect information

The practice of encoding information in a way that only someone with a corresponding key can unscramble and read it.

• Two-way: When you encrypt something, you’re doing so with the intention of decrypting it later.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Q: Explain the encryption process for signatures

A
  1. Sender uses private key to encrypt the signature
  2. The recipient uses the sender’s public key to decrypt the signature (verifies the authenticity)
  3. Recipient compares decrypted signature with a newly computed hash. If it matches, its good
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Q: Similarities between hashing and encryption?

A

Both transform or change data into a different format.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Q: Differences between hashing and encryption?

A

Hashing and Encryption have different functions. Encryption is a two-way process that includes encryption and decryption while hashing is a one-way process that changes data into the message digest which is irreversible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Q: What is the “double spending problem”?

A

The risk that someone could fraudulently spend the same digital currency unit multiple times.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How can blockchain be the solution to the “double spending problem”, and why? (easy answer)

A

Public Ledger that records all transactions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Q: What is the solution to the “double spending problem”, and why? (easy answer)

A
  1. Public ledger:
    Blockchain prevents double spending by securely recording every transaction in a public ledger.
  2. Consensus mechanisms (PoW/PoS):
    With consensus mechanisms, blockchain ensures that all nodes agree on transactions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the solution to the “double spending problem”, and why? (hard answer)

A
  1. Decentralized Public Ledger:
    Each transaction is recorded on a public ledger. This way, any double-spending attempt can be quickly identified and rejected.
  2. Consensus mechanisms (PoW/PoS):
    Computers must agree on a single version of transaction history If users try to double spend, the network will reject it because it contradicts with the agrees-upon transaction history.
  3. Imutability:
    Once a block is confirmed and added to the blockchain, it cannot be altered.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Why do miners have incentive to do mining?

A
  1. Block rewards:
    When a miner solves a complex mathematical puzzle and adds a new block of transactions to the blockchain, they receive a certain number of newly minted cryptocurrency (like Bitcoin). This is called the block reward.
  2. Transaction Fees:
    Each transaction in the block includes a small fee. The miner who adds the block to the blockchain gets to keep these fees. So, the more transactions a miner validates and adds to the blockchain, the more fees they earn.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Q: Is there inflation of Bitcoin?

A

The powerpoint says this: “No, the issuance has a limit”, but:

Yes, there is. But it is different from traditional currencies. Bitcoin inflation refers to the increase in the number of Bitcoins in circulation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Q: How does the Bitcoin inflation change over the years?

A

In the case of Bitcoin, the inflation rate decreases over time due to the “halving” events that occur approximately every four years. During each halving, the block reward for miners, which is the newly minted Bitcoins they receive as a reward for mining a new block, is cut in half. This reduction in the block reward reduces the rate at which new Bitcoins are created and introduced into circulation.

With each halving, the supply of new Bitcoins entering the market decreases, leading to a lower rate of inflation. This diminishing inflation rate, coupled with the limited supply of 21 million Bitcoins, contributes to the perception of Bitcoin as a deflationary currency. It suggests that over time, the purchasing power of Bitcoin may increase, making each Bitcoin potentially more valuable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Q: When will Bitcoin mining end?

A

until all 21 million Bitcoins are mined, around the year 2140.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Explain the transaction fee rewards for miners

A

|Transaction Fee Rewards:

When users send Bitcoin transactions, they include a transaction fee. This fee is determined by market forces and can be set by the users themselves. Miners prioritize transactions with higher fees because they can include those transactions in the limited space available in each block. By including transactions with higher fees, miners can maximize their profits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Q: What is the complete role of miners?

A
  1. Maintain the blockchain
    Miners validate new transactions and record them on public ledger
  2. Verify transactions
    Miners check the digital signatures associated with each transaction
  3. Compete in mining
    Proof-of-Work: Miners compete in finding a nonce (number only used once) to generate hashes
  4. Adding New Block to the Blockchain:
    The miner who solves the puzzle first gets to add the new block to the blockchain.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Q: What is a nonce?

A

The nonce is a random number used in the mining process to solve the proof-of-work puzzle. Miners repeatedly change the nonce value until they find a hash that meets the required difficulty level.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Q: What is the average size of a block, and how many separate transactions does it contain?

A

On average 1MB in size. Generally contains around 2,500 (max 4000) separate transactions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Q: What happens if two blocks are creates simultaneously?

A
  1. Fork:
    Sometimes mines solves the puzzle and create a new block at the same time. This results in two version of the blockchain that are identical except for the last block. This situation is known as a fork.
  2. The Longest Chain Rule:
    To resolve this fork, the blockchain network follows a rule called “the longest chain rule.”

This rule states that the valid blockchain is the one with the most blocks (most Proof-of-Work). So, whichever of the two competing blocks gets another block added to it first becomes part of the longest chain and is accepted as the valid blockchain. The block from the shorter chain is discarded.

Other, simple:
“The longest chain rule.” – Miners continue to mine on top of block A and B. If the next block is mined on top of A, B becomes discarded.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Q: How many blocks are generally recommended for security?

A

In Bitcoin, 100 additional blocks to be built on top of a particular block in the chain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Q: What are consensus mechanism in blockchain, in general? (dont explain PoW and PoS)

A

Rules/Protocols in how all computers (nodes) in a blockchain agree about what transactions are valid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

There are two commonly used consensus mechanisms:

A
  1. Proof of Work (PoW)
  2. Proof of Stake (PoS)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Explain Proof of Work

A

A consensus mechanism used by cryptocurrencies like Bitcoin. Miners compete to solve complex cryptographic problems, and the first to solve the problem gets to add a new block to the blockchain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Explain Proof-of-Stake

A

Validators selected randomly to confirm transactions and validate block information.

To become a validator, a coin owner must “stake” a specific amount of coins. (Ethereum requires 32 ETH, around 2000 dollars)

Blocks get validated by multiple validators, and when a specific number of validators verify that the block is accurate, it is finalized and closed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Difference between PoW and PoS

A

PoW relies on computational power, making it resource-intensive and leading to concerns about energy consumption. PoS, on the other hand, relies on economic measures (the staked coins) to ensure security, making it less energy-intensive and arguably more sustainable.

32
Q

Q: What are some of the advantages of PoS over PoW?

A
  1. Energy Efficiency
    In PoW, mining consumes large amount of computational power and energy. This is not involved in PoS
  2. Security
    PoS: Those who want to attack need to own a majority of all crypto. In PoW, attacker only needs more computable power.
  3. Efficiency
    PoS can handle more transactions in a given time compared to PoW.
33
Q

Q: What is the Lightning Network (LN)?

A

In the traditional Bitcoin network, every transaction needs to be recorded on the main blockchain, which is a public ledger that verifies and stores all transactions. However, this process can be slow and costly, especially when the network is congested.

The Lightning Network introduces the concept of a payment channel or a “tab” between two participants. Instead of immediately recording every single transaction on the main Bitcoin ledger, participants can open a payment channel between themselves. This payment channel acts as an off-chain arrangement.

Once the payment channel is open, participants can conduct multiple transactions between them without involving the main blockchain. These off-chain transactions are faster and usually have lower fees. The balance of the tab keeps track of how much each participant owes the other based on the transactions conducted within the channel.

34
Q

Q: How does the Lightning Network help speed up transactions on the blockchain?

A

The Lightning Network allows users to open payment channels between each other. These channels exist off the main Bitcoin blockchain (off-chain). Transactions within these channels can be made instantly and almost for free because they don’t need to be immediately recorded on the blockchain.

Inside a channel, participants can make unlimited transactions. When the participants are ready to close the channel, the final state of these transactions is written to the blockchain. Therefore, instead of potentially thousands of transactions needing to be written on the blockchain, only two are needed.

35
Q

Q: What are the steps involved in using the Lightning Network?

A
  1. opening a payment channel
  2. conduct off-chain transactions
  3. settling the final balance on the blockchain when closing the channel
36
Q

Q: What are the three different forks?

A

1) Temporary Fork:
Miners discover a block at the same time, resulting in a competition where the longest blockchain is viewed as the true one. “chain split”.

2) Soft Fork:
New rules or protocols. These are compatible with the old ones. Blockchain remains as one unified chain.

3) Hard Fork:
substantial changes lead to permanent split in the blockchain. Leads to the formation of two distinct blockchains. As a result, the cryptocurrency associated with the original blockchain continues to exist, while a new cryptocurrency is created for the forked blockchain.

37
Q

Q: What is the meaning of “permissionless”?

A

“does not require authorization”

Blockchains are open to anyone. no one owns a blockchain.

38
Q

Q: What are the key elements of the DeFi ecosystem?

A

A: The key elements of the DeFi ecosystem include
1. permissionless blockchains,
2. smart contracts,
3. DeFi protocols,
4. decentralized applications (DApps).

39
Q

Q: What is the role of permissionless blockchains in DeFi?

A

A: Permissionless blockchains provide a transparent and immutable ledger for recording transactions in the DeFi ecosystem.

40
Q

Q: What do smart contracts do in the DeFi ecosystem?

A

A: Smart contracts are self-executing code that automates the terms and conditions of transactions on the blockchain.

41
Q

Q: What are DApps in DeFi?

A

A: DApps are decentralized applications that allow users to interact with smart contracts and facilitate financial intermediation in the DeFi ecosystem.

42
Q

Q: What are blockchain native tokens in DeFi?

A

Blockchain native tokens in DeFi refer to the digital assets or cryptocurrencies that are built on and native to a specific blockchain platform

43
Q

Q: What is self-custody in DeFi?

A

A: Self-custody means that participants in DeFi protocols maintain control of their crypto-assets and have the ability to transact without relying on third parties.

you are the only one knowing about the keys to your assets

44
Q

Q: What are oracles and bridges in DeFi?

A

A: Oracles provide access to off-chain data, while bridges facilitate interoperability between different blockchains

45
Q

Q: What are oracles in DeFi?

A

Easy:
Oracles are like messengers that bring information from the real world to the blockchain. They help smart contracts get data like prices or weather conditions that are not directly available on the blockchain.

Advanced:
third-part, supply smart contracts with external information. Serve as bridges between real world and blockchains

46
Q

Q: What is bridges in DeFi?

A

Connectors between different blockchains. Allow assets or information to move between different blockchains.

Blockchains are isolated and cannot directly interact with each other. Bridges allow this.

For instance, a bridge might allow a user to take a token that was issued on the Ethereum blockchain and use it on the Binance Smart Chain.

47
Q

Q: What are decentralised autonomous organisations (DAOs) in DeFi?

A

• Organization that is controlled by the organization members, and not influenced by a central authority.
• Decision-making via voting
• Votes weightened by amount of tokens

48
Q

Q: What are the four different elements that are important in explanation of the Defi system?

A

a) Permissionless blockchains
b) Smart contracts
c) Defi protocols
d) Decentralized applications (Dapps)

49
Q

Q: What are some of the distinguishing features of DeFi?

A

1) Smart contracts (digital agreements)
2) Blockchain native tokens (Tokens specific to a particular blockchain network)
3) Composability (Ability to build something unique, like LEGO blocks)
4) Self-custody (having full control and ownership over your assets)
5) Oracles and Bridges

50
Q

Q: How do decentralized lending platforms work in DeFi?

A

A: DeFi lending platforms rely on
1. pooled assets provided by lenders
2. use collateral instead of creditworthiness assessments
3. Require over-collateralization for loans.

Over-collateralization:
Collateral to fill potential default.

Example:
a) Alice wants to borrow 100 DAI
b) She must provide collateral worth more than 150 DAI, so she offers 1 ETH
c) Platform locks 1 ETH in a smart contract as collateral

51
Q

Q: What are flash loans in DeFi?

A

Allow users to borrow a specific amount of crypto in a very short time.

Don’t require collateral.

Borrowed funds must be returned within the same transaction

Smart contracts

Example:
All happens within the same transaction:
1. User loans an amount crypto
2. Borrower use it in arbitrage
3. Repayment. If it fails, entire transaction is reverted

52
Q

Q: What are the 2 different types of crypto-asset trading platforms in DeFi?

A

Centralized Exchanges (CEXs): Operated by centralized organizations who oversee the transactions. Act as intermediaries or third parties.

Decentralized Exchanges (DEXs): non-custodial, allow peer-to-peer trading, facilitated by smart contracts. No third party.

53
Q

Q: How do automated market makers (AMMs) work in DeFi?

A

Traditional markets: trades occur between buyers and sellers

AMM: Like vending machines for cryptocurrencies. Smart contracts on a blockchain that hold liquidity reserves (pools) of two or more tokens, and enable trades to occur directly between these reserves.

Instead of relying on the traditional buyers and sellers in a financial market, AMMs keep the DeFi ecosystem liquid 24/7 via liquidity pools.

54
Q

Q: What is yield farming in DeFi?

A

Lend or stake your crypto to a liquidity pool. Receive interest or other rewards.

55
Q

Q: What is staking in DeFi?

A

A: Tokenized derivatives are tokens whose value depends on the fluctuations of referenced assets or other observable variables. They may be governed by programmable code and can require oracles for tracking underlying asset information.

56
Q

Q: What are tokenized assets in DeFi?

A

Digital representation of real-world assets.

Tokenized Gold: Gold is a widely recognized and valuable physical asset. Through tokenization, gold can be represented as digital tokens on a blockchain. Each token represents a fraction of a unit of gold, such as an ounce or gram. These tokens can be bought, sold, and traded on a blockchain-based platform.

57
Q

Q: What vulnerabilities are associated with operational fragilities in DeFi?

A

A: Operational fragilities in DeFi include governance arrangements, dependence on blockchain networks, smart contracts, and oracles and bridges.

58
Q

Q: What vulnerabilities are associated with smart contracts in DeFi?

A

A: Smart contracts in DeFi are complex and prone to coding errors. Once deployed, they are immutable, making it difficult to rectify errors or fraudulent transactions.

59
Q

Q: What risks are associated with oracles in DeFi?

A

A: Oracles are crucial for executing off-chain operations and retrieving data, but they can introduce dependency on third-party providers. Errors or attacks on oracles can have negative consequences in multiple protocols.

60
Q

Q: How do bridges pose operational risks in DeFi?

A

A: bridges can be vulnerable to theft or unauthorized access. If a bridge is compromised or hacked, it can lead to the loss of assets that were being transferred

61
Q

Q: What are liquidity and maturity mismatches, and why are they concerning in DeFi?

A

Differences in the availability and timing of funds in DeFi, which can lead to problems when there is a mismatch between the demand for withdrawals and the availability of funds, potentially causing liquidity issues and risks.

62
Q

Q: How can liquidity risks arise in stablecoins and lending platforms within DeFi?

A

A: Liquidity risks in stablecoins happen when many people try to cash out their stablecoin holdings all at once. In lending platforms, liquidity risks occur when there is high demand for withdrawals but not enough funds available to meet those requests.

63
Q

Q: What is composability in DeFi, and how does it contribute to interconnectedness?

A

A: Composability in DeFi refers to the ability of different protocols to work together. This interconnectedness can create situations where problems in one protocol can quickly spread to others, increasing the risk of financial contagion.

64
Q

Q: What risks are associated with concentration and complexity in DeFi?

A

A: Concentration in DeFi means that a few protocols or entities have a lot of influence in the ecosystem. This can be risky because if one of them fails, it can have widespread effects. Complexity in DeFi makes it harder to understand and predict how different parts of the system will interact, increasing the risk of unexpected issues.

65
Q

Q: How do DeFi platforms depend on third-party providers for their functioning?

A

A: DeFi platforms rely on external services like oracles for getting off-chain data and the internet infrastructure for their operations. These third-party providers are crucial for the proper functioning of DeFi protocols.

66
Q

Q: What are some of the vulnerabilities of DeFi?

A

1) Operational fragilities
2) Liquidity and maturity mismatches
3) Leverage
4) Interconnectedness, concentration and complexity
5) Other vulnerabilities (market integrity, cross-border regulatory arbitrage, cryptoisation)

67
Q

Q: What are the three potential scenarios for the evolution of DeFi and its financial stability implications?

A
  • Scenario 1: DeFi remains a niche area with limited growth and interconnectedness.
  • Scenario 2: DeFi grows significantly and becomes mainstream, leading to deeper interlinkages with the real economy.
  • Scenario 3: DeFi slowly fades, but leaves behind a legacy of useful financial innovations.
68
Q

Q: What are the four key metrics used to monitor the evolution of the DeFi ecosystem?

A

The four key metrics used to monitor the evolution of DeFi are Total Value Locked (TVL), the number of DApps, stablecoin market capitalization, and the number of DApps users based on unique addresses. However, these metrics have complexities in their interpretation and require measures that account for issues such as double counting and the use of stablecoins for non-DeFi purposes.|

69
Q

Q: How can vulnerabilities in DeFi be monitored?

A

A: Vulnerabilities in DeFi can be monitored by assessing operational fragilities, liquidity and maturity mismatches, leverage usage, interconnectedness and concentration risks, and market integrity issues.

70
Q

Q: What is a token?

A

A digital object/currency on the internet. Represent something of value, such as money. Created by blockchain.

71
Q

Q: What is composability in the context of DeFi?

A

A: Composability refers to the ability to combine different components of the DeFi ecosystem to create new and sophisticated products, similar to building with Lego blocks.

72
Q

Whats cryptoization

A

residents start using crypto assets instead of the local currency

73
Q

Q: What are the vulnerabilities of Cryptoisation?

A

Substitution of traditional currencies with crypto-assets, which can complicate domestic monetary policy and undermine monetary sovereignty, especially in countries with economic instability and weak banking sectors.

74
Q

Q: What are the vulnerabilities of Cross-border regulatory arbitrage?

A

DeFi platforms operating across borders, making it challenging to identify legal ownership/control and regulatory authorities, leading to difficulties in oversight and enforcement.

75
Q

what plays crucial roles in maintaining data integrity and security

A

Hashing and Encryption

76
Q

Explain the chain in blockchain

A

When the block is added to the blockchain, the hash value of the previous block is also included in the new block’s data. This creates a chain of blocks where each block’s hash value is dependent on the data of the previous block.

77
Q

Whats “halving”

A
  • “halving”: block reward (newly minted Bitcoins) for miners is cut in half.
    happens approximately every four years