A Lens Reference Module that enables real-time monetization of your content.
This is a Lens Reference module that uses superfluid money streams for Lens users to monetize their posts; as long as the sponsor profile has a stream open with the creator, they can mirror a specific Lens publication. When creating a post, a creator specifies the reference module to be the SponsorModule, and specifies some params - the accepted SuperToken, the minimum (in wei) to be paid per second, and a tag for the brands/topics they want to be associated with [hashtag, ENS, lens handle] so when brands comes to the marketplace, they have a list of posts to choose from. Brands can come to the platform, search for content by tag [hashtag, ENS, lens handle], choose one, and begin process for re-share. The process is to create a money stream with the SponsorModule as the target (the contract redirects the stream) and then create a mirror.
So the SponsorModule is a Lens reference module and also a Superfluid SuperApp. It has callbacks for whenever money streams are open with the contract as the receiver; in the callback we decode some data that says what the creator/publication the stream is for, and the sponsor profile is essentially whitelisted to mirror that publication. When a sponsor attempts to create a mirror, we validate against this whitelist as well as whether the sponsor has enough balance to cover the minimum sponsorship timeline. We have the whole thing deployed on a local hardhat node (lens protocol + module) and we also have a local graph node running to index events, like when a post is created with the sponsor module attached (MadPublication) and the associated entities for the creator, the sponsor, and the money stream.