DSC Engine

Decentralized stablecoin protocol with collateralized debt positions and Chainlink price oracles

DSC Engine

Created At

HackMoney 2026

Project Description

A decentralized stablecoin protocol where users deposit ETH as collateral to mint DSC tokens. The system maintains a 50% collateralization ratio with a minimum health factor of 1.5 to ensure stability and uses Chainlink price oracles for accurate, real-time asset valuation.

Key Features:

  • ETH collateral deposit and withdrawal with real-time balance tracking
  • Algorithmic stablecoin (DSC) minting up to 33% of collateral value and burning
  • Automated liquidation mechanism to protect protocol solvency and maintain health factor
  • Integration with Chainlink price feeds for accurate ETH/USD pricing
  • ERC20-compliant token standard with burning capabilities
  • Built with Solidity, Foundry/Forge for testing and deployment on Sepolia testnet
  • React + Next.js frontend for seamless user interactions
  • Reentrancy protection and security best practices via OpenZeppelin

How it works: Users deposit ETH collateral and receive the ability to mint DSC stablecoins. The protocol enforces a 50% collateralization requirement - if collateral value drops, the health factor decreases. If health factor falls below 1.5, liquidators can liquidate positions to protect the system. This over-collateralization model ensures every DSC token is backed by real value, maintaining the $1 peg even during market volatility.

Architecture: The smart contracts handle collateral management, stablecoin minting/burning, liquidation mechanisms, and price feed integration. All contracts are thoroughly tested with Forge test suite and deployed on Ethereum Sepolia testnet with full open-source transparency.

How it's Made

How it's made:

This project is a decentralized stablecoin protocol built on Ethereum using Solidity smart contracts. The backend leverages Foundry/Forge for smart contract development, testing, and deployment.

Key Technologies:

  • Solidity for smart contract development
  • Foundry/Forge for compilation, testing, and deployment
  • OpenZeppelin Contracts (IERC20, ERC20Burnable, ReentrancyGuard) for secure, audited implementations
  • Chainlink Price Feeds for real-time ETH price oracles
  • Ethers.js for frontend blockchain interactions
  • React + Next.js for the user interface

Architecture: The system uses a collateralized debt position (CDP) model where users deposit ETH as collateral to mint our decentralized stablecoin (DSC). The protocol maintains a 50% collateralization ratio with a minimum health factor of 1.5 to ensure system stability.

Smart Contract Features:

  • depositETHOnly() - Users deposit native ETH as collateral
  • mintDSC() - Mint stablecoins up to 33% of collateral value
  • redeemCollateral() - Withdraw collateral while maintaining health factor
  • liquidate() - Liquidation mechanism protects protocol stability
  • repayDSCWithETH() - Integrates with Uniswap V2 for ETH to DSC swaps (optional debt repayment)

All contracts implement:

  • Reentrancy protection with OpenZeppelin's ReentrancyGuard
  • ERC20Burnable for token burning functionality
  • Real-time price feeds from Chainlink oracles
  • Comprehensive error handling and validation

Testing & Deployment: All contracts are thoroughly tested using Forge's test suite with multiple test cases covering edge cases and security scenarios. The protocol is deployed on Sepolia testnet with public GitHub repository for transparency and community verification.

background image mobile

Join the mailing list

Get the latest news and updates