Alternative Lending Models - MakerDAO and Compound
Learning Objectives
Explain MakerDAO's CDP/Vault model including how DAI is minted, what stability fees are, and how the system maintains the peg
Describe Compound's cToken architecture and understand why it became the template for countless DeFi forks
Compare three lending paradigms (Aave, Maker, Compound) across security, capital efficiency, complexity, and decentralization
Evaluate trade-offs between approaches to determine which might suit different use cases or ecosystems
Identify design principles applicable to XRPL lending protocols regardless of which model they follow
DeFi lending emerged from a simple question: How do you let people borrow without trusting them to repay?
Three protocols answered differently:
MakerDAO (2017): "Don't lend from a pool—let users mint their own stablecoins against collateral. The protocol issues debt directly."
Compound (2018): "Create simple money markets where anyone can supply or borrow. Make tokens that represent pool shares. Keep it minimal."
Aave (2020): "Build on Compound's foundation but add features—flash loans, variable/stable rates, more assets. Optimize for functionality."
Each approach survived, each commands billions in TVL, and each has distinct advantages and vulnerabilities. There's no "best" design—only trade-offs appropriate to different goals.
For XRPL, the question isn't "Which should we copy?" but "What can we learn from each?"
MakerDAO doesn't facilitate lending between users—it creates money:
MAKERDAO ARCHITECTURE:
Traditional Lending (Aave/Compound):
├── Lenders deposit USDC
├── Borrowers borrow USDC
├── Interest flows from borrowers to lenders
├── Protocol facilitates the match
└── Pool has finite USDC supply
MakerDAO Model:
├── No lenders (in traditional sense)
├── Users deposit collateral (ETH, etc.)
├── Users "mint" DAI against collateral
├── DAI is created from nothing (protocol debt)
├── Users pay "stability fee" (interest to protocol)
└── DAI supply expands with demand
KEY DIFFERENCE:
├── Aave: "Borrow existing USDC from the pool"
├── Maker: "Create new DAI from your collateral"
└── Maker creates money; Aave redistributes it
How users interact with MakerDAO:
VAULT LIFECYCLE:
OPENING A VAULT:
Choose Collateral Type
Deposit Collateral
Mint DAI
VAULT PARAMETERS (ETH-A Example):
Collateralization Ratio: 145%
├── Must maintain 145% collateral/debt
├── $14,500 collateral needed for $10,000 DAI
└── More conservative than typical lending (125%)
Stability Fee: ~5% annually (variable)
├── Interest paid to protocol (not lenders)
├── Accrues continuously
├── Paid in DAI when closing vault
└── Governance adjusts rate
Liquidation Penalty: 13%
├── Higher than Aave's typical 5%
├── Covers auction costs
├── More punitive than pool-based lending
└── Incentivizes careful management
EXAMPLE VAULT:
Day 1:
├── Deposit 10 ETH at $2,000 = $20,000 collateral
├── Mint 10,000 DAI
├── Collateralization: 200%
├── Stability fee: 5% APY
└── Position: Healthy
Day 180:
├── ETH still $2,000
├── Stability fee accrued: ~$250
├── Total debt: 10,250 DAI
├── Must repay 10,250 DAI to close vault
└── Plus retrieve 10 ETH collateral
CLOSING A VAULT:
- Acquire DAI (buy on market or use existing)
- Repay full debt (principal + stability fees)
- DAI is burned (destroyed, not returned to pool)
- Collateral unlocked and returned
- Vault closed
DAI targets $1.00 but isn't backed by dollars:
DAI PEG MECHANISMS:
SUPPLY ADJUSTMENT:
DAI Above $1.00:
├── Minting DAI is attractive (sell above par)
├── More people open Vaults
├── DAI supply increases
├── Price pressure downward
└── Returns toward $1.00
DAI Below $1.00:
├── Closing Vaults is attractive (repay below par)
├── Users buy cheap DAI to repay
├── DAI supply decreases (burned on repayment)
├── Price pressure upward
└── Returns toward $1.00
STABILITY FEE ADJUSTMENT:
If DAI above $1.00:
├── Lower stability fee
├── Cheaper to maintain Vaults
├── More DAI minted
├── Supply increases, price falls
└── Governance tool for peg
If DAI below $1.00:
├── Raise stability fee
├── Expensive to maintain Vaults
├── More Vaults closed (DAI burned)
├── Supply decreases, price rises
└── Governance tool for peg
DAI SAVINGS RATE (DSR):
What It Is:
├── Interest paid to DAI holders
├── Lock DAI in DSR contract
├── Earn yield (currently ~5%)
├── Governance-set rate
└── Demand lever for DAI
How It Helps:
├── High DSR = More demand for DAI
├── More demand = Price support at $1.00
├── Creates utility beyond just being stablecoin
└── Competes with other yield sources
HISTORICAL PEG PERFORMANCE:
Normal Conditions:
├── DAI trades $0.998-$1.002
├── Tight peg, arbitrage maintains it
└── Works as designed
Stress Conditions:
├── March 2020: DAI hit $1.12 (supply shortage)
├── June 2022: DAI hit $0.97 briefly
├── Generally resilient but not perfect
└── Not algorithmic collapse like Terra
```
Unique risks in the CDP model:
MAKERDAO-SPECIFIC RISKS:
1. ORACLE RISK (Heightened)
1. COLLATERAL QUALITY RISK
1. GOVERNANCE RISK
1. LIQUIDATION AUCTION RISK
1. PEG RISK
MAKERDAO'S BUFFERS:
Surplus Buffer:
├── Protocol revenue accumulates here
├── First defense against bad debt
├── Currently ~$70M+
└── Governance controls use
MKR Token:
├── Ultimate backstop
├── If bad debt exceeds surplus
├── New MKR minted and sold
├── Dilutes MKR holders
└── Aligns MKR holder incentives with risk management
---
Compound's design prioritizes straightforwardness:
COMPOUND ARCHITECTURE:
Design Philosophy:
├── Minimal viable lending protocol
├── Easy to understand
├── Easy to fork
├── Maximum composability
└── Less is more
CORE COMPONENTS:
Money Markets (One per Asset):
cTokens (Receipt Tokens):
Interest Rate Model:
Collateral Factor:
How cTokens differ from aTokens:
cTOKEN VS aTOKEN:
aTOKEN (Aave):
├── Rebasing: Balance increases over time
├── 1 aUSDC always = 1 USDC (plus accrued interest)
├── Your balance number grows
├── Interest visible in balance change
└── More intuitive for users
cTOKEN (Compound):
├── Exchange rate model: cToken/underlying ratio changes
├── 1 cUSDC = 1.05 USDC (for example)
├── Your cToken balance stays constant
├── Exchange rate increases with interest
└── Less intuitive but simpler technically
EXAMPLE:
Day 1 with Aave:
├── Deposit 1,000 USDC
├── Receive 1,000 aUSDC
├── Balance: 1,000 aUSDC
Day 365 (5% APY) with Aave:
├── Balance: 1,050 aUSDC
├── Value: 1,050 USDC
└── Balance changed
Day 1 with Compound:
├── Deposit 1,000 USDC
├── Exchange rate: 0.02 (50 cUSDC per USDC)
├── Receive: 50,000 cUSDC
├── Balance: 50,000 cUSDC
Day 365 (5% APY) with Compound:
├── Balance: 50,000 cUSDC (unchanged)
├── Exchange rate: 0.021 (47.62 cUSDC per USDC)
├── Value: 50,000 / 47.62 = 1,050 USDC
└── Exchange rate changed, not balance
WHY THIS MATTERS:
For Composability:
├── cToken balance is constant
├── Easier for other protocols to integrate
├── No rebasing complications
└── Simple ERC-20 behavior
For User Experience:
├── aToken model more intuitive
├── "My balance grew" is clearer
├── cToken requires exchange rate lookup
└── Different mental model
```
From COMP token to decentralization:
COMPOUND GOVERNANCE:
COMP TOKEN:
├── Launched June 2020
├── Distributed to users (liquidity mining)
├── Governance rights over protocol
├── One of first successful "DeFi summer" tokens
└── Changed industry trajectory
GOVERNANCE STRUCTURE:
Proposal Creation:
├── Requires 25,000 COMP (significant barrier)
├── Or delegation from large holders
├── Prevents spam proposals
└── Limits participation
Voting:
├── 1 COMP = 1 vote
├── Delegation possible
├── 4% quorum required
├── Simple majority wins
Timelock:
├── 2-day delay before execution
├── Security measure
├── Time to detect issues
└── Emergency guardian can cancel
GOVERNANCE ACHIEVEMENTS:
Decentralization Progress:
├── Community-led parameter changes
├── Treasury management votes
├── New asset listings
└── Protocol upgrades
Governance Challenges:
├── Low participation rates
├── Large holder concentration
├── Technical proposals hard to evaluate
├── Some controversial decisions
└── Ongoing evolution
COMPOUND III (Comet):
Major Upgrade (2022):
├── Single borrowable asset per market
├── Multiple collateral types per market
├── Improved capital efficiency
├── Simpler interest model
└── Different architecture than V2
Why Change:
├── V2 had inefficiencies
├── New design more secure
├── Better capital efficiency
├── Lessons learned applied
└── Innovation continues
```
Compound is the most-forked DeFi protocol:
COMPOUND FORK ECOSYSTEM:
Why Forkable:
├── Clean, minimal code
├── Well-documented
├── Battle-tested
├── Permissive license
├── Easy to understand
└── Proven to work
NOTABLE FORKS:
Venus (BSC):
├── Compound fork on Binance Smart Chain
├── Added VAI stablecoin
├── Billions in TVL at peak
├── Had security issues
└── Lesson: Forks inherit bugs too
Cream Finance (Multi-chain):
├── Compound fork with more assets
├── Aggressive listing policy
├── Multiple exploits ($130M+ lost)
├── Lesson: More assets = more risk
└── Protocol effectively dead
Benqi (Avalanche):
├── Compound fork on Avalanche
├── Successful deployment
├── Adapted to local ecosystem
└── Shows forks can succeed
Rari Fuse:
├── Permissionless Compound pools
├── Anyone could create pool
├── Exploited for $80M+
├── Lesson: Permissionless = risky
└── Shutdown
LESSONS FROM FORKS:
Security Inheritance:
├── Forks get Compound's security baseline
├── But modifications can introduce bugs
├── Audits still necessary
└── Many forks skip this
Parameter Risk:
├── Compound's parameters tuned over years
├── Forks often use aggressive parameters
├── Leads to exploits and bad debt
└── Conservative parameters matter
Team Quality:
├── Compound has elite team
├── Forks vary wildly in competence
├── Original team maintains, improves
├── Fork teams may abandon
└── Team matters more than code
IMPLICATION FOR XRPL:
If XRPL lending launches:
├── Might be Compound architecture
├── Proven, simple, forkable
├── But must adapt to Hooks
├── And set conservative parameters
└── Team quality will determine success
---
Evaluating all three approaches:
COMPREHENSIVE COMPARISON:
| MakerDAO | Compound | Aave
────────────────────────────────────────────────────────
ARCHITECTURE
Primary Product | Stablecoin | Money Mkts | Money Mkts
Token Mechanism | Mint/Burn | cTokens | aTokens
Borrowable Assets | DAI only | Many | Many
Collateral Types | 20+ | 15+ | 30+
COMPLEXITY
Code Complexity | High | Low | Medium-High
User Complexity | Medium | Low | Medium
Integration Ease | Medium | High | Medium
CAPITAL EFFICIENCY
Typical LTV | 50-65% | 75-80% | 75-85%
Flash Loans | Yes (DAI) | No (V2) | Yes
E-Mode Equivalent | No | No | Yes
RISK PROFILE
Liquidation Style | Auction | Instant | Instant
Liquidation Penalty | 13% | 8% | 5-10%
Oracle Dependency | Critical | Critical | Critical
Smart Contract Risk | Medium | Low | Medium
DECENTRALIZATION
Token Governance | MKR | COMP | AAVE
Upgrade Process | Governance | Governance | Governance
Centralization Risk | Medium | Medium | Medium
ECONOMICS
Revenue Model | Stability Fee| Reserve | Reserve
Sustainability | Yes | Yes | Yes
Token Value Accrual | MKR burn | Treasury | Safety Module
SCALE (2024-2025)
TVL | $5-8B | $2-4B | $10-15B
Volume | High | Medium | Highest
Different situations favor different designs:
MAKER EXCELS WHEN:
Stablecoin Focus:
├── Primary goal is stable asset creation
├── DAI specifically needed
├── Don't need to borrow other assets
└── Decentralized stablecoin matters
Long-Term Borrowing:
├── Stability fee is known (stable rates)
├── No variable rate volatility
├── Can plan costs
└── Patient capital
Decentralization Priority:
├── DAI is most decentralized major stable
├── No USDC/USDT centralization concerns
├── Protocol governance is mature
└── Ideology alignment
COMPOUND EXCELS WHEN:
Simplicity Priority:
├── Just want basic lending/borrowing
├── Don't need advanced features
├── Easy to understand
└── Lower learning curve
Developer Focus:
├── Building on top of lending
├── Well-documented integration
├── Predictable behavior
├── Extensive fork ecosystem
└── Known code patterns
Conservative Approach:
├── Proven, older codebase
├── Fewer features = fewer bugs
├── Long track record
└── Predictable behavior
AAVE EXCELS WHEN:
Feature Needs:
├── Flash loans required
├── E-Mode for correlated assets
├── Multiple rate options wanted
├── Advanced strategies
└── Maximum functionality
Scale Priority:
├── Deepest liquidity
├── Most asset options
├── Cross-chain presence
├── Professional ecosystem
└── Industry standard
Active Management:
├── Want to optimize positions
├── Willing to learn complexity
├── Value flexibility over simplicity
└── Sophisticated user
```
Understanding the underlying philosophies:
MAKER'S PHILOSOPHY:
"We Create Money"
Strengths:
├── Protocol doesn't depend on lenders
├── Can scale DAI supply with demand
├── Revenue accrues to protocol directly
├── Pioneered decentralized stablecoins
└── Unique value proposition
Weaknesses:
├── Limited to DAI borrowing
├── Complex for users to understand
├── Liquidation auctions can fail
├── Peg maintenance requires active governance
└── Centralization creep (USDC collateral)
COMPOUND'S PHILOSOPHY:
"Simple Is Better"
Strengths:
├── Easy to understand and audit
├── Highly forkable (ecosystem growth)
├── Minimal attack surface
├── Proven over long time
└── Integration-friendly
Weaknesses:
├── Limited features vs. competition
├── Lost market share to Aave
├── V2 code showing age
├── V3 migration disrupts ecosystem
└── Forks often fail
AAVE'S PHILOSOPHY:
"Features Win Markets"
Strengths:
├── Most comprehensive feature set
├── Flash loans changed DeFi
├── Continuous innovation
├── Market leadership
└── Professional risk management
Weaknesses:
├── Complexity = attack surface
├── Many features under-utilized
├── Learning curve for users
├── Technical debt accumulation
└── Governance complexity
HONEST ASSESSMENT:
No clear winner:
├── Maker: Best for stablecoin, unique but limited
├── Compound: Best for simplicity, but falling behind
├── Aave: Best for power users, complexity trade-off
└── All have survived market tests
---
What translates to XRPL:
UNIVERSAL PRINCIPLES:
1. OVERCOLLATERALIZATION IS NON-NEGOTIABLE
1. LIQUIDATION MUST BE PROFITABLE
1. ORACLE QUALITY IS CRITICAL
1. GOVERNANCE MATTERS
1. SIMPLICITY HAS VALUE
Where XRPL could innovate:
XRPL DIFFERENTIATION OPPORTUNITIES:
1. NATIVE DEX FOR LIQUIDATIONS
1. STABLECOIN INTEGRATION (RLUSD)
1. INSTITUTIONAL FEATURES
1. LOW-COST OPERATIONS
1. SPEED ADVANTAGES
Learning from failures:
FAILURE PATTERNS TO AVOID:
1. AGGRESSIVE PARAMETERS (Venus, Cream)
1. PERMISSIONLESS ASSET LISTING (Rari Fuse)
1. FORK-AND-FORGET
1. COMPLEXITY BEFORE SCALE
1. GOVERNANCE THEATER
---
✅ Multiple models can succeed - Maker, Compound, and Aave all command billions in TVL with different architectures. There's no single "correct" design for DeFi lending.
✅ Simplicity has lasting value - Compound's minimal design made it the most-forked protocol. Sometimes less is more.
✅ Protocol-issued stablecoins work - DAI has maintained its peg for years through extreme volatility. Minting debt as stablecoins is viable.
⚠️ Optimal complexity level - Aave's features drove market share gains, but complexity has costs. The right balance is unclear and may depend on ecosystem.
⚠️ Long-term governance sustainability - All three struggle with participation and concentration. No proven solution to governance scalability.
⚠️ Future competitive dynamics - Will these three continue to dominate, or will new designs displace them? History suggests disruption is possible.
🔴 Assuming forks are free - Copying code doesn't copy security, risk management, or team quality. Forks fail at higher rates than originals.
🔴 Feature envy - Chasing Aave's features without Aave's resources can lead to bloated, buggy protocols. Know your limitations.
🔴 Ignoring economic sustainability - Protocols need revenue to survive long-term. Token emissions aren't sustainable; real interest spreads are.
MakerDAO, Compound, and Aave represent three proven approaches to DeFi lending, each with distinct trade-offs. XRPL lending protocols will likely draw from all three, selecting patterns that fit XRPL's characteristics (low fees, fast finality, native DEX, compliance features). The key lesson isn't which to copy but understanding why each design decision was made and whether those reasons apply to XRPL.
Assignment: Create a comprehensive decision framework comparing MakerDAO, Compound, and Aave to determine which patterns would best suit different XRPL lending scenarios.
Requirements:
Part 1: Feature Comparison Matrix (25%)
- Token mechanics (aToken vs. cToken vs. DAI minting)
- Interest rate models
- Liquidation mechanisms
- Collateral management
- Governance structures
- Revenue models
Score each on relevance to XRPL (1-5)
Part 2: Use Case Analysis (25%)
- Retail stablecoin lending on XRPL
- Institutional borrowing against XRP
- Leveraged trading for active traders
- RLUSD yield generation
- Cross-border payment financing
Justify recommendations with specific design features.
Part 3: Risk Factor Comparison (25%)
- Smart contract complexity risk
- Liquidation failure risk
- Oracle manipulation risk
- Governance attack risk
- Economic design risk
For each risk, assess which model handles it best and why.
Part 4: XRPL Design Recommendation (25%)
- Which core architecture to follow for XRPL lending
- Which specific features to include/exclude
- How to leverage XRPL-specific advantages
- Initial parameter recommendations
- Governance approach
Justify each recommendation.
- Analytical depth (30%)
- Accuracy of protocol understanding (25%)
- Quality of XRPL-specific insights (25%)
- Practicality of recommendations (20%)
Time investment: 2-3 hours
Value: This framework directly informs evaluation of any actual XRPL lending protocol.
Knowledge Check
Question 1 of 4(Tests Basic Understanding):
- MakerDAO: makerdao.com/en/whitepaper and docs
- Compound: compound.finance/docs
- Comparative analyses on DeFi research sites
- "DeFi Protocols for Loanable Funds" - Academic comparisons
- "MakerDAO: Stability Analysis" - Economic modeling
- Gauntlet comparative risk reports
- Post-mortems of failed forks (Cream, Rari)
- Black Thursday analysis for MakerDAO
- DeFi protocol evolution timelines
For Next Lesson:
Lesson 7 examines undercollateralized and institutional lending—the frontier of DeFi credit markets where reputation, legal contracts, and real-world collateral enable borrowing beyond traditional DeFi limits.
End of Lesson 6
Total words: ~6,400
Estimated completion time: 55 minutes reading + 2-3 hours for deliverable exercise
Key Takeaways
MakerDAO creates money; others redistribute it
: The CDP model mints stablecoins against collateral rather than matching lenders with borrowers. This enables DAI's decentralization but limits borrowable assets.
Compound prioritized simplicity over features
: The minimal cToken design became the industry's most-forked codebase. Simplicity has value—easier to audit, integrate, and understand.
Aave won market share through features
: Flash loans, E-Mode, and comprehensive asset support drove Aave to market leadership. But complexity comes with costs.
All three require conservative parameters
: Every failed fork had one thing in common—aggressive parameters. The originals succeed partly through careful risk management.
XRPL can learn from all three
: Native DEX, low fees, and compliance features create opportunities for differentiated design. The question is which patterns translate and which need reinvention. ---