Skip to content

Commit 65c2c56

Browse files
committed
Edit: Update README.md
1 parent 9faf54e commit 65c2c56

File tree

4 files changed

+245
-154
lines changed

4 files changed

+245
-154
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 CentoAI
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 141 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,145 @@
11
# CentoAI: AI-Powered DeFi Portfolio Manager
22

3-
![CentoAI Logo](https://via.placeholder.com/150) <!-- Replace with logo -->
3+
![CentoAI Logo](https://via.placeholder.com/150) <!-- Replace with your logo -->
44

5-
CentoAI is an AI-powered DeFi portfolio manager that optimizes yield farming by dynamically reallocating funds across top DeFi protocols. Built using **Coinbase AgentKit**, **Warden Protocol**, and **Lit Protocol**, CentoAI automates strategy execution securely on **Base** for maximum yield efficiency.
5+
**CentoAI** is an AI-powered DeFi portfolio manager that optimizes yield farming and flash loan arbitrage across top DeFi protocols like **Aave**, **Compound**, and **Uniswap V3**. Built using **Coinbase AgentKit**, **Warden Protocol**, and deployed on **Base**, CentoAI automates fund management and strategy execution to maximize user returns.
66

77
---
88

99
## 🚀 Features
1010

11-
- **AI-Driven Yield Optimization**: Dynamically reallocates funds to the highest-yielding opportunities across DeFi protocols like Aave, Compound, and Uniswap.
12-
- **On-Chain Automation**: Uses **Warden Protocol** to automate fund movements based on real-time APY data.
13-
- **Secure Execution**: Leverages **Lit Protocol** for secure transaction signing and non-custodial key management.
11+
- **AI-Driven Yield Optimization**: Dynamically reallocates funds to the highest-yielding opportunities across DeFi protocols.
12+
- **Flash Loan Arbitrage**: Executes arbitrage strategies using **Balancer V2** flash loans for risk-free profits.
13+
- **Multi-Protocol Integration**: Supports **Aave**, **Compound**, **Uniswap V3**, and **Balancer V2**.
14+
- **On-Chain Automation**: Uses **Coinbase AgentKit** to automate fund movements and strategy execution.
15+
- **User-Friendly Vaults**: Each user gets a personalized vault to deposit funds and set strategies.
1416
- **Base Deployment**: Deployed on **Base** for low-cost, high-speed transactions.
15-
- **User-Friendly Interface**: Built with **OnchainKit** for seamless wallet integration and portfolio management.
1617

1718
---
1819

1920
## 🛠️ Tech Stack
2021

2122
- **Core Framework**: [Coinbase AgentKit](https://developer.coinbase.com/agentkit)
2223
- **Automation**: [Warden Protocol](https://wardenprotocol.org)
23-
- **Security**: [Lit Protocol](https://litprotocol.com)
24-
- **Blockchain**: [Base](https://base.org)
25-
- **Frontend**: React + OnchainKit
24+
- **Blockchain**: [Base](https://base.org), [Arbitrum](https://arbitrum.io)
25+
- **Frontend**: Next.js + OnchainKit
2626
- **Backend**: Node.js
27+
- **Smart Contracts**: Solidity (Foundry for testing and deployment)
2728

2829
---
2930

30-
## 📊 How It Works
31+
## 🏗️ Architecture Overview
3132

32-
1. **Data Aggregation**:
33-
- Fetch real-time APY data from DeFi protocols (e.g., Aave, Compound, Uniswap).
34-
- Use **Warden Protocol** to monitor and analyze yield opportunities.
33+
CentoAI is built on a modular architecture, with the following key components:
3534

36-
2. **AI Decision Engine**:
37-
- Analyze yield opportunities using machine learning models.
38-
- Determine optimal fund reallocation based on risk-adjusted returns.
35+
### 1. **Smart Contracts**
36+
- **LiquidityManager.sol**: Manages liquidity across **Aave**, **Compound**, and **Uniswap V3**.
37+
- **Arbitrage.sol**: Executes flash loan arbitrage strategies using **Balancer V2**.
38+
- **Vault.sol**: Manages user balances and strategy execution.
39+
- **VaultFactory.sol**: Deploys personalized vaults for users.
3940

40-
3. **Secure Execution**:
41-
- **Lit Protocol** enforces policies (e.g., "only execute if APY > X%").
42-
- **Coinbase AgentKit** handles on-chain actions (e.g., deposits, withdrawals, swaps).
41+
### 2. **Frontend**
42+
- Built with **Next.js** and **OnchainKit** for seamless wallet integration and portfolio visualization.
43+
- Provides a user-friendly dashboard for monitoring portfolio performance and strategy execution.
4344

44-
4. **User Interface**:
45-
- A dashboard displays portfolio performance, strategy configurations, and transaction history.
46-
- Built with **React** and **OnchainKit** for seamless wallet integration.
45+
### 3. **Backend**
46+
- **Node.js** backend for handling off-chain computations and API integrations.
47+
- Fetches real-time APY data from DeFi protocols and provides it to the AI agent.
48+
49+
### 4. **AI Agent**
50+
- Analyzes yield opportunities and arbitrage strategies using machine learning models.
51+
- Executes strategies securely using **Coinbase AgentKit** and **Warden Protocol**.
4752

4853
---
4954

50-
## 🏆 Sponsor Tracks
55+
## 🔧 Workflows
5156

52-
CentoAI is designed to compete in the following **ETHGlobal Agentic Ethereum** tracks:
57+
### 1. **User Onboarding**
58+
- Users connect their wallets to the CentoAI platform.
59+
- A personalized vault is deployed for the user using **VaultFactory.sol**.
60+
- Users deposit ERC20 tokens (e.g., USDC, ETH) into their vault.
5361

54-
### 🟩 Core Tracks
55-
1. **Coinbase Developer Platform**
56-
- Most Innovative Use of AgentKit
57-
- Best Combination of AgentKit + OnchainKit
58-
- Viral Consumer App Award
59-
- AgentKit Pool Prize
62+
### 2. **AI-Driven Strategy Execution**
63+
- The AI agent fetches real-time APY data from **Aave**, **Compound**, and **Uniswap V3**.
64+
- It analyzes yield opportunities and identifies arbitrage opportunities using **Balancer V2** flash loans.
65+
- The AI agent executes strategies such as:
66+
- **Yield Farming**: Moves funds between protocols to maximize APY.
67+
- **Flash Loan Arbitrage**: Executes risk-free arbitrage between DEXes.
6068

61-
2. **Base**
62-
- Build an AI-Powered App on Base
69+
### 3. **Portfolio Management**
70+
- Users can monitor their portfolio performance, strategy execution, and transaction history through the dashboard.
71+
- The dashboard provides insights into:
72+
- Current APY across protocols.
73+
- Profit/loss from arbitrage strategies.
74+
- Historical performance of the portfolio.
6375

64-
3. **Lit Protocol**
65-
- Best DeFAI Agent
66-
- Most Creative Integration
67-
- Pool Prize
76+
---
6877

69-
4. **Warden Protocol**
70-
- Best Use of Warden Protocol for On-Chain Automation
78+
## 🧩 Smart Contracts
79+
80+
### 1. **LiquidityManager.sol**
81+
- Manages liquidity across **Aave**, **Compound**, and **Uniswap V3**.
82+
- Key Functions:
83+
- `supplyLiquidityOnAave`: Supplies liquidity to Aave.
84+
- `withdrawLiquidityFromCompound`: Withdraws liquidity from Compound.
85+
- `swapOnUniswap`: Executes token swaps on Uniswap V3.
86+
87+
### 2. **Arbitrage.sol**
88+
- Executes flash loan arbitrage strategies using **Balancer V2**.
89+
- Key Functions:
90+
- `executeTrade`: Initiates a flash loan and executes arbitrage.
91+
- `receiveFlashLoan`: Callback function for flash loan execution.
92+
93+
### 3. **Vault.sol**
94+
- Manages user balances and strategy execution.
95+
- Key Functions:
96+
- `depositERC20`: Deposits ERC20 tokens into the vault.
97+
- `withdrawERC20`: Withdraws ERC20 tokens from the vault.
98+
- `lendTokens`: Lends tokens to **Aave** or **Compound**.
99+
100+
### 4. **VaultFactory.sol**
101+
- Deploys personalized vaults for users.
102+
- Key Functions:
103+
- `createVault`: Deploys a new vault for a user.
104+
- `getVaultAddress`: Retrieves the vault address for a user.
71105

72106
---
73107

74-
## 🚨 Disclaimer
108+
## 🛠️ Integration Details
109+
110+
### 1. **Coinbase AgentKit**
111+
- Used for secure, programmatic wallet interactions.
112+
- Enables the AI agent to execute on-chain actions (e.g., deposits, withdrawals, swaps).
113+
114+
### 2. **Warden Protocol**
115+
- Used for automating on-chain actions and enforcing strategy rules.
116+
- Ensures that strategies are executed only when predefined conditions are met.
117+
118+
### 3. **Base and Arbitrum**
119+
- CentoAI is deployed on **Base** and **Arbitrum** for low-cost, high-speed transactions.
120+
- Supports yield farming and arbitrage strategies on both networks.
121+
122+
---
75123

76-
CentoAI is a proof-of-concept project built for the ETHGlobal Agentic Ethereum hackathon. It is not audited and should not be used in production. Use at your own risk.
124+
## 🏆 Sponsor Tracks
125+
126+
CentoAI is designed to compete in the following **ETHGlobal Agentic Ethereum** tracks:
127+
128+
### **Coinbase Developer Platform**
129+
- **Most Innovative Use of AgentKit**: CentoAI uses AgentKit to automate complex DeFi strategies, abstracting away the complexity for users.
130+
- **Best Combination of AgentKit + OnchainKit**: The frontend integrates **OnchainKit** for seamless wallet interactions and portfolio visualization.
131+
- **Viral Consumer App Award**: CentoAI’s user-friendly interface and AI-driven strategies make it accessible to both DeFi experts and beginners.
132+
- **AgentKit Pool Prize**: CentoAI is build with AgentKit in a meaningful way for users to interact with the DeFi ecosystem.
133+
134+
### **Base**
135+
- **Build an AI-Powered App on Base**: CentoAI is deployed on **Base**, leveraging its low-cost, high-speed infrastructure for seamless DeFi operations.
136+
137+
### **Warden Protocol**
138+
- **Agents with Best DeFi Skills**: CentoAI uses **Warden Protocol** to automate on-chain actions and enforce strategy rules (e.g., "only execute if APY > X%").
139+
- **Intelligent Integrations**: CentoAI integrates **Warden Protocol** with an AI-driven decision engine to create a unique toolkit for DeFi portfolio management. The AI agent uses **Warden Protocol** to deploy smart contracts, exposing strategy execution functions (e.g., `executeYieldFarming`, `executeArbitrage`) as callable tools.
140+
141+
### **Arbitrum**
142+
- **Most Innovative AI Agent Applications**: CentoAI combines yield farming and flash loan arbitrage to push the boundaries of DeFi automation.
77143

78144
---
79145

@@ -118,16 +184,16 @@ contracts/
118184
```
119185

120186
4. Deploy the contract to the Base Sepolia Testnet:
121-
```bash
122-
forge script script/DeployArbitrage.s.sol:DeployArbitrage <BASE_SEPOLIA_RPC_URL> --private-key <PRIVATE_KEY> --broadcast --verify --verifier blockscout --verifier-url https://base-sepolia.blockscout.com/api/
123-
```
124187
```bash
125-
forge script script/DeployLiquidityManager.sol:DeployLiquidityManager <BASE_SEPOLIA_RPC_URL> --private-key <PRIVATE_KEY> --broadcast --verify --verifier blockscout --verifier-url https://base-sepolia.blockscout.com/api/
188+
forge script script/DeployVaultFactory.sol:DeployVaultFactory <BASE_SEPOLIA_RPC_URL> --private-key <PRIVATE_KEY> --broadcast --verify --verifier blockscout --verifier-url https://base-sepolia.blockscout.com/api/
126189
```
190+
191+
Deploy the contract to the Arbitrum Sepolia Testnet:
127192
```bash
128-
forge script script/DeployLiquidityManager.sol:DeployLiquidityManager <BASE_SEPOLIA_RPC_URL> --private-key <PRIVATE_KEY> --broadcast --verify --verifier blockscout --verifier-url https://base-sepolia.blockscout.com/api/
193+
forge script script/DeployVaultFactory.sol:DeployVaultFactory <ARBITRUM_SEPOLIA_RPC_URL> --private-key <PRIVATE_KEY> --broadcast --verify --verifier blockscout --verifier-url https://arbitrum-sepolia.blockscout.com/api/
129194
```
130195

196+
131197
## Testing
132198
Foundry is used for testing the Arbitrage contract. To run the tests:
133199

@@ -138,13 +204,40 @@ Foundry is used for testing the Arbitrage contract. To run the tests:
138204
forge test
139205
```
140206

207+
---
208+
209+
## 🚨 Disclaimer
210+
211+
CentoAI is a proof-of-concept project built for the **ETHGlobal Agentic Ethereum** hackathon. It is not audited and should not be used in production. Use at your own risk.
212+
213+
---
214+
141215
## 🤝 Contributing
216+
142217
Contributions are welcome! Please open an issue or submit a pull request.
143218

219+
---
220+
144221
## 📄 License
145-
This project is licensed under the MIT License. See LICENSE for details.
222+
223+
This project is licensed under the **MIT License**. See [LICENSE](LICENSE) for details.
224+
225+
---
146226

147227
## 🙏 Acknowledgments
148-
ETHGlobal for hosting the Agentic Ethereum hackathon.
149228

150-
Coinbase, Base, Lit Protocol, and Warden Protocol for their support and tooling.
229+
- **ETHGlobal** for hosting the **Agentic Ethereum** hackathon.
230+
- **Coinbase**, **Base**, **Warden Protocol**, and **Arbitrum** for their support and tooling.
231+
232+
---
233+
234+
## 📸 Visuals (Placeholder)
235+
236+
### **Dashboard Overview**
237+
![Dashboard](https://via.placeholder.com/800x400) <!-- Replace with actual dashboard screenshot -->
238+
239+
### **Vault Management**
240+
![Vault](https://via.placeholder.com/800x400) <!-- Replace with actual vault screenshot -->
241+
242+
### **Strategy Execution**
243+
![Strategy](https://via.placeholder.com/800x400) <!-- Replace with actual strategy execution screenshot -->

0 commit comments

Comments
 (0)