info@cyberlawacademy.com | +91-XXXXXXXXXX
Final Assessment

Module 4: Smart Contracts & DeFi

Comprehensive assessment covering smart contracts, Solidity, security, DeFi, NFTs, and DAOs. Score 70% or above to earn your Module 4 completion certificate.

[Q] 50 Questions [T] ~45 minutes [P] Pass: 70% [C] Certificate on Pass

Instructions

  • Answer all 50 questions - no negative marking
  • Questions cover: Smart Contracts, Solidity, Security, DeFi, Risk, NFTs, DAOs
  • Click on an option to select your answer
  • After submission, you will see explanations for each question
  • Score 35 or more (70%) to pass and earn your certificate
Question 0 of 50 answered
Q1 Smart Contract Fundamentals
Who coined the term "smart contract" and in what year?
Explanation
Nick Szabo coined the term "smart contract" in 1994, predating blockchain technology by over a decade. He envisioned embedding contractual clauses into hardware and software.
Q2 Smart Contract Fundamentals
What is the "oracle problem" in smart contracts?
Explanation
The oracle problem refers to the fact that blockchains are isolated systems that cannot natively access external data. Oracles bridge this gap but introduce trust assumptions.
Q3 Smart Contract Fundamentals
Which statement about smart contract legal enforceability is most accurate?
Explanation
Traditional legal systems still apply to smart contracts. Code may execute perfectly but still violate laws, be based on fraud, or require external remedies. "Code is law" is a philosophy, not a legal reality.
Q4 Smart Contract Fundamentals
What is a Ricardian contract?
Explanation
A Ricardian contract is a document that is simultaneously human-readable (natural language), machine-readable (parseable markup), and cryptographically signed, bridging legal prose and executable code.
Q5 Smart Contract Fundamentals
What is "gas" in Ethereum?
Explanation
Gas is a unit measuring the computational effort required to execute operations on Ethereum. Users pay gas fees (in ETH) to compensate validators for processing transactions.
Q6 Smart Contract Fundamentals
Which oracle type aggregates data from multiple independent sources?
Explanation
Decentralized oracles like Chainlink and Band Protocol aggregate data from multiple independent nodes, distributing trust rather than relying on a single source.
Q7 Smart Contract Fundamentals
Which jurisdiction was the first US state to recognize DAOs as LLCs?
Explanation
Wyoming was the first US state to recognize DAOs as LLCs in 2021, providing limited liability while allowing algorithmic governance.
Q8 Solidity Basics
In Solidity, what does the "private" visibility modifier mean?
Explanation
"Private" does NOT mean secret. All blockchain data is publicly readable. "Private" only restricts which contracts can call a function - the underlying data is still visible to anyone reading the blockchain.
Q9 Solidity Basics
What is the significance of Solidity version 0.8.0?
Explanation
Solidity 0.8.0 introduced built-in overflow/underflow checks. Prior versions allowed integers to wrap around silently, causing numerous exploits. Always verify contracts use 0.8+ or SafeMath.
Q10 Solidity Basics
What does "msg.sender" represent in Solidity?
Explanation
msg.sender is the address that called the current function. This differs from tx.origin (the original transaction sender), which should be avoided for authentication due to phishing vulnerabilities.
Q11 Solidity Basics
Which ERC standard defines the interface for fungible tokens?
Explanation
ERC-20 is the standard for fungible tokens (interchangeable). ERC-721 is for NFTs (non-fungible), ERC-1155 supports both, and ERC-2981 is for NFT royalties.
Q12 Solidity Basics
What does a "view" function modifier indicate?
Explanation
A view function can only read state, not modify it. View functions are free when called externally (no gas cost) since they don't change blockchain state.
Q13 Solidity Basics
Which storage location is most expensive in terms of gas?
Explanation
Storage is the most expensive (20,000 gas for new slot) because it's permanent on-chain data. Memory is temporary and cheap, calldata is read-only and cheapest.
Q14 Solidity Basics
Why is using tx.origin for authentication considered dangerous?
Explanation
tx.origin returns the original sender, not the immediate caller. If a user interacts with a malicious contract, that contract can call a target contract while tx.origin still shows the user, enabling phishing attacks.
Q15 Security & Auditing
What vulnerability caused The DAO hack in 2016?
Explanation
The DAO hack exploited a reentrancy vulnerability where an attacker could recursively call the withdraw function before the balance was updated, draining $60M. This led to the Ethereum hard fork.
Q16 Security & Auditing
What pattern prevents reentrancy attacks?
Explanation
The Checks-Effects-Interactions pattern prevents reentrancy by: 1) checking conditions, 2) updating state, 3) making external calls last. This ensures state is updated before any external call can re-enter.
Q17 Security & Auditing
Which statement about smart contract audits is correct?
Explanation
Audits are point-in-time assessments with limited scope. Audited contracts have been hacked (e.g., Euler Finance, Wormhole). Multiple audits from different firms provide better coverage but cannot guarantee security.
Q18 Security & Auditing
What is formal verification in the context of smart contracts?
Explanation
Formal verification uses mathematical proofs to verify that a program satisfies a formal specification. Unlike testing (which shows bugs exist), formal verification proves their absence for specified properties.
Q19 Security & Auditing
What is a flash loan attack?
Explanation
Flash loan attacks use uncollateralized loans (borrowed and repaid in one transaction) to temporarily acquire massive capital for price manipulation or governance attacks.
Q20 Security & Auditing
Scenario
A contract allows users to withdraw funds. The code sends ETH to the user BEFORE updating their balance to zero.
What vulnerability does this code have?
Explanation
This is a classic reentrancy vulnerability. The external call (sending ETH) happens before state update. A malicious contract could re-enter and withdraw again before the balance is zeroed.
Q21 Security & Auditing
What severity rating would a vulnerability allowing unlimited fund withdrawal receive?
Explanation
Critical severity is for direct loss of funds or protocol takeover. Unlimited withdrawal capability is the most severe type of vulnerability.
Q22 Security & Auditing
What type of oracle is most resistant to manipulation?
Explanation
TWAP oracles average prices over time, making them resistant to flash loan manipulation. Combining multiple sources further reduces manipulation risk.
Q23 DeFi Protocols
What is the constant product formula used by Uniswap v2?
Explanation
Uniswap v2 uses the x * y = k formula where x and y are token quantities and k is a constant. This creates automatic price discovery based on supply and demand.
Q24 DeFi Protocols
What happens when a borrower's collateral falls below the liquidation threshold in DeFi lending?
Explanation
In DeFi lending, liquidators repay part of the debt and claim collateral at a discount when positions become undercollateralized. This protects the protocol from bad debt.
Q25 DeFi Protocols
What is impermanent loss?
Explanation
Impermanent loss occurs when token prices diverge after providing liquidity. LPs end up with more of the depreciated token and less of the appreciated one compared to simply holding.
Q26 DeFi Protocols
Which stablecoin is crypto-collateralized and governed by MakerDAO?
Explanation
DAI is a decentralized, crypto-collateralized stablecoin governed by MakerDAO. Users deposit collateral into Vaults and mint DAI. USDC, USDT, and BUSD are fiat-backed.
Q27 DeFi Protocols
What caused the Terra/Luna collapse in May 2022?
Explanation
UST collapsed due to a death spiral in its algorithmic mechanism. When UST lost its peg, LUNA hyperinflated as the algorithm tried to restore the peg, destroying $40B+ in value.
Q28 DeFi Protocols
What is a flash loan?
Explanation
A flash loan is an uncollateralized loan that must be borrowed and repaid within a single transaction. If not repaid, the entire transaction reverts as if it never happened.
Q29 DeFi Protocols
What does "TVL" stand for in DeFi metrics?
Explanation
TVL (Total Value Locked) measures the total value of assets deposited in a DeFi protocol. It's a key metric for assessing protocol adoption and risk.
Q30 DeFi Protocols
What is "composability" in DeFi often called?
Explanation
DeFi composability is often called "Money Legos" because protocols can be combined like building blocks. A single transaction can interact with multiple protocols.
Q31 DeFi Risk Assessment
What is a "rug pull" in DeFi?
Explanation
A rug pull is a scam where developers abandon a project and steal investor funds, typically by draining liquidity pools, minting unlimited tokens, or using hidden contract functions.
Q32 DeFi Risk Assessment
Which is NOT a red flag for potential rug pulls?
Explanation
Multiple audits from reputable firms is a positive indicator, not a red flag. Anonymous teams, unlocked liquidity, and unrealistic APY promises are all warning signs.
Q33 DeFi Risk Assessment
Scenario
The Mango Markets protocol lost $114M in October 2022 when an attacker manipulated market prices.
What type of risk does this illustrate?
Explanation
Mango Markets was exploited through oracle manipulation. The attacker pumped MNGO price, used inflated collateral value to borrow $114M, then couldn't repay when price normalized.
Q34 DeFi Risk Assessment
What is "composability risk" in DeFi?
Explanation
Composability risk refers to cascading failures across interconnected DeFi protocols. A failure in one protocol can trigger liquidations or failures in dependent protocols.
Q35 DeFi Risk Assessment
What is a "honeypot" in the context of DeFi scams?
Explanation
A honeypot is a scam token that lets users buy but blocks them from selling. The code contains restrictions that only allow the developer to sell.
Q36 DeFi Risk Assessment
Which tool is commonly used to check if liquidity is locked?
Explanation
Dextools and block explorers can verify on-chain if LP tokens are locked in a timelock contract, which is crucial for rug pull prevention analysis.
Q37 NFTs
What is the key difference between ERC-721 and ERC-1155?
Explanation
ERC-1155 is a multi-token standard supporting both fungible and non-fungible tokens in a single contract, with optimized batch transfers. ERC-721 only supports non-fungible tokens.
Q38 NFTs
What do NFT buyers typically NOT receive when purchasing an NFT?
Explanation
NFT buyers typically do NOT receive copyright to the underlying artwork. They get token ownership and usage rights per the license, but the creator usually retains IP rights.
Q39 NFTs
Which NFT project grants holders commercial rights to their owned images?
Explanation
Bored Ape Yacht Club grants holders broad commercial rights, allowing them to create and sell merchandise, media, and derivative works using their ape's image.
Q40 NFTs
Where is NFT artwork typically stored?
Explanation
Most NFT art is stored off-chain (IPFS, Arweave, or centralized servers). The NFT only contains a URL or hash pointing to the content. If storage fails, the NFT may point to nothing.
Q41 NFTs
What legal case established trademark protection for luxury goods against NFT reproductions?
Explanation
In Hermes v. Rothschild (2023), Hermes won against an artist selling "MetaBirkin" NFTs depicting the Birkin bag, establishing trademark protection extends to digital goods.
Q42 NFTs
Why are NFT royalties difficult to enforce?
Explanation
NFT royalties are marketplace-enforced, not blockchain-enforced. If buyers sell through non-compliant marketplaces, creators receive nothing. This is a contractual right, not a property right.
Q43 NFTs
Which type of NFT is most likely to be classified as a security under the Howey test?
Explanation
Revenue-sharing NFTs with passive income expectations are most likely securities - they involve investment of money, common enterprise, expectation of profit, and reliance on others' efforts.
Q44 NFTs
What was the first NFT-specific SEC enforcement action?
Explanation
In September 2023, the SEC charged Impact Theory for unregistered securities offering through their "Founder's Keys" NFTs, citing promises of future benefits and profit expectations.
Q45 DAOs
What is the primary legal risk for an unincorporated DAO?
Explanation
Without a legal wrapper, a DAO may be treated as a general partnership, exposing all token holders to unlimited personal liability for the organization's debts and obligations.
Q46 DAOs
What governance attack drained $182M from Beanstalk in 2022?
Explanation
Beanstalk was exploited via flash loan governance attack. The attacker borrowed enough tokens to pass a malicious proposal in 13 seconds, draining $182M without a timelock delay.
Q47 DAOs
What legal wrapper does a Cayman Islands Foundation Company provide?
Explanation
A Cayman Islands Foundation Company is a non-profit foundation with no members, governed by directors. Popular for protocol DAOs due to tax efficiency and flexible structure.
Q48 DAOs
In CFTC v. Ooki DAO, how did the regulator serve the DAO?
Explanation
The CFTC served Ooki DAO by posting in the governance forum and Discord, and the court allowed this service method. This set precedent for how regulators can pursue DAOs.
Q49 DAOs
What is "voter apathy" in DAO governance?
Explanation
Voter apathy refers to low participation rates in DAO governance. Many DAOs see less than 5% of token holders voting, concentrating power in a small group of active participants.
Q50 DAOs
Which tool is most commonly used for multi-signature treasury management in DAOs?
Explanation
Gnosis Safe is the dominant multi-signature wallet for DAO treasury management, requiring multiple key holders (e.g., 4-of-7) to approve transactions.
[*]
Your Score
0/50
0%
Correct
0
Incorrect
0
Pass Mark
35
Status
--