Nexa: AI-Powered Multi-Chain Yield Aggregator | Demo Video | Live Website
A web application designed to simplify DeFi yield farming across multiple blockchains. Nexa identifies and ranks the best yield opportunities from sources like DefiLlama, constructs a clear, multi-step transaction plan, and uses the NEAR blockchain's intent-based architecture for execution.
- Dynamic Pool Ranking: Fetches and ranks yield pools from DefiLlama based on user-defined amounts and chain preferences.
- Intent-Based Execution: Creates a high-level plan (e.g., Swap → Bridge → Deposit) for the user.
- NEAR Wallet Integration: Connects with NEAR wallets using the official Wallet Selector, with support for browser extensions (Sender) and mobile wallets (Trust Wallet via WalletConnect).
- Responsive UI: A modern, fully responsive user interface built with Next.js, Tailwind CSS, and shadcn/ui.
- Light & Dark Mode: Includes a theme toggle for user preference.
- Frontend:
- Next.js (React)
- TypeScript
- Tailwind CSS v4
- shadcn/ui
- NEAR Wallet Selector
- Backend:
- Node.js
- Express.js
- TypeScript
- APIs & Services:
- DefiLlama API (for yield data)
- WalletConnect (for mobile wallet communication)
Follow these instructions to set up and run the project locally.
- Node.js (v18 or later)
- npm (or your preferred package manager)
- A WalletConnect Project ID from cloud.walletconnect.com
-
Navigate to the backend directory:
cd nexa-backend -
Install dependencies:
npm install
-
Create an environment file: Create a file named
.envin thenexa-backendroot directory and add the following variables:PORT=4000 DEFILLAMA_YIELDS_URL=[https://yields.llama.fi/pools](https://yields.llama.fi/pools) ONECLICK_API_BASE=[https://1click-api.intents.near.org](https://1click-api.intents.near.org) -
Run the backend server:
npm run dev
The backend will be running at
http://localhost:4000.
-
Navigate to the frontend directory:
cd nexa-frontend -
Install dependencies:
npm install
-
Create a local environment file: Create a file named
.env.localin thenexa-frontendroot directory and add the following variables. Replace the placeholder with your own WalletConnect Project ID.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your-project-id-goes-here NEXT_PUBLIC_API_BASE_URL=http://localhost:4000 -
Run the frontend development server:
npm run dev
The frontend will be running at
http://localhost:3000.
The backend provides the following core API endpoints for the frontend to consume.
-
GET /rank: Fetches and ranks yield pools.- Query Params:
amount,chains,token. - Returns: A ranked list of pools, an overall winner, and winners per chain.
- Query Params:
-
POST /intent: Builds a transaction plan and gets a quote.- Body:
{ user, amount, fromToken, fromChain, winner }. - Returns: A structured intent plan and a quote including the
depositAddress.
- Body:
-
POST /submit: Acknowledges a transaction submission (no-op in the MVP).
This project is licensed under the MIT License.