Find Your Feed

Find Your Feed

Giving more control and customisation over what posts you want to see and which profiles you want to follow on the Lens Protocol based on which DeFi tokens and NFT projects you like.

Find Your Feed

Find Your Feed

Giving more control and customisation over what posts you want to see and which profiles you want to follow on the Lens Protocol based on which DeFi tokens and NFT projects you like.

The problem Find Your Feed solves

The aim is to give the user more control and customisation over what posts they want to see and which profiles they want to follow based on similar interests. The data available on the blockchain can be made more visually accessible and insightful to the users, instead of some black box algorithm recommending the user’s activities on a decentralised social media application.

This project belongs to the decentralised social media domain and works on improving the base structure provided by the Lens protocol.

Build Your Feed enables users to find profiles to follow based on their own choices of protocols, which they can change from time to time, to get a different view. A user can choose to follow profiles which frequently interact with the user's chosen set of protocols.

It also lets users follow content based on a theme or follow content followed/curated by some celebrity in the form of a list (like Twitter lists, but for Lens). They get the advantage of having multiple separate feeds based on the different lists they follow. Also, they need not follow all the profiles put together in a list, but still enjoy content from those profiles when they view the feed generated by this list.

This project solidifies the ability to have power over whom and what you follow, which is indeed one of the differentiating features of decentralized social media. It will empower users to feel in control of their experience and hopefully drive more people to use applications built on the Lens protocol.

Challenges I ran into

  1. Figuring how to get the interactions of an address with multiple contracts - I tried using Covalent API's 'Get transactions for an address' endpoint however, the data I received was different than what I needed. I came across Alchemy API, which given a user address, returns the ERC20 and ERC721 tokens owned by that address.

  2. To get the information about profiles/following lists on the Lens protocol - Setting up the Apollo client and the queries was relatively simpler. I had to figure out how pagination works and how to fetch more results when the current batch ends.

  3. Displaying an interactive graph in Next.js - I tried using the d3.js library, but it seemed too complex to learn given the time constraint. I decided to go with showing one profile at a time and making the user click on an arrow to show the next profile. This is also because showing a graph is not scalable as the data size increases.

  4. Understanding Nextjs Incremental Statis Site Generation to fetch data about user preferences from the Cloud Firestore - The data is to be fetched based on the user's address. However, this address is only available when the user connects wallet on the client side. Thus I had to restructure my project folders to make the pages load faster.

  5. I also had difficulty in getting the top ERC20 and ERC721 tokens data and had to do some manual scraping from the Etherscan website to get metadata about the tokens and map it to the result returned by the Alchemy API.

Discussion