CCE DeFi and Decentralized Applications 4 — Questions and Answers
Question 1: In DeFi, what is a 'flash loan attack' most commonly used to exploit?
- Price oracle manipulation within a single transaction (Correct answer)
- Draining liquidity from cold wallets
- Bypassing KYC requirements on DEXs
- Forking a blockchain to reverse prior transactions
Correct answer: Price oracle manipulation within a single transaction
Flash loan attacks typically borrow large sums to manipulate on-chain price oracles and exploit arbitrage or collateral vulnerabilities within one atomic transaction.
Question 2: Which mechanism do Automated Market Makers (AMMs) use to determine token swap prices?
- Order book matching between buyers and sellers
- A constant product formula (x * y = k) (Correct answer)
- Off-chain price feeds submitted by validators
- Dutch auction pricing updated each block
Correct answer: A constant product formula (x * y = k)
AMMs like Uniswap v2 use the constant product formula x * y = k, where the product of reserve quantities remains constant after each trade.
Question 3: What is 'impermanent loss' in the context of liquidity provision?
- Permanent loss of funds due to a smart contract exploit
- The gas fee cost of depositing into a liquidity pool
- The opportunity cost when pooled asset prices diverge from the deposit ratio (Correct answer)
- Slippage incurred on large trades against a shallow pool
Correct answer: The opportunity cost when pooled asset prices diverge from the deposit ratio
Impermanent loss occurs when the price ratio of deposited assets changes after deposit, leaving LPs with less value than if they had simply held the assets.
Question 4: In Compound Finance, what is a 'cToken'?
- A governance token used to vote on protocol upgrades
- An interest-bearing receipt token representing a deposited asset (Correct answer)
- A collateral token locked during liquidation
- A wrapped version of ETH used for gas payments
Correct answer: An interest-bearing receipt token representing a deposited asset
cTokens (e.g., cDAI, cETH) are minted when users supply assets to Compound and accrue interest over time by appreciating in value relative to the underlying asset.
Question 5: What distinguishes a 'liquidity bootstrapping pool' (LBP) from a standard AMM pool?
- LBPs use order books instead of bonding curves
- LBPs dynamically shift token weights over time to reduce initial price volatility (Correct answer)
- LBPs require KYC verification for all participants
- LBPs are exclusively used for stablecoin swaps
Correct answer: LBPs dynamically shift token weights over time to reduce initial price volatility
LBPs (popularized by Balancer) start with a high project-token weight and shift it over time, creating natural downward price pressure that discourages bots and enables fairer distribution.
Question 6: Which Ethereum standard is most commonly used for fungible DeFi tokens such as governance or reward tokens?
- ERC-721
- ERC-1155
- ERC-20 (Correct answer)
- ERC-4626
Correct answer: ERC-20
ERC-20 is the standard interface for fungible tokens on Ethereum, used by virtually all DeFi governance, reward, and utility tokens.
Question 7: What is the primary role of a 'keeper' in decentralized protocols like MakerDAO or Chainlink?
- To store private keys for multi-sig wallets
- To perform automated on-chain actions such as liquidations or oracle updates for incentives (Correct answer)
- To audit smart contract code before deployment
- To bridge assets between Layer 1 and Layer 2 networks
Correct answer: To perform automated on-chain actions such as liquidations or oracle updates for incentives
Keepers are bots or participants that trigger protocol functions (e.g., liquidating undercollateralized vaults) in exchange for a reward, maintaining system health.
In DeFi, what is a 'flash loan attack' most commonly used to exploit?