@SolendAPY_bot is an autonomous Twitter bot that posts analytics of the APYs available in the Solend Protocol so that users can make decisions on how to efficiently lend and borrow their tokens.
- View demo video on Youtube
- Check out the bot account Twitter
- Read a more detailed description on Github
- Give Solend users updated and transparent APY information on their Twitter feed, so that they can make decisions on how to efficiently lend and borrow their tokens
- Build the foundation of an analytics website for Solend to show the trends on APYs and other stats. Solend does not currently provide any official solution for this.
- Contribute to Solend's growth
- Learn new technologies by building a project
The idea came from a tweet where the Solend team proposed valuable projects for the community.
What it does
A cronjob summons @SolendAPY_bot every once in a while to gather data from the Solend addresses, and post the generated images to Twitter. You don't need to navigate to solend.fi every five minutes to see what is the current APY, you have it right on your feed! Analyze the trends and invest your crypto wisely!
How we built it
The bot lives inside a docker image for portability and simplicity reasons. The container has all the required dependencies for the
./solend-apy-bot rust binary to run successfully, such as the static files for the frontend or headless chrome to take the screenshots. Once execution has finished, all the artifacts generated by the bot are thrown away. In order to save the data points needed to generate the weekly summary chart, a mongodb database is hosted outside of the docker container.
Challenges we ran into
Generating images programatically can be quite challenging, most of the tools and libraries available are not very flexible and definitely not as responsive as the web can be. That's why we decided to go the extra mile, create a frontend, launch a server locally and take screenshots of the tables and charts using headless chrome. This choice increased the dependencies the bot relies on, hence the needed of dockerizing it to make it robust and portable.
Accomplishments that we're proud of
- Fetched and unpacked on-chain data from Solend addresses
- Generated eye-catching images
- Made the bot stateless
- Kept execution time less than 1 second (from call to tweeting the image)
- Saved data points on external database for weekly summary charts
What we learned
I had the opportunity of using Solana, Vue, Docker MongoDB and Actix for the first time and learnt a lot in the process!
What's next for Solend APY Twitter Bot
- Retrieve other useful information such as TVL, total borrow and supply quantities, etc.
- Eventually evolve into an interactive analytics website for Solend
- Keep adding new tokens as soon as they are listed on solend.fi
- Clean the code and make it bulletproof since some errors are currently not being handled
Feel free to submit any feature request you would like to see implemented.
Log in or sign up for Devpost to join the conversation.