You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CentoAI is built on a modular architecture, with the following key components:
36
44
37
45
### 1. **Smart Contracts**
38
-
-**LiquidityManager.sol**: Manages liquidity across **Aave**, **Compound**, and **Uniswap V3**.
39
-
-**Arbitrage.sol**: Executes flash loan arbitrage strategies using **Balancer V2**.
40
-
-**Vault.sol**: Manages user balances and strategy execution.
41
-
-**VaultFactory.sol**: Deploys personalized vaults for users.
46
+
47
+
-**LiquidityManager.sol**: Manages liquidity across **Aave**, **Compound**, and **Uniswap V3**.
48
+
-**Arbitrage.sol**: Executes flash loan arbitrage strategies using **Balancer V2**.
49
+
-**Vault.sol**: Manages user balances and strategy execution.
50
+
-**VaultFactory.sol**: Deploys personalized vaults for users.
42
51
43
52
### 2. **Frontend**
44
-
- Built with **Next.js** and **OnchainKit** for seamless wallet integration and portfolio visualization.
45
-
- Provides a user-friendly dashboard for monitoring portfolio performance and strategy execution.
46
-
- Integrates **Privy** for embedded wallets and social logins, enabling users to onboard with email or existing wallets.
53
+
54
+
- Built with **Next.js** and **OnchainKit** for seamless wallet integration and portfolio visualization.
55
+
- Provides a user-friendly dashboard for monitoring portfolio performance and strategy execution.
56
+
- Integrates **Privy** for embedded wallets and social logins, enabling users to onboard with email or existing wallets.
47
57
48
58
### 3. **Backend**
49
-
-**Node.js** backend for handling off-chain computations and API integrations.
50
-
- Fetches real-time APY data from DeFi protocols and provides it to the AI agent.
59
+
60
+
-**Node.js** backend for handling off-chain computations and API integrations.
61
+
- Fetches real-time APY data from DeFi protocols and provides it to the AI agent.
51
62
52
63
### 4. **AI Agent**
53
-
- Analyzes yield opportunities and arbitrage strategies using machine learning models.
54
-
- Executes strategies securely using **Coinbase AgentKit**.
64
+
65
+
- Analyzes yield opportunities and arbitrage strategies using machine learning models.
66
+
- Executes strategies securely using **Coinbase AgentKit**.
55
67
56
68
---
57
69
58
70
## 🔧 Workflows
59
71
60
72
### 1. **User Onboarding**
61
-
- Users connect their wallets or sign in with email/social login using **Privy**.
62
-
- A personalized vault is deployed for the user using **VaultFactory.sol**.
63
-
- Users deposit ERC20 tokens (e.g., USDC, ETH) into their vault.
73
+
74
+
- Users connect their wallets or sign in with email/social login using **Privy**.
75
+
- A personalized vault is deployed for the user using **VaultFactory.sol**.
76
+
- Users deposit ERC20 tokens (e.g., USDC, ETH) into their vault.
64
77
65
78
### 2. **AI-Driven Strategy Execution**
66
-
- The AI agent fetches real-time APY data from **Aave**, **Compound**, and **Uniswap V3**.
67
-
- It analyzes yield opportunities and identifies arbitrage opportunities using **Balancer V2** flash loans.
68
-
- The AI agent executes strategies such as:
69
-
-**Yield Farming**: Moves funds between protocols to maximize APY.
70
-
-**Flash Loan Arbitrage**: Executes risk-free arbitrage between DEXes.
79
+
80
+
- The AI agent fetches real-time APY data from **Aave**, **Compound**, and **Uniswap V3**.
81
+
- It analyzes yield opportunities and identifies arbitrage opportunities using **Balancer V2** flash loans.
82
+
- The AI agent executes strategies such as:
83
+
-**Yield Farming**: Moves funds between protocols to maximize APY.
84
+
-**Flash Loan Arbitrage**: Executes risk-free arbitrage between DEXes.
71
85
72
86
### 3. **Portfolio Management**
73
-
- Users can monitor their portfolio performance, strategy execution, and transaction history through the dashboard.
74
-
- The dashboard provides insights into:
75
-
- Current APY across protocols.
76
-
- Profit/loss from arbitrage strategies.
77
-
- Historical performance of the portfolio.
87
+
88
+
- Users can monitor their portfolio performance, strategy execution, and transaction history through the dashboard.
89
+
- The dashboard provides insights into:
90
+
- Current APY across protocols.
91
+
- Profit/loss from arbitrage strategies.
92
+
- Historical performance of the portfolio.
78
93
79
94
---
80
95
81
96
## 🧩 Smart Contracts
82
97
83
98
### 1. **LiquidityManager.sol**
84
-
- Manages liquidity across **Aave**, **Compound**, and **Uniswap V3**.
85
-
- Key Functions:
86
-
-`supplyLiquidityOnAave`: Supplies liquidity to Aave.
87
-
-`withdrawLiquidityFromCompound`: Withdraws liquidity from Compound.
88
-
-`swapOnUniswap`: Executes token swaps on Uniswap V3.
99
+
100
+
- Manages liquidity across **Aave**, **Compound**, and **Uniswap V3**.
101
+
- Key Functions:
102
+
-`supplyLiquidityOnAave`: Supplies liquidity to Aave.
103
+
-`withdrawLiquidityFromCompound`: Withdraws liquidity from Compound.
104
+
-`swapOnUniswap`: Executes token swaps on Uniswap V3.
89
105
90
106
### 2. **Arbitrage.sol**
91
-
- Executes flash loan arbitrage strategies using **Balancer V2**.
92
-
- Key Functions:
93
-
-`executeTrade`: Initiates a flash loan and executes arbitrage.
94
-
-`receiveFlashLoan`: Callback function for flash loan execution.
107
+
108
+
- Executes flash loan arbitrage strategies using **Balancer V2**.
109
+
- Key Functions:
110
+
-`executeTrade`: Initiates a flash loan and executes arbitrage.
111
+
-`receiveFlashLoan`: Callback function for flash loan execution.
95
112
96
113
### 3. **Vault.sol**
97
-
- Manages user balances and strategy execution.
98
-
- Key Functions:
99
-
-`depositERC20`: Deposits ERC20 tokens into the vault.
100
-
-`withdrawERC20`: Withdraws ERC20 tokens from the vault.
101
-
-`lendTokens`: Lends tokens to **Aave** or **Compound**.
114
+
115
+
- Manages user balances and strategy execution.
116
+
- Key Functions:
117
+
-`depositERC20`: Deposits ERC20 tokens into the vault.
118
+
-`withdrawERC20`: Withdraws ERC20 tokens from the vault.
119
+
-`lendTokens`: Lends tokens to **Aave** or **Compound**.
102
120
103
121
### 4. **VaultFactory.sol**
104
-
- Deploys personalized vaults for users.
105
-
- Key Functions:
106
-
-`createVault`: Deploys a new vault for a user.
107
-
-`getVaultAddress`: Retrieves the vault address for a user.
122
+
123
+
- Deploys personalized vaults for users.
124
+
- Key Functions:
125
+
-`createVault`: Deploys a new vault for a user.
126
+
-`getVaultAddress`: Retrieves the vault address for a user.
108
127
109
128
---
110
129
111
130
## 🛠️ Integration Details
112
131
113
132
### 1. **Coinbase AgentKit**
114
-
- Used for secure, programmatic wallet interactions.
115
-
- Enables the AI agent to execute on-chain actions (e.g., deposits, withdrawals, swaps).
133
+
134
+
- Used for secure, programmatic wallet interactions.
135
+
- Enables the AI agent to execute on-chain actions (e.g., deposits, withdrawals, swaps).
116
136
117
137
### 2. **Privy**
118
-
- Provides embedded wallets and social logins, making it easy for users to onboard and interact with DeFi.
119
-
- Supports both web3-native users (with existing wallets) and newcomers (with email/social login).
138
+
139
+
- Provides embedded wallets and social logins, making it easy for users to onboard and interact with DeFi.
140
+
- Supports both web3-native users (with existing wallets) and newcomers (with email/social login).
120
141
121
142
### 3. **Base and Arbitrum**
122
-
- CentoAI is deployed on **Base** and **Arbitrum** for low-cost, high-speed transactions.
123
-
- Supports yield farming and arbitrage strategies on both networks.
143
+
144
+
- CentoAI is deployed on **Base** and **Arbitrum** for low-cost, high-speed transactions.
145
+
- Supports yield farming and arbitrage strategies on both networks.
124
146
125
147
---
126
148
@@ -129,23 +151,28 @@ CentoAI is built on a modular architecture, with the following key components:
129
151
CentoAI is designed to compete in the following **ETHGlobal Agentic Ethereum** tracks:
130
152
131
153
### **Coinbase Developer Platform**
154
+
132
155
-**Most Innovative Use of AgentKit**: CentoAI uses AgentKit to automate complex DeFi strategies, abstracting away the complexity for users.
133
156
-**Best Combination of AgentKit + OnchainKit**: The frontend integrates **OnchainKit** for seamless wallet interactions and portfolio visualization.
134
157
-**Viral Consumer App Award**: CentoAI’s user-friendly interface and AI-driven strategies make it accessible to both DeFi experts and beginners.
135
158
-**AgentKit Pool Prize**: CentoAI is built with AgentKit in a meaningful way for users to interact with the DeFi ecosystem.
136
159
137
160
### **Base**
161
+
138
162
-**Build an AI-Powered App on Base**: CentoAI is deployed on **Base**, leveraging its low-cost, high-speed infrastructure for seamless DeFi operations.
139
163
140
164
### **Privy**
165
+
141
166
-**Best Consumer Experience Built with Server Wallets**: CentoAI uses **Privy** to provide a seamless onboarding experience, enabling users to sign in with email, social login, or existing wallets. This makes CentoAI accessible to all users, regardless of their web3 experience.
142
167
143
168
### **Arbitrum**
169
+
144
170
-**Most Innovative AI Agent Applications**: CentoAI combines yield farming and flash loan arbitrage to push the boundaries of DeFi automation.
145
171
146
172
---
147
173
148
174
## 📂 Repository Structure
175
+
149
176
```
150
177
contracts/
151
178
├── lib/ # Dependencies
@@ -170,41 +197,46 @@ contracts/
170
197
### Installation
171
198
172
199
1. Clone the repository:
200
+
173
201
```bash
174
202
git clone https://github.com/Cento-AI/contracts
175
203
cd cento-ai
176
204
```
177
205
178
206
2. Install dependencies:
179
-
```bash
180
-
forge install
181
-
```
207
+
208
+
```bash
209
+
forge install
210
+
```
182
211
183
212
3. Compile the smart contract:
184
-
```bash
185
-
forge build
186
-
```
213
+
214
+
```bash
215
+
forge build
216
+
```
187
217
188
218
4. Deploy the contract to the Base Sepolia Testnet:
0 commit comments