project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5

SwapChat

SwapChat: A smart DeFi app that uses GPT-based AI for seamless crypto swaps. Connect MetaMask, chat about your trading intent, confirm, and trade. Powered by OpenAI, 1inch Fusion SDK, Metamask and React.

SwapChat

Created At

ETHGlobal Paris

Project Description

SwapChat is an innovative DeFi application that leverages the power of GPT-based AI to offer users a seamless and intuitive crypto trading experience. Users connect their MetaMask wallets and chat naturally with the AI, expressing their trading intent to sell/buy tokens or rebalance their portfolio. The AI recognises this intent, verifies it with the user, and executes the trade via the 1inch Fusion SDK.

One of the main challenges faced during the development was precise prompt engineering to recognise user intent accurately. This was overcome with rigorous trial and error. Other technical difficulties included handling version incompatibilities among dependencies and connecting MetaMask to the frontend. Thanks to robust teamwork and resourceful problem-solving, these challenges were successfully overcome. SwapChat offers a unique trading experience by utilising GPT-4, 1inch and a minimal frontend to facilitate seamless trades.

How it's Made

SwapChat's backend is developed in Python and JavaScript, with the frontend built on React. The frontend communicates with the backend using FastAPI. We use Metamask to connect the wallet on our frontend. The wallet token balances are retrieved via Alchemy API. Precise prompt-engineering enables the user's swap intents to directly be formatted into json by the language model. If no intent is recognised, the model talks normally to the user. The intent is properly formatted with python and javascript and then used in the 1inch SDK to place the fusion order.

background image mobile

Join the mailing list

Get the latest news and updates