A smart contract system built to simulate the creation of a decentralized, exogenously collateralized stablecoin pegged to the US dollar. This system mimics protocols like MakerDAO's DAI but is designed to be minimal, governance-free, and purely algorithmic.
- Solidity (v0.8.18)
- Chainlink Oracles
- OpenZeppelin Contracts
- Foundry (Forge)
- Overcollateralized stablecoin model
- Supports multiple collateral types (e.g., WETH, WBTC)
- Liquidation mechanics with incentives
- Health factor checks to ensure solvency
- Modular and minimalistic architecture
- No governance, no fees
- 📈 Chainlink price feeds for real-time collateral valuation
- 💸 Minting and redeeming of stablecoins based on collateral
- 🧮 Health factor enforcement to protect the protocol
- 🛡️ Reentrancy protection via
ReentrancyGuard
- 🔁 Liquidation logic with bonuses for liquidators
- 🧱 Internal accounting and collateral management
$ forge build
$ forge test
$ forge fmt
$ forge snapshot
$ anvil
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
$ cast <subcommand>
$ forge --help
$ anvil --help
$ cast --help