project screenshot 1
project screenshot 2

stems-nft-hack

Using Superfluid for real-time money streams and The Graph for indexing on-chain data, NFTs can now showcase “sponsors” that provide ongoing revenue streams.

stems-nft-hack

Created At

NFTHack 2022

Winner of

trophy

🥇 Best use of Subgraph

Project Description

This project shows how we can combine two protocols to create a totally decentralized product that incentivizes ongoing tipping streams for creators of NFTs. The idea with the stems is that if an artist produces a NFT collection that a represents a song and allows 50 people to "co-invest", it enables the artist to pay dividends to these early investors. If one day Eminem sees an NFT collection he likes and uses a stem (tokenId 5, for example) he can create a money stream (using superfluid sdk) that pipes money to the artist behind the steam. When Eminem does this, he creates an on-chain record (using SuperFluid SuperApp callback) and so any auction house (wanted to use Zora) that reads this data from the StemsFactory subgraph can either render a "leaderboard" of sponsors or just pull the top one (by flowRate) and load the ENS profile (wanted to use davatar) - which should load his current bored ape :)

How it's Made

Gonna list it all out: I used the ERC721 implementation from rari-capital (gas efficient) and used the factory so that I could use a custom subgraph (built using the graph) to track all created collections (had to look into the dynamic datasources docs, so that was cool). I made each ERC721 contract a SuperApp (superfluid) so that it could react to streams created/updated/deleted). This was so that I could emit an event for a "sponsor" of an NFT collection - and to be more granular, I used their encoded userData prop so that I could pull it out of the context object in the solidity. I thought this could be used to do some kind of stream split between the artist and the token holder - but I didn't have time to do this. Given more time and/or a fullstack team member I could integrated zora auction house + the ENS integration - but. I'm actually satisfied with having a good understanding of how SuperFluid works and being able to quickly spin up a subgraph in under 3 hours.

background image mobile

Join the mailing list

Get the latest news and updates