A decentralized lending protocol built with Solidity and Foundry.
Users can deposit ETH as collateral, borrow USDC, repay loans, and withdraw collateral.
This project is created for learning and demonstrating DeFi lending mechanisms, smart contract security, and testing practices.
- Deposit ETH as collateral
- Borrow USDC against collateral
- Repay borrowed USDC
- Withdraw collateral after repayment
- ETH price fetched through Chainlink Price Feed
- Collateral ratio validation
- Health factor calculation
Implemented:
- Reentrancy protection using OpenZeppelin ReentrancyGuard
- Checks-Effects-Interactions pattern
- Input validation
- Oracle price validation
- Solidity ^0.8.x
- Foundry
- OpenZeppelin Contracts
- Chainlink Price Feed
- Ethereum Virtual Machine (EVM)