BLOCKCHAIN TECHNOLOGY : CHAPTER 3 : EXAM PREPARATION : SPPU PYQ

  - What is EVM?

Answer: EVM or Ethereum Virtual Machine acts as a computer or runtime environment on Ethereum Network. It's responsible for running and working of smart contracts. Smart contracts are small programs written in Ethereum's language. It helps to run applications on ethereum network.


- Describe EVM with the help of neat diagram.

1) EVM is a decentralized runtime environment that processes and executes smart contracts on the Ethereum blockchain.

2) Universal Computing: It functions like a virtual computer, providing a universal platform for executing code written in Ethereum's smart contract languages, such as Solidity.

3) Consistent Results: EVM ensures that smart contracts produce the same results for all participants across the Ethereum network, maintaining consensus on contract execution.

4) Deterministic Execution: Smart contracts on the EVM execute deterministically, meaning that the same input will always produce the same output, ensuring predictability and reliability.

5) Gas System: EVM uses a gas system to measure and allocate computational resources, preventing abuse and ensuring fair usage of the network by requiring users to pay for the computational work their contracts perform.


 -What is Gas & Gas limit?

Gas is a unit of measurement for work required to execute operations on blockchain. In Ethereum network, each operation in smart contract consumes a certain amount of gas, and users need to pay for this gas in Ether. 


Gas limit is maximum amount of gas that a user would like to spend on a particular transaction or operation. It works as a safety measure to precent excessive resource consumption. If transaction exceeds the gas limit, transaction automatically suspends and unused gas is refunded to sender.


 -What is smart contract?

A smart contract is a self-executing computer program that runs on a blockchain. It serves as a digital agreement with predefined rules and conditions. Once deployed on the blockchain, a smart contract automatically executes and enforces its terms when specific conditions coded into the contract are met. Smart contracts eliminate the need for intermediaries, providing a decentralized, secure, and transparent way for parties to engage in transactions and agreements.


-What are the advantages of smart contract? Explain any four.

Answer: 

Advantages of Smart Contract:-

1) Trustless Transactions: Smart contracts operate without relying on trust in a central authority, ensuring that the agreed-upon conditions are automatically executed.

2) Transparency and Visibility: Contract terms are visible on the blockchain, providing clarity and transparency for all participants.

3) Tamper-Resistance: Once deployed, smart contracts are secure and resistant to unauthorized modifications due to the immutable nature of blockchain.

4) Automated Execution: Smart contracts execute automatically, reducing the need for intermediaries and improving the efficiency of processes.


-What is the formula to calculate transaction fee in Etheream?

Answer: Transaction fee of Ethereum is calculated as:

Gas Price: Cost per unit of gas (in Ether)
Gas Used: Amount of work performed during execution of transaction. Measured in gas units.

-Write a short note on life cycle of smart contract 

1) Development:
- Smart contract created by a developer.
- Logic, conditions, and functions defined.
2) Compilation:
- Code compiled into bytecode.
- Prepares the contract for execution on the blockchain.
3) Deployment:
- Contract deployed to the blockchain.
- Receives a unique address and becomes accessible.
4) Interaction:
-Users or other contracts interact with the deployed smart contract.
-Invoking functions by sending transactions.
5) Execution:
-Smart contract autonomously executes its predefined functions.
-Performs tasks like transferring assets or updating data.
6) Termination or Continuation:
-Smart contract may have programmed termination conditions.
-Some contracts designed to remain active indefinitely.