This is a modular DeFi protocol built with Solidity and Hardhat, for experimental. It integrates multiple DeFi primitives such as token management, rebalancing, risk management, and yield aggregation, with support for Aave and Compound protocols.
- TokenManager: Secure deposit and withdrawal of ERC20 tokens.
- Rebalancer: Move assets between Aave and Compound to optimize yield or manage risk.
- RiskManager: Automated risk checks and asset liquidation if exposure exceeds limits.
- YieldAggregator: Aggregate and reinvest yield from Aave and Compound.
- Aave/Compound Integration: Direct protocol interactions for lending, borrowing, and yield strategies.
- Built with Hardhat
- Solidity ^0.8.0
- Modular contract architecture for extensibility
- Clone the repository
- Install dependencies:
npm install - Configure your
.envfile for network and private key settings - Run tests:
npx hardhat test - Deploy contracts:
npx hardhat run scripts/deploy.js --network <network>
- Uses OpenZeppelin contracts for security best practices
- Includes reentrancy guards and access control
Any contribution would be welcome. Please open an issue or PR to contribute in this repo
MIT