Instructor: Katya Malinova
Course : F741 Fall 2023
Application: DeFi lending
borrowing/lending
on-chain ability to exchange arbitrary value
Idea:
Sidebar: what is a DAO?
1 ETH
(1 ETH = $1,577)
(Feb 15, 2023)
\(\approx\) $1,500
\(\vdots\)
1,500 DAI
(1 DAI = $1)
formally: this smart contract is a collateralized debt position (CDP)
fractional collateral \(\to\) collateralization factor \(=\) 150%
total collateral = $1,500
maximum loan = $1000
overcollateralization = $500
actual loan (example) = $500
buffer = $500
ETH \(\nearrow\) $2,000
value of ETH collateral = $2,000
maximum loan = $2,000/150%=$1,333
total collateral = $2,000
maximum loan = $1,333
overcollateralization = $667
actual loan (example) = $500
buffer = $500
overcollateralization = $667
new loan capacity= $333
ETH \(\searrow\) $750
value of ETH collateral = $750
maximum loan = $750/150%=$500
total collateral = $750
maximum loan = $500
overcollateralization = $250
actual loan (example) = $500
buffer = $0
for reference: former value of collateral
ETH \(\searrow\) $600
value of ETH collateral = $600
maximum loan = $600/150%=$400
total collateral = $600
maximum loan = $400
required overcollateralization = $200
actual loan (example) = $500
buffer = -$100
for reference: former value of collateral
\(\Rightarrow\) triggering of liquidation auction by "keeper"
sell 3.33 ETH=$500=500 DAI
repay $500=500 DAI loan
retain incentive
return remainding ETH to vault owner
\(\Rightarrow\) all relies on behavioral assumptions
\(\Rightarrow\) But: there are also real incentives & mechanisms
borrowers of DAI need to pay interest \(\to\) stability fee
DSR paid on "locked" DAI
total amount of debt (or DAI) outstanding is limited
Sidebar: how is this decided?
\(\to\) special "governance" token MKR
Source: daistats.com (Oct 27, 2021)
Source: daistats.com (Oct 26, 2022)
The Problem:
The Solution:
Note: In May 2021, ETH prices dropped again by >30% but no drama in DAI
Interest rates influenced by the FED, access to loan products controlled by regulation and institutional policies
MakerDAO platform is openly controlled by the MKR holders.
Difficulty of obtaining loans for large majority of population
Open ability to take out DAI liquidity against an overcollateralized position in any supported token.
Costs of time and money to acquire a loan
Instant liquidity with minimal transaction costs.
Can't seamlessly use the same USD (esp. outside the US)
DAI, a permissionless USD-tracking stablecoin backed by cryptocurrency. DAI can be used in any smart contract or DeFi application.
interoperability
inefficiency
centralized control
limited access
opacity
Unclear collateralization of lending institutions.
Transparent collateralization ratios of vaults visible to entire ecosystem
TradFi
MakerDAO
MakerDAO bought another $700 million U.S. Treasurys, taking the total to $1.2 billion [...]
[... ]to diversify the assets backing the $4.5 billion dollar-pegged stablecoin
Application: DeFi lending:
Compound (and Aave)
Fundamentally, what does a bank do?
And how is this done?
on blockchain
Nothing new is minted
Example 1
Example 2
Example 3
In Compound
translated to c-tokens (example, can be different conversion)
new deposit
1,000 DAI
100 cDAI
500 DAI
add 50 new cDAI
In Compound
translated to c-tokens
new deposit
1,000 DAI
150 cDAI
500 DAI
1 year later: 10% interest on compound
150 DAI
(same cDAI, each cDAI is worth more)
interest
common theme in DeFi: jumping between dApps
Source: Harvey, Ramachandran, and Santoro (2020)
The Flow of Event: Normal Times
The Flow of Event: Collateral Liquidation
1. flash-borrow DAI
5. repay DAI
3. receive the collateral (ETH) at a discount
4. convert ETH to DAI
2. liquidate ETH-collaterilized loan with DAI
Loan liquidation opportunity
either all of these execute or none -> true arbitrage
Stopped here in lecture 4
Staking: One word, multiple meanings
Very loosely: locking in the funds
Staking as a Validator
Similar rule in Canada: look up "Pacific Coin test"
When is it a security (SEC point of view)?
In the case of Howey, the buyers of the Florida citrus groves saw the transactions as valuable primarily because the labor and expertise were provided by others. Buyers only needed to invest capital to access an income stream.
Staking More Broadly & Yield Farming
Staking in DeFi
Staking in DeFi: Why?
"Yield farming"
Many automated DeFi products are emerging
Obvious Smart Contract Application: Automate Investment Strategies
"yield aggregator:" push capital where rate of return is highest
Caution: "yield farming" has its risks ....
Odd Lots: SBF and Matt Levine on How to Make Money in Crypto (podcast, April 25, 2022)
If too pressed for time to listen, start at minute 21:17, or check out:
And yet: staking, lending, and supplying liquidity on DEXes - at least in theory - allows (non-expert) investors to passivley participate in and benefit from the promise/growth of cryptoassets
For a more rigorous analysis (not for F741), see Augustin, Chen-Zhang, and Shin, Donghwa, "Reaching for Yield in Decentralized Financial Markets"
https://ssrn.com/abstract=4063228
"investors chase farms with high yields and that [...] farms with the highest headline rates record the most negative risk-adjusted returns"
@katyamalinova
malinovk@mcmaster.ca
slides.com/kmalinova
https://sites.google.com/site/katyamalinova/