Lecture 4 -Looking deep into smartcontrats and other associated issues Flashcards
Name some of the things that Smart contracts enable
- Support data update and/or complex code rules.
- Responsible for processing transaction requests
- Determines transaction validity by executing business logic.
Explain how you understand smart contracts
I see smart contracts as being APIs and defining the assets/data that the APIs interact with. (Database ORM and API in one)
There are two types of smart contracts. What are they, and how do they differ?
- Installed smart contracts: install business logic on validators before network is launched.
- On-chain smart contracts: deploy business logic as a transaction committed to blockchain and then called by subsequent transactions.
- Code that defines business logic becomes part of ledger.
What’s the difference between chaincode and smart contracts?
Chaincode aims for permissioned smart contracts.
• Ethereum‘s smart contract offers a set of rules to build public smart contracts (builds for ICOs and public digital payment systems).
• Hyperledger and Ethereum are different in terms of privacy, decentralization, coding languages, involvement of cryptocurrency, and consensus mode used.
• Ethereum an edge over Hyperledger for applications requiring a payment instrument.
What is meant by “Atomic transactions”?
- A transaction cannot be partly completed (ensures transaction integrity).
- Dependencies between multiple transactions can be specified.
Because smart contracts are programs, they are subject to the following issues:
Syntax errors, Logic errors, malicious attack, coding errors, and poor design.
Furthermore:
Denial-of-Service (DoS) attack: resource become unavailable due to overloading.
If poorly designed, they can use excessive resources
What is meant by endorsement policy?
Endorsement Policies:
• Describes endorsement policies before network start operations.
• Identifies which organizations must approve as valid transactions generated by smart contract.
• Each smart contract is deployed with an endorsement policy.
• A transaction can only be considered valid if it has been endorsed according to its policy
Smart contracts in HLF is written in
Go, Javascript, or others
Smart contracts in Ethereum are (typically) written in
Solidity
What are NFTs
Unique and indivisible blockchain-based tokens introduced in late 2017.
• Every NFT is unique, and it cannot be divided or merged
• NFT improves tokenization of individual assets which is not feasible with fungible
tokens, as they cannot digitally represent uniqueness.
• NFTs were created to represent ownership over digital or physical assets.
• ERC-721 standard specifies that every NFT has a globally unique id, is transferable, and can optionally include metadata.
• Erc-20: a class of identical tokens (FT)