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

Ixnay

Decentralized social network using IPFS, Filecoin via Web3 Storage and Polygon

Ixnay

Created At

ETHOnline 2022

Project Description

This project is aimed at making "likes" something of value. The current social networking paradigm is broken. Hearts everywhere and run by bots. By leveraging the power of blockchain and decentralized services, I have come up with a solution to this. By bringing some value to invites and like tokens, you eliminate this threat of bots and frivolous "likes" to a large degree while bringing some value to all the "hearts" you give. I have not yet decided on if the like tokens should be released on a time schedule or priced on bonding curve depending on the number of users in the app, but this is an option to make it "exclusive" if so desired in the future.

Below is a simplified user flow:

  1. I purchase an "Invite Token" or get a free one via my wallet (I.e. metamask) if the initial free invites have not been reached.
  2. Once my wallet holds the invite token, I can access the site.
  3. I can now see all the posts, the ability to purchase like tokens, and have the ability to create a post.

How it's Made

I built Ixnay using Reach lang to write the smart contracts, ReactJS on the frontend, styled components for styling the UI, Web3 Storage for storing the "post" content, Polygon as an L2 network, and ERC20's as the invite and like mechanism.

When a user "connects" to Ixnay, I am checking the user's wallet for the invite token ERC20. If the connected wallet has the invite token, content shows, if not, appropriate messaging is provided with the ability to purchase an invite token in the application.

Now that a user has an invite token (only one is required), the user can access the content and features of the application. The next step is either to create a post or like an existing post. In order to "like" a post, one needs like tokens (a different ERC20).

To purchase like tokens, you click a button in the app. The "auth" contract (that's what I am calling it), checks if you have the invite token before "processing" the payment/transaction. There is no possible way to buy invite tokens without an invite token. Although, you could of course receive them from someone if they were nice to you.

Now that you have an invite token and a like token "bundle" (currently a purchase of like tokens distributes 100 like token ERC20's to your wallet), you can "like" a post and see your like token balance in the application. Liking a post effectively sends a like token from your wallet to the creator of the post's wallet via a smart contract interaction.

Every "post" is a piece of content on IPFS and Filecoin (Web3 Storage) with an associated smart contract linking the two. Below is what happens when you create a post:

  1. I click "Post"
  2. Using views, I am getting the like token Id and invite token Id from the main "auth" contract
  3. A smart contract is created using the custom "post" contract "template" and setting the invite token Id and like token Id in said post contract
  4. The post contract can now check for the invite token and receive the like token(s) associated with the app (every post uses/expected the same invite token and like token associated with the application)
  5. The contract address from the contract produced in step 3, is uploaded along with the post data into IPFS/Filecoin using Web3 Storage

The biggest problem I forsee with this is then number of signings when liking a post. The current infrastructure requires 3 signings to like a post on Polygon.

  • 1 for token permission to send the invite token (the contract checks for this then issues it back immediately) - to check if its a valid user
  • 1 for token permission to send the like token
  • 1 for the actual transaction

If there would be a solution to this and if I could find a network to speed up these transactions, that would be a game changer.

Sometimes the post take a while to be fetched from web3 storage.

background image mobile

Join the mailing list

Get the latest news and updates