Live Website: https://yieldcomp.vercel.app/
Still in progress but core functionality working on testnet
A Flexible, minimalist, and gas-optimized yield farm protocol for earning interest on ERC20 tokens through Compound Finace. Users deposit token into protol vaults and earn yield through compound on their deposits. Withdrawals include profit minus protocol fees set at 5% and withdrawals are allowed at anytime.
- Web App: A user-friendly application to interact with vaults.
- Deposits into selected vault(s).
- Withdrawals from selected vault(s).
- View APY for various vault(s).
Smart Contracts: Actions performed by Protocol are done onchain and controlled by these smart contracts. . Vault.sol: ERC4626 standard smart contract for earning interest on any ERC20 token through the compund protocol. . Vaultfactory.sol: Factory for vault deployments and management. . interface: Interfaces of external contracts Vaults and modules interact with. . CErcInterface.sol: Interface for Compound ctoken.
This is a monorepo setup built built with turbo-repo. The frontend is built with Nextjs and smart contracts with foundry. Ensure forge is installed for foundry.
yield-farm
|** apps
| |** web
|
|** packages
| |** contracts
|
|__ package.json
The frontend is contained in web and smart contracts in contracts
git clone repo
cd yield-farm
cd packages/contracts
forge install
forge build
forge test
Create .env and add to file GOERLI_RPC_URL=.... ETHERSCAN_KEY=.... PRIVATE_KEY=....
forge script script/AIMVaultFactory.s.sol:MyScript --rpc-url $GOERLI_RPC_URL --broadcast --verify -vvvv
Vault Factory: 0x7D7B81aeB0aF69d9F9612b1BEfa73ce600f21284 Deployed USDC Vault: 0x7Be4DE03B336BD384de692A5C348806f649D4Bb7