Lens Protocol is a Web3 social graph protocol on the Polygon Proof-of-Stake blockchain . The goal is to allow creators to connect with the community, forming a fully composable, user-owned social graph. The protocol has modularity in mind from the start, allowing new features and fixes to be added, ensuring that the content and social relationships that users have are immutable.
It is designed as a user-owned open social graph that any application can plug into. Users own the data and can bring it to any application built on the Lens protocol.
As the true owners of their content, creators no longer need to worry about losing their content, fans, based on changes in algorithms and policies on a single platform.
The Lens protocol is tokenized with three layers via ERC721 NFT . All three are ERC721 compliant and fully composable.
LensHub: Upgradable contracts are the core entry point for most interactions in the Lens protocol. Almost all interactions start with ERC721 NFT contracts, which are minted when the configuration file is created.
FollowNFT: When following a profile for the first time, a contract is deployed, the profile is unique, this is an ERC721 NFT contract representing the follower relationship.
CollectNFT: The first time a publication is collected, a contract is deployed that is unique to the publication, an ERC721 NFT contract representing the collected publication.
Profile NFT
Profile NFT is the main object in the Lens protocol. It is ownership of this NFT that gives users control over their content. An address can contain multiple ProfileNFTs. What differentiates Lens Profile NFTs from other on-chain identities is the ability to publish publications.
Publication
Publications are the lifeblood of the Lens protocol. They are all original content, reviews and mirrors produced by creators, curators and users alike. There are three main types of publications: Posts, Comments, and Mirrors. Posts are the base object, and Mirrors and Comments provide additional functionality.
Publications are posted directly to the user’s ProfileNFTs; this ensures that all content created by the user is owned by the user and kept in their wallet.
A publication has a ContentURI that points to the specific content the publication contains, which can point to text, images, video, or any other content stored in a distributed protocol (like IPFS or Arweave) or a centralized storage provider (like AWS S3).
The publication has two additional modules, a collection module and a reference module. The collection module contains logic that allows other users to mint your publications into NFTs. This NFT will reference the URI of the original publication. The reference module controls the reference to the publication itself. It contains the logic that determines who can comment on and reflect on publications.
Comment
Comments allow users to provide additional comments on other publications. Like publications, comments live in the user’s profile NFT and are therefore fully owned by the user.
As reviews cite other publications, they are subject to the original publication’s reference module conditions.
Just like regular publications, reviews also have collection and reference modules. The collection module defines how comments are minted into NFTs referencing the Comment ContentURI.
Mirror
Mirror is a management tool for the Lens protocol. They amount to a repost or re-amplification of the protocol. Mirror is treated the same as a publication, but with some extra checks and minor features.
Since mirrors reference other publications, they are subject to the conditions of the original publication’s reference module.
Since mirrors only forward existing content, they do not have a ContentURI field and thus cannot be collected, nor do they have their own collection module. Images can have their own reference modules.
Collect
The Collection feature allows creators to monetize their content. Creators own their content through the Lens protocol, allowing followers to buy that content.
When users post publications to their profile NFTs, they have the option to set up a collection module. This module will allow other users to mint NFTs that link to the publication’s ContentURI. This module can contain arbitrary logic to apply to the minting process and the resulting NFT.
Follow
“Following” in the Lens protocol is different from following in a Web2 social application. When users follow a profile on the Lens protocol, they get a Follow NFT that creators and the community can encode to add value.
Profile NFTs can have a specific follow module attached to each ProfileNFT that contains all the logic for determining whether a follow NFT should be issued to a user trying to follow a profile.
Additionally, Follow NFTs have built-in governance features such as voting delegation to allow the creation of social DAOs using the Lens protocol.