Deploying a Stablecoin
summary
Walks through building an over-collateralized onchain stablecoin using five contracts: a simplified DEX, a stub oracle, an ERC20 with restricted mint/burn, an engine for collateral/mint/liquidations, and staking plus a rate controller. Uses Scaffold-ETH demo and burner wallets to deposit 10 ETH, mint $11,000 (≈163% collateralization), run bot simulations where raising borrow rate from 0% to 10–20% restores the peg, and shows liquidations and staking mechanics.
AI-written summary · about
chapters (17)
- 0:00Intro and why stablecoins matter
- 1:18The Speedrun Ethereum challenge overview
- 2:28Types of stablecoins and tradeoffs
- 3:42Required components: oracle, DEX, token, engine, staking
- 4:54Token design: restricted mint and burn
- 6:35Spinning up the demo with Scaffold-ETH
- 9:04Adding ETH collateral and minting the stablecoin
- 10:23Collateral ratio, liquidation threshold, and rewards
- 11:54Setting up rates and understanding parameters
- 13:25Bot simulation: price falls below peg
- 14:26Raising the borrow rate to restore peg
- 16:34When price goes above peg: savings rate incentives
- 17:32Staking the stablecoin and yield mechanics
- 18:47Pushing toward unsafe health and liquidation discussion
- 21:11Contract tour: oracle, rate controller, token
- 22:36Engine internals: checks, health, and liquidate user
- 23:20Takeaways and next steps
related talks
19mBuilding Algorithmic Stablecoin at the Highest Standard
12mStart Building Your Own Stablecoin with Stablecoin Studio
26mBeyond The Hype: Building Complaint And Scalable Stablecoin Rails
01h 38mBuilding a DeFi App: Code along
27mComposing Next-Gen DApps With DeFi Legos
26mIntroduction to Speedrun Ethereum Challenges
32mThe Best Stack For Building Ethereum Apps And How To One Shot Bangers
13mHow Stablecoin Regulation Bridges Borders?
