Easy to create AI bots, but also have a marketplace for embeddable browser AI chat bots
This project let you buy and sell decentralised and fine-tuned chat AI's that help you when surfing the web. The AI's are specifically trained for specific websites and could have certain functionalities like checking if solidity code is save, help you write beautiful poems or many other possibilities.
We created a marketplace smart contract, marketplace platform and a browser extension wallet/AI switcher.
We used foundry for the marketplace smart contract and made the following design decisions:
Keeping track of the sellers' sold products as a mapping
The seller would need to know what was sold, this could help with analytics or simple data, to help them understand what was good and what wasn't. It also serves as an easy way of keeping track of sales within the smart contract.
Keeping track of the sellers' unclaimed funds
When withdrawing sellers should be able to claim multiple funds at once, in order to reduce gas costs, while at the same time they can't withdraw more than they have available.
Viewer methods that accomodate building a frontend
In order to have Seller and Buyer detailed purchases pages, data is being passed in an easier way to incorporate into their respective frontend pages.
Enough simplicity, while ensuring security
The purpose was not to built a groundbreaking Marketplace, but a simple elegant solution, that is secure. Therefore not many variables or contextual logic was implemented.
For the marketplace platform we use phoenix/elixir and the web extension is just plain JS with webllm.
Unfortunately we couldn't fine-tune the AI model good enough, so at the end we kind of failed, but we did learn the following things: