Your Voice-Activated Crypto Trading Assistant.
SwapSmith allows you to execute complex, cross-chain cryptocurrency swaps using simple natural language. Powered by the SideShift.ai API and OpenAI.
"Swap half of my MATIC on Polygon for 50 USDC on Arbitrum."
- Natural Language Interface: Describe the swap you want in plain English.
- Cross-Chain Magic: Seamlessly swap between 200+ assets across 40+ chains.
- Voice Input: (Experimental) Use your microphone to command the agent.
- Secure: Your keys stay yours. Transactions are only executed after your explicit confirmation.
- Real-Time Quotes: Always get the best available rate via SideShift.
- Connect Your Wallet (e.g., MetaMask).
- Type or Speak your swap command into the chat.
- Review the parsed intent and the live quote provided by SideShift.
- Confirm the transaction directly in your wallet.
- Relax while SwapSmith handles the complex cross-chain logic in the background.
- Node.js (v18 or higher)
- An OpenAI API key
- A SideShift API key (optional, but recommended for higher rate limits)
-
Clone the repository:
git clone https://github.com/your-username/swapsmith.git cd swapsmith -
Install dependencies:
npm install
-
Environment Variables:
cp .env.example .env
-
Run the development server:
npm run dev
-
Open your browser: Navigate to http://localhost:3000.
- Open the app and connect your Web3 wallet (e.g., MetaMask).
- Ensure your wallet is connected to the correct network for the assets you want to swap from.
- Type your command into the input box. Examples:
"Swap 0.1 ETH for BTC""Convert all my USDC on Arbitrum to MATIC on Polygon""I need $50 worth of AVAX"
- The AI agent will parse your request and show you a confirmation screen with the details from the SideShift API.
- Review the details carefully and click "Confirm".
- Sign the transaction in your wallet popup.
- Wait for the magic to happen! You can track the swap status directly in the chat.
- Frontend: Next.js, React, Tailwind CSS, Web3.js
- Backend: Next.js API Routes, Node.js
- APIs: SideShift.ai API, OpenAI GPT-4 API
- Auth: Web3 Wallet Connection (MetaMask)
- Limit Orders & DCA via natural language.
- DeFi Integration (e.g., "Swap and stake").
- On-chain agent reputation system.
- Mobile app with superior voice integration.
- Voice input is highly experimental and may not work in all browsers.
- The agent can sometimes misparse very complex or ambiguous commands.
Built with ❤️ for the SideShift.ai Hackathon.