गुरुर्ब्रह्मा गुरुर्विष्णु गुरुर्देवो महेश्वरा गुरुर्साक्षात परब्रह्म तस्मै श्री गुरवे नमः !
QUIZ-3
1. The extension of a solidity file is
.sol
.solid
.eth
.solc
Correct Answer : .sol
2. which of the following is true for MetaMask wallet
it holds cryptocurrency and connects to blockchain
it authenticates transaction received from smart contract
is a web3 provider
all of the above
Correct Answer : all of the above
3. __________ framework is used for developing DApps
Truffle
Ganache
Donut
cheesecake
Correct Answer : Truffle
4. Ganache is a__________
Local Blockchain
Global Blockchain
development framework
none of the above
Correct Answer : Local Blockchain
5. Gas limit determines
how much computation can happen per block
how much storage can be allocated per block
Accounts for computational work
All of the above
Correct Answer :All of the above
6. solc is __________
solidity compiler
EVM
truffle suite
solidity contract
Correct Answer :solidity contract
7. solidity is an
object oriented programming
low level programming
markup language
none of the above
Correct Answer : object oriented programming
8. pragma in solidity is ________
preprocessor directive
version
in built function
modifier
Correct Answer : preprocessor directive
9. structures _________
collect heterogeneous data
collect homogenous data
initializes variable
none of the above
Correct Answer : collect heterogeneous data
10. advantages of DApp include
Zero Downtime
transaprency
security
All of the above
Correct Answer : All of the above
11. A DApp is _________
a type of blockchain
a decentralized application
a wallet
a crypyocurrency
Correct Answer : a decentralized application
12. Blockchain solves
double spending problem
single point of failures
both
none
Correct Answer : both
13. Ethereum is ___________*
a cryptocurrency
a cryptocurrency and is programmable
a cryptocurrency and is not programmable
a miner
Correct Answer : a cryptocurrency and is programmable
14. Bitcoin uses _________________ consensus algorithm
proof of work
proof of stake
both
none
Correct Answer : proof of work
15. Which of the following is not the limitation of bitcoin?
scalability
decentralization
Hard coded limits
cryptographic assumptions
Correct Answer : decentralization
ASSIGNMENT-3
1.How does the Ethereum Virtual Machine (EVM) work and what is its purpose in the Ethereum ecosystem?
The Ethereum Virtual Machine (EVM) is a virtual machine that runs on the Ethereum blockchain. It is responsible for executing smart contracts on the Ethereum network.
The EVM operates on a stack-based architecture, which means that it uses a stack to store data and perform computations. The EVM has a set of predefined instructions, called opcodes, which are used to perform operations on the stack, such as mathematical calculations and data storage.
When a smart contract is deployed to the Ethereum network, it is translated into EVM bytecode and stored on the blockchain. When a user initiates a transaction to interact with the smart contract, the EVM retrieves the bytecode and executes it. The EVM performs the instructions in the bytecode, updating the state of the contract and any data stored on the blockchain as a result.
The EVM also keeps track of the balance of Ether (ETH) for each address on the network, and uses this information to handle the execution of transactions and contract calls. It also includes a feature called 'Gas' which is a measure of the computational effort required to execute a particular instruction or a smart contract, this is used to prevent infinite loops or other malicious code from clogging the network.
PURPOSE
The purpose of the Ethereum Virtual Machine (EVM) in the Ethereum ecosystem is to provide a secure and reliable way to execute smart contracts and decentralized applications (dApps) on the Ethereum blockchain. The EVM is a sandboxed environment that runs on all nodes in the Ethereum network and ensures that all nodes have the same state and execute the same code.
The EVM allows developers to write code in a variety of programming languages and then deploy that code to the EVM for execution. This enables the creation of decentralized applications and the ability to build decentralized autonomous organizations (DAOs) on the Ethereum blockchain.
The EVM also plays a crucial role in the functioning of the Ethereum ecosystem by handling the execution of transactions and contract calls, and keeping track of the balance of Ether (ETH) for each address on the network. The EVM also includes a feature called 'Gas' which is a measure of the computational effort required to execute a particular instruction or a smart contract, this is used to prevent infinite loops or other malicious code from clogging the network.
2.Discuss a few examples of decentralized applications currently built on the Ethereum network?
There are many decentralized applications (dApps) currently built on the Ethereum network. Here are a few examples:
Uniswap: A decentralized exchange (DEX) that allows users to trade Ethereum-based tokens without the need for a centralized intermediary.
Compound: A lending platform that allows users to lend and borrow Ethereum-based assets, with interest rates determined by supply and demand.
MakerDAO: A decentralized autonomous organization (DAO) that allows users to collateralize their Ethereum assets and borrow against them, with the value of the collateral being maintained by a system of smart contracts.
Aave: Another decentralized lending platform that allows users to lend and borrow a wide variety of Ethereum-based assets, with interest rates determined by supply and demand.
Aragon: A platform that allows users to create and manage decentralized autonomous organizations (DAOs), which can be used for a variety of purposes such as community management, fundraising, and governance.
CryptoKitties: A game that allows players to buy, sell, and breed unique digital cats, which are stored on the Ethereum blockchain as non-fungible tokens (NFTs).
Gnosis: A prediction market platform that allows users to create and participate in markets predicting the outcome of events such as sports games, elections, and more.
These are just a few examples of the many decentralized applications currently built on the Ethereum network, and new ones are being created all the time. The Ethereum ecosystem allows developers to create and deploy smart contracts, which can be used to create decentralized applications that can be used for a wide variety of purposes.
3. What are the security challenges facing decentralized applications on the Ethereum network and how can they be mitigated?
Decentralized applications (dApps) on the Ethereum network face several security challenges, some of which include:
Smart contract vulnerabilities: Smart contracts are written by humans and can contain bugs or vulnerabilities that can be exploited by malicious actors. Examples of common vulnerabilities include reentrancy attacks, where an attacker can repeatedly call a function before it has finished executing, and front-running, where an attacker can gain an advantage by seeing a transaction before it is confirmed on the blockchain.
Phishing and scamming: Decentralized applications are often targeted by phishers and scammers who try to trick users into revealing their private keys or sending their funds to a fake address.
Lack of regulation: Decentralized applications operate in a largely unregulated environment, which can make it difficult for users to know who to trust and what to expect.
Scalability: The Ethereum network can only handle a limited number of transactions per second, which can lead to delays and higher transaction fees during periods of high demand.
These challenges can be mitigated through a combination of smart contract auditing, user education, and the use of secure wallets and other security tools.
Smart contract auditing: Before deploying a smart contract, it should be thoroughly audited by a qualified security expert to ensure that it is free of vulnerabilities.
User education: Users should be educated about the risks of phishing and scamming, and how to protect their private keys and other sensitive information.
Secure wallets: Users should use secure wallets, such as hardware wallets, that protect their private keys and other sensitive information.
Scalability solutions: Ethereum has been working on solutions to improve its scalability such as Ethereum 2.0, which uses a new consensus mechanism called Proof-of-Stake (PoS) that allows for more transactions per second and reduces the energy consumption.