Ethereum Developer Ethereum Token Standards and DeFi 1 β Questions and Answers
Question 1: What EIP defines the ERC-20 fungible token standard?
- EIP-20 (Correct answer)
- EIP-721
- EIP-1155
- EIP-2612
Correct answer: EIP-20
EIP-20 (commonly called ERC-20) defines the standard interface for fungible tokens on Ethereum.
Question 2: What function must an ERC-20 contract implement to allow a spender to transfer tokens on behalf of an owner?
- approve() (Correct answer)
- transfer()
- allowance()
- mint()
Correct answer: approve()
The `approve()` function grants a spender permission to transfer a specified amount of tokens on the owner's behalf.
Question 3: What is the key distinction between ERC-20 and ERC-721 tokens?
- ERC-721 tokens are non-fungible and each has a unique ID (Correct answer)
- ERC-721 tokens have higher decimal precision
- ERC-20 tokens represent ownership of NFTs
- ERC-721 allows batch transfers by default
Correct answer: ERC-721 tokens are non-fungible and each has a unique ID
ERC-721 tokens are non-fungible, meaning each token has a unique identifier and cannot be exchanged 1:1 with another.
Question 4: What does AMM stand for in the context of DeFi?
- Automated Market Maker (Correct answer)
- Autonomous Minting Mechanism
- Aggregated Margin Model
- Asset Management Module
Correct answer: Automated Market Maker
An Automated Market Maker (AMM) uses liquidity pools and mathematical formulas to enable permissionless token swaps without an order book.
Question 5: What formula does Uniswap v2 use to maintain liquidity pool balance?
- x * y = k (Correct answer)
- x + y = k
- x^2 + y^2 = k
- x / y = k
Correct answer: x * y = k
Uniswap v2 uses the constant product formula `x * y = k`, where x and y are token reserves and k is a constant.
Question 6: What is a flash loan in DeFi?
- An uncollateralized loan that must be borrowed and repaid within a single transaction (Correct answer)
- A loan with a very low interest rate
- A loan backed by NFT collateral
- A loan that expires after one block
Correct answer: An uncollateralized loan that must be borrowed and repaid within a single transaction
Flash loans allow users to borrow any amount without collateral as long as the loan is repaid within the same transaction block.
What EIP defines the ERC-20 fungible token standard?