Skip to content

Instantly share code, notes, and snippets.

Last active March 19, 2023 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabit3/f273d3accdec6bc6edfaf6d983942ffc to your computer and use it in GitHub Desktop.
Save dabit3/f273d3accdec6bc6edfaf6d983942ffc to your computer and use it in GitHub Desktop.
Example JSONL data for Lens Protocol
{"prompt":"What is Lens Protocol ->","completion":" Lens Protocol is a Web3 social graph on the Polygon Proof-of-Stake blockchain. It is designed to empower creators to own the links between themselves and their community, forming a fully composable, user-owned social graph. The protocol is built from the ground up with modularity in mind, allowing new features and fixes to be added while ensuring immutable user-owned content and social relationships. Lens Protocol seeks to solve major issues in existing social media networks. Namely, Web2 networks all read from their unique, centralized database. There is no portability. Your profile, friends, and content are locked to a specific network and owned by the network operator. This causes each network to fight a zero-sum game for your attention. Lens Protocol corrects this by being a user-owned, open social graph that any application can plug into. Since users own their data, they can bring it to any application built on top of Lens Protocol. As the true owners of their content, creators no longer need to worry about losing their content, audience, and livelihood based on the whims of an individual platform's algorithms and policies. Additionally, each application using Lens Protocol benefits the whole ecosystem, turning the zero-sum game into a collaborative one. Developers can design meaningful social experiences without needing to turn to feedback mechanisms to lock in a user's attention END"}
{"prompt":"what is the purpose of Lens Protocol ->","completion":" The purpose of the Lens Protocol is to empower creators to own the links between themselves and their community, forming a fully composable, decentralized social graph. This is achieved by allowing users to create profiles and interact with each other via these profiles. 'Profile' (as used here) refers specifically to Lens profiles; 'user refers to standard crypto-wallets. The protocol is built from the ground up with modularity in mind. Lens Protocol is currently overseen by a multisig, which will be expanded to a broader DAO, which can develop and vote on new modules and expanded functionality. END"}
{"prompt":"give me an overview of Lens Protocol ->","completion":" The purpose of the Lens Protocol is to empower creators to own the links between themselves and their community, forming a fully composable, decentralized social graph. This is achieved by allowing users to create profiles and interact with each other via these profiles. 'Profile' (as used here) refers specifically to Lens profiles; 'user' refers to standard crypto-wallets. The protocol is built from the ground up with modularity in mind. Lens Protocol is currently overseen by a multisig, which will be expanded to a broader DAO, which can develop and vote on new modules and expanded functionality. Architecture Let's first dig into profile creation and publishing. Users must create a profile on the hub, for which they will receive a sequentially ID'd profile NFT. This NFT controls the profile, and thus, its owner becomes the de facto controller of the given profile. Profile owners can: Publish to the profile. Publication types are: Post: A standard piece of content. Comment: A standard piece of content with a pointer to another publication. Since comments include a pointer, this executes the pointed publication's 'reference module' logic, if any. Mirror: The equivalent of a 'share in a traditional sense, having no content but a pointer to another publication. Since mirrors only include a pointer, this executes the pointed publication's 'reference module' logic, if any. Set the profile's 'follow module: This whitelisted logic contract determines the logic that must be executed when a wallet attempts to follow the given profile; for example, some followers may incur a fee to the profile owner via the fee follow module contract. Set the profile's image URI Set the profile's 'dispatcher': This is an address that can act on behalf of a profile's owner; it can: Publish to the given profile. Set the given profile's URI. Regular wallets can: Follow profiles: This executes the profile's 'follow module' logic, if any. This mints the following wallet a 'follow NFT' unique to that profile and sequentially ID'd. Follow NFTs have a custom URI set by profile owners. Collect publications: This executes any logic in the publication's 'collect module' If the publication is a mirror, this is executed on the originally mirrored publication with a referral. This mints the collecting wallet a 'collect NFT' unique to that publication and sequentially ID'd. Collect NFT URIs point to the collected publication's URI. Tokenization The Lens protocol has three layers of tokenization via ERC721 NFTs. All three are ERC721-compliant and fully composable. The LensHub upgradeable contract is the core entry point for the majority of interactions in the Lens Protocol. Nearly all interactions begin and doubles as the ERC721 NFT contract for profile NFTs, which are minted upon profile creation. Upon a profile's first follow, a FollowNFT contract is deployed (via minimal proxy cloning), unique to the profile; this is the ERC721 NFT contract that represents follower positions. Lastly, upon a publication's first collect, a CollectNFT contract is deployed (again, via minimal proxy cloning), unique to the publication; this is the ERC721 NFT contract that represents collected publications. Note that follow and collect NFTs are deployed only upon the first follow\/collect, respectively. This reduces gas overhead for profile creation. Modularity Modularity is at the core of the Lens protocol. Everything is built with community expansion and the continued development of new, innovative features in mind. Modules are standalone, governance-whitelisted contracts that adhere to a specific interface. They hold state and are unlimited in potential scope beyond adhering to the interface. There are three types of modules: Follow modules: a. These modules are tied to a profile and contain logic to be executed upon a user attempting to follow the given profile. Collect modules: a. These modules are tied to specific publications (except mirrors, which cannot be collected) and contain logic to be executed upon a user attempting to collect the given publication. Reference modules: a. These modules are tied to specific publications and contain logic to be executed upon a user attempting to comment or mirror the given publication. b. Note that the original content and its reference module are used in the case where a mirror attempts to point to a mirror. Closing Notes The Lens Protocol is a composable social graph protocol built to be community-owned and ever-evolving. It empowers its users by allowing them to decide how they want their social graph to be built and how they want it to be monetized, if at all. Furthermore, the protocol is engineered with the concept of modularity at its core, allowing for an infinitely expanding amount of use cases. This, from the user's perspective, translates to a new paradigm of ownership and customization that isn't possible (or financially feasible) in Web2. END"}
{"prompt":"lens protocol: Profile: ->","completion":" The Profile NFT is the main object in the Lens Protocol. It is ownership over this NFT that gives you control of your content. Individual addresses own ProfileNFTs, and an address can contain multiple ProfileNFTs. What differentiates the Lens Profile NFT from other on-chain identities is the ability to post Publications to it. The Profile NFT contains the history of all of the posts, mirrors, comments, and other content you generate.\n\nAdditionally, Profile NFTs contain a FollowModule. This module contains the logic that allows different accounts to be issued Follow NFTs to record their relationship to the main profile on-chain.\n\nProfiles can only be minted by addresses that have been whitelisted by governance. This ensures that, given the low-fee environment present on Polygon, the namespace is not reserved by squatters. If you are building an application on Lens that requires the minting of Profiles, please join the Discord and get in touch! END"}
{"prompt":"lens protocol Publications ->","completion":" publications are the lifeblood of the Lens Protocol. They are all of the original content, comments, and mirrors produced by creators, curators, and users alike. Publications come in three primary types: posts, comments, and mirrors. Posts are the base object, with mirror and comment providing additional functionality. To learn more about Mirrors and Comments please go to their respective documentation pages.\n\nPublications are posted directly to a user's ProfileNFTs; this ensures that all content created by a user remains user-owned and in their wallet. Publications are NOT NFT's.\n\nPublications have a ContentURI which points to the specific content the publication contains, this can point to text, an image, a video, or other arbitrary content stored on either a decentralized protocol such as IPFS or Arweave, or a centralized storage provider like AWS S3.\n\nPublications also have two attached modules, a Collect Module, and a Reference Module. The Collect Module contains the logic that allows other users to mint your publication into an NFT. This NFT will reference the original Publication's URI. The Reference Module controls references to the publication itself. It contains the logic that determines who can comment and mirror the publication. END"}
{"prompt":"lens protocol: comments: ->","completion":" Comments allow users to provide additional commentary on other publications. They are treated the same as base Publications with extra checks and features. Like publications, comments live in the user's Profile NFT and therefore are wholly owned by the user.\n\nSince comments reference other publications, they are subject to the original publication's Reference Module conditions. If a publication has a reference module that limits comments only to accounts who follow the original poster, and the commenter does not hold a Follow NFT, the transaction to comment will fail.\n\nJust like regular publications, comments also have Collect and Reference Modules. Collect modules define how a comment can be minted into an NFT that references the comment's ContentURI. The Reference module contains logic that determines who can comment or mirror the new comment. END"}
{"prompt":"lens protocol mirrors ->","completion":" Mirrors are the curation tool of the Lens Protocol. They are the protocol's equivalent to reposting or re-amplifying content. Mirrors are treated the same as publications with a few additional checks and a few more minor features. Since mirrors reference other publications, they are subject to the conditions of the original publication's Reference Module. If a publication has a reference module that limits mirrors only to accounts that follow the original poster, and the mirroring account does not hold a Follow NFT, the transaction to mirror will fail. Since mirrors only repost existing content, they do not have a ContentURI field and therefore cannot be collected and do not have a Collect Module of their own. Mirrors can have their own reference module, which can define what accounts will be able to mirror or comment on the mirror. END"}
{"prompt":"lens protocol Collect ->","completion":" Collects allow creators to monetize their content. Because creators own their content via the Lens Protocol, they are able to allow their followers to purchase that content. When a user posts a publication to their Profile NFT they have the option to set a Collect Module. This module will allow other users to mint NFTs that link to the publication's ContentURI. This module can contain any arbitrary logic to apply to the minting process and the resulting NFT. A creator can attach a collect module that allows collecting to be open for a certain amount of time or only allow a certain number of collects. Developers can also make their collect modules to add even more functionality! END"}
{"prompt":"lens protocol Following ->","completion":" 'Following' on the Lens Protocol differs from following in Web2 social applications. When users follow a profile on the Lens Protocol, they are given a Follow NFT, which creators and communities can encode with additional value. Profiles NFTs can attach a particular Follow Module to each ProfileNFT, which contains all of the logic used to determine if a user attempting to follow the profile should be issued a Follow NFT. For example, a profile could attach a follow module that requires a user to pay 5 MATIC to receive a Follow NFT. The ID of each newly issued Follow NFT for given profile increments by 1, such that the first follower's NFT has an ID of 1; the tenth has an ID of 10, and so on. Additionally, Follow NFTs have built-in governance capabilities, such as vote delegation, to allow for the creation of Social DAOs using Lens Protocol. Creators, DAOs, or other organizations can create voting strategies using Follow NFTs and their various properties--for example: 'The first 1000 follows have one vote each' or 'The longer you have followed, the more voting power you have.' We look forward to seeing all of the new Follow Modules and Follower Governance strategies the community comes up with! END"}
{"prompt":"lens protocol Integrations - Embeds and custom links ->","completion":" In addition to building applications directly on Lens, you may want to integrate Lens into other new or existing applications. Lens Protocol provides a variety of social features, including profiles, content, comments, and monetization, which can be easily integrated. With our API, you can quickly access a large user base and generate network effects with less effort. You can do this by providing features like sharing to Lens, following on Lens, or signing in with Lens in your application. END"}
{"prompt":"what is Lens Protocol ->","completion":"Tired of being at the mercy of social media platforms’ algorithms and policies? Then take your talents to Web3 by minting a decentralized social profile with Lens Protocol. It’s 2017 and fidget spinners are all the rage. So here you are, running Facebook ads to get those useless thingamajigs in front of millions of eyeballs. At first, the Facebook black box made you feel like you were just throwing money into a trashcan bonfire and praying for sales. But after staying the course, the algorithm gods decided to bless you with double-digit returns on ad spend. Ka-ching. Lens Protocol is a decentralized social graph that developers can leverage to build social dApps, and creators can use it to take ownership of their content and audience. That is, until Facebook’s AI went rogue and shut down your ad account with zero rhyme, reason or warning. Ooph. Any luck appealing or even getting a human rep on the phone? Nope, you’re just stuck in limbo with thousands of dollars in dead stock trying not to freak the F*** out. Unfortunately, having your account banned or censored is pretty common among Web2 entrepreneurs and creators. Web3’s vision is to do away with centralized platforms and give users full control over their livelihood. And Lens Protocol represents a giant leap forward in decentralized social media. What say you and me get down to the root of what makes Lens Protocol so special? Lens Protocol is a decentralized social graph that developers can leverage to build social dApps, and creators can use it to take ownership of their content and audience. What’s better is that Lens Protocol is brought to you by the same team behind the most valuable DeFi lending protocol in the world: Aave ($AAVE). In January 2022, the Lens Protocol team published an open letter espousing the need for Web3-native social media. And in a matter of months, tens of thousands of people signed the letter in support—including big names like 3LAU, co-founder of the music NFT marketplace Royal. So, what’s the big deal with decentralized social media anyway? Well, the Web2 social media landscape is currently controlled by a few monoliths like Facebook, LinkedIn, Twitter and TikTok. And while they get props for building engaging (*cough* addictive) and easy-to-use products, their centralized models come at a cost. These companies censor and ban accounts willy-nilly and hold your data hostage so you can never leave them willingly. For online creators, this means your ability to put food on the table is at the mercy of a faceless corporation. Gulp. With Lens’ decentralized social graph, users can port their content and audience to any application built with the protocol. A positive side effect of this is that Lens-powered dApps are incentivized to design the best experiences to retain users since they can’t just lock them in and bombard them with ads. Planting seeds: How Lens Protocol works Lens Protocol is built on the Ethereum ($ETH) scaling solution Polygon ($MATIC), both for its low costs and low carbon footprint. The protocol was also designed in a modular fashion, allowing new features to be added in the future without disrupting existing user data. Additionally, Lens Protocol supports many of the social media features you’ve grown accustomed to, like commenting and resharing — with a non-fungible twist. Profile NFTs Every social profile on Lens Protocol is an NFT that contains all the content you create. Profiles can even be owned by multiple addresses, for instance, a DAO (Decentralized Autonomous Organization). Example Lens Protocol profile Source: Follow NFTs Users also generate an NFT for every profile they follow. The unique ID associated with these NFTs can in turn be used to, for instance, reward early users of a platform. Publications Lens Protocol supports all media types, from text and photo to audio and video, with user posts showing up as publications. In terms of storage, Lens Protocol data can be stored on both centralized databases or decentralized solutions like IPFS (InterPlanetary File System). Collect & comment Outside of being able to comment on publications, users can also curate publications in a collection. Creators, on the other hand, can directly monetize their content by charging users a small fee to collect. Mirror Finally, Mirrors are the Web3 equivalent of reposting content. This simple feature can also be an affiliate money maker, where you earn a cut from anyone who collects the original content through your share. Key features of Lens Protocol Source: The team behind Lens Protocol didn’t skimp on security either, with their code being audited by leading blockchain security company PeckShield. Not to mention they’ve launched a bug bounty program that will pay developers up to $250,000 for identifying critical bugs. Growing the garden: Apps powered by Lens Protocol Since Lens Protocol is open source, developers have wasted no time building on top of it. Existing Lens dApps include LENSFRENS for finding other Lens profiles with similar interests and IRIS for subscribing to token-gated content. In a similar vein to their bug bounty program, Lens Protocol is offering $250,000 in grants to developers to build on Lens. As we speak, Lens devs from all around the world are working on new features and tools like: Social based verification Fair launch drop mechanics DAO profiles Decentralized social analytics platforms Content moderation tools Snakes in the grass: Lens Protocol’s challenges The ultimate goal of Lens Protocol is to create an ecosystem of independent social media platforms built on top of its decentralized social graph. But the Lens team has had to make some trade-offs to get there. As of today, Lens Protocol is permissioned because only the original signers of the open letter can create a Lens profile. Sucks, right? But Lens Protocol founder Stani Kulechov has reassured everyone that more users will be given access in the near future. Lens Protocol is also currently being overseen by a multisigature (multisig) wallet, which is basically a semi-centralized committee, though the intention is to transform Lens into a DAO later on. The protocol also stresses that this multisig does not have the ability to move or delete user funds and follower NFTs. The final challenge worth mentioning is that Lens Protocol isn’t the first mover in the decentralized social media space—though no protocol has quite cracked it yet. One of the earliest attempts, Steemit ($STEEM), was a top 10 crypto project back in 2016. But as of June 2022, the project slid all the way down to #275 on Coinmarketcap. Present-day, we’ve got decentralized social media protocols like DeSo ($DESO), Minds ($MINDS), and Twitter’s soon-to-be-released Blue Sky project. DeSo, in particular, is a layer 1 blockchain that also enables developers to build social media platforms. One of DeSo’s most successful projects is BitClout, a social media platform where you can buy “creator coins” tied to influencers like Mr.Beast and Kim Kardashian. To add to further tension between Lens Protocol and DeSo, both project founders have thrown shade at each other in interviews. DeSo founder Dylan Lee doesn’t think that Lens Protocol can scale on a general-purpose blockchain like Polygon due to gas fees. But Lens Protocol’s Stani Kulechov refuted this, and in turn labeled DeSo as a platform for speculation. Who’s to say which platform will end up winning the decentralized social media race? But my money is on Lens, despite the fact that they don’t even have a token. END"}
{"prompt":"what is Lens Protocol ->","completion":" Lens Protocol is a blockchain-based open-source social graph created to reshape the future of social media concepts in the era of Web3 and decentralization. Unlike contemporary Web2 social media platforms like Twitter or Facebook that use social graphs to develop interconnections among users of social networks solely in a centralized manner, Lens Protocol is designed to be permissionless and composable of empowering content creators to 'own their digital roots' and enable people to uncompromisingly own the connections between themselves and the communities. As a result, Lens Protocol development led to the emergence of the decentralized social graph that users totally own, giving them back control of their information and links and even providing features to monetize their content. Lens Protocol was introduced in early 2022 and gained a lot of attention in the blockchain and crypto communities due to the social networking product’s revolutionary nature and the well-known Aave (AAVE) team developing it. As a branch of one of the significant lending platforms in the Ethereum ecosystem, Lens Protocol seeks to address considerable flaws in the current social media environment, which it does quite successfully, gradually gaining a base of dedicated users of a Web3-ready community. How does Lens Protocol work? Lens Protocol’s social graph is established through a graph database (GDB). Such databases utilize graph structures that contain individual nodes, edges as connection points between them, places, things and other properties to store data. These graphs show network members and the relationships between them. However, Lens Protocol’s smart contracts-based social graph differs from the centralized social media graphs since, in the second case, access to the data is available only for the centralized services. Specifically, users, third parties and even projects that might want to integrate with the service do not have access to it. Profiles, content and connections are locked up and kept by the centralized network operator. Furthermore, it is known that any centralized service may lightly become a single point of failure when the single server becomes inaccessible. Focusing on building social networking decentralized applications (DApps), Lens Protocol's open social graph architecture allows any blockchain-based social media platform or DApp to plug into it. Moreover, unlike the structure of centralized services, which cannot be customized, the flexible design of Lens Protocol is based on modularity concepts, allowing the latest features and fixes to be implemented and, at the same time, securing social relationships and user-owned content. Lens Protocol is built on top of the Polygon (MATIC) eco-friendly proof-of-stake (PoS) blockchain. It is also compatible with cryptocurrency wallets like MetaMask, Gnosis Safe and Argent, stimulating interoperability across platforms. What makes Lens Protocol unique? Two core concepts make the Lens Protocol world unique: nonfungible tokens (NFTs) and modularity. Establishing users' profiles as NFTs is central to the protocol. With it, Lens Protocol’s decentralized social network members are empowered to create, maintain and own their content and profiles represented through NFTs, while Polygon’s low-fee layer 2 scaling solution stores all the data. Such architecture helps to transfer full rights and complete ownership of content into the hands of users. Any content posted, whether a text, a picture, or even a change of avatars is available on-chain. Modularity as a system property refers to innovation, availability and connectivity, meaning that the Lens Protocol’s social graph is open to all creators who are willing and ready to propose and implement new features. At the same time, community members have the power to consider whether to endorse such users agreeing upon which features to integrate in the most decentralized and open way. Due to these mechanisms and no central actor controlling the information, new social media networks can emerge, maintaining freedom of speech. The benefits of Lens Protocol The protocol’s advantages lie at its very foundation and the Web3 principles. First and foremost, Lens Protocol’s permissionless independent network creates a censorship-resistant environment that can not be interrupted. No third party, including centralized authorities, could remove or censor any content or ban any profile. With it, Lens Protocol users own their content and data and can utilize them in any social media platform or DApp built on top of the protocol. Furthermore, building a full-fledged Web3 social platform with Lens Protocol is possible. Lens Protocol-based applications benefit from the flourishing ecosystem and profit from the protocol’s modularity and easily customized features. Last but not least, Lens Protocol’s PoS algorithm makes its blockchain energy-efficient and affordable, especially in comparison with the proof-of-work (PoW) algorithm that consumes large amounts of computational power. Risks involved with Lens Protocol Despite the apparent Lens Protocol advantages, the several disadvantages involved should not be ignored. Blockchains are often limited in the amount of on-chain storage capacity, and as a result, not all content and NFTs are stored on this level and require another storage solution. Lens Protocol publications have a special ContentURI pointing to the content the publications contain, whether it is a text, an image, a video, et cetera. All original files are stored in distributed file storage systems such as IPFS, Arweave or even providers like AWS S3. Thus, any users’ content can be potentially manipulated. The storage problem is deeply connected to security issues. If original files are not recorded on a blockchain, they might be lost or damaged. There is also a risk of smart contracts and NFT maintenance as there are several scenarios where hackers can attack decentralized finance (DeFi) networks. How to use Lens Protocol Lens Protocol’s design replicates social media functionality in a Web3 context and on the grounds of blockchain technology, smart contracts and NFTs. Thus, the network’s users have profiles; they can post, share and comment on different types of content and follow profiles of friends and opinion leaders. A Lens Protocol user's journey begins with the creation of the Profile NFT. Ownership over this NFT allows users to add content, link and communicate with others and gives users control over their data. Specifically, the Profile NFT contains the history of all of the users’ publications, reposts (also known as “mirrors”), comments and other content generated. Steps to use Lens protocol The Profile NFT includes an unique Follow feature that allows users to track other profiles. On the Lens Protocol, it slightly varies from the same option in traditional Web2 social media. Its logic enables different accounts to mint Follow NFTs to record their connections. When Lens Protocol users follow a profile, they are given a Follow NFT, which creators and communities can encode with additional value. The Collects feature allows Lens Protocol users to monetize their content. This way, they can set a Collect option when posting a publication to their Profile NFT. As creators fully own their content via the Lens Protocol, they can allow their followers to purchase it under the conditions determined by the original creator. The key part of the Lens Protocol is modules that refer to smart contracts with code running under specific conditions. Lens Protocol modules allow users to introduce unique, custom functionality on features like Follow, Collect and Reference, including interaction with other users’ content, mirrors and comments. The future of Web3 social media In the twenty-first century, people use social media all the time and everywhere, even though social networks are full of cons in their centralized version. The main issues with the current social media ecosystem are the lack of rights to users' data as content that users generate does not belong to them, and censorship, meaning the platforms have the right to censor any information or ban any profile that does not comply with their policies. The benefits of Web3 and blockchain for social media are clear and can have a significant impact by offering new patterns of ownership and customization. They accelerate the revolution currently led by Lens Protocol’s community-owned social graph and similar projects in the social media space. They empower their users and give them control and the ability to decide how they want their social graph to be built and monetized, bringing considerable influence to the communication paradigm. END"}
{"prompt":"what is Lens Protocol ->","completion":" What Is Lens Protocol and How Does It Solve the Problems of Web2? One of the biggest issues with Web2 is centralization and a lack of control, and Lens Protocol is here to change that. Polygon cryptocurrency tokens with golden arrow images Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More. One of the major issues with social media platforms is their centralization, which gives them control over user data. Lens Protocol is set to change how we use social media by giving us control over our content and connections. The project started in 2022 and is gaining traction because it was pioneered by the same teams that created the AAVE protocol. But what is Lens Protocol, and what makes it different from present social media platforms? Lens Protocol is an open-source and composable social graph based on Web3 and built on the Polygon blockchain. The project aims to allow developers to launch social media platforms and profiles based on Web3. It gives creators control over their links with their communities and helps them maintain ownership over whatever content they create. Since Lens Protocol tries to offer solutions to some of the challenges associated with Web2, we need to consider some of these challenges to better understand how Lens Protocol works. The Issues With Web2 Lens Protocol is set to solve issues with Web2 social media interaction. One of the issues with Web2 is the strict autonomy controlled by centralized companies. These companies can choose to suspend accounts at any time, making it possible to lose whatever number of followers and content you already have. Web2 social media platforms moderate comments and posts, and there are forms of censorship on accounts and contents; many are even taken down as unacceptable. Unfortunately, benign posts are often taken down as part of the process. Web2 social media platforms have centralized servers. As a result, your data, account, and followers are controlled by the company that created the platform. Your interaction is within the platform, and the company uses your information and monetizes your content without your permission. Having understood some of the issues associated with Web2 social media platforms, we need to see how Lens Protocol works to see how it tries to solve the problem. How Does Lens Protocol Work? Lens Protocol is a Web3 social graph that functions on a blockchain. It provides an easy way for interested users to create their own social media platform for whatever use they desire. A social graph is a structure that shows interconnections among people and groups in a social network. The structure is created when you create profiles, follow users, create content, and relate to other content. Centralized social media applications like Instagram, Facebook, Twitter, and TikTok use social graphs, among other things, to modify content and create a suitable user experience for users. Lens Protocol, on the other hand, integrates social graphs into a smart contract and allows users to build their social media platforms and communities independently of any centralized control. Unlike centralized social media companies, Lens Protocol's source codes are open and permissionless, allowing anyone to build on them. This access allows you to build follower-specific solutions for those in your network. Lens Protocol enables you to carry out activities similar to those found in Web2 social media platforms, but with a few additional features. We will describe some of them below. Follow Profiles You are given a 'follow NFT' when you follow a profile. You can also attach a follow module, just like a condition, to determine if someone who wishes to follow you should be granted a follow NFT. The condition can be a monetary requirement. Publications These are simply posts and engagements. The posts are the content you produce. You can also comment on and mirror posts. To mirror a post is like sharing what someone else has posted. Your publications have content URIs pointing to the actual data, which can be stored on a decentralized protocol. Collect The collect feature allows you to monetize your content. You can set your parameters for collecting, like the period within which collecting is open, the maximum number that users can collect, etc. You can also sell NFTs with this module. Governance This feature allows you to set up social media account in which followers can vote in making key decisions. How Lens Protocol Will Solve Web2 Issues The Lens Protocol's social graph uses graph structures to store data and connect people, places, things, and other properties. These graphs represent network members and their connections. A picture showing the connection of a blockchain network All Lens Protocol profiles are in the form of NFTs. You have an NFT representing your identity, and you will connect with NFTs to connect with people. This way, everyone involved has control over their identity. The solution helps you form a social graph and control your community. This way, you have the right of ownership over your posts, which others can mirror, just like the resharing features on Web2 social media platforms. You can also transfer members of your community from one social media platform to another within the protocol. Contrary to how it works on Web2 social media platforms, you won't have to start over with getting new followers on another social media platform, as you can easily transfer your community to a new platform. Lens Protocol is censorship-resistant. You have full control over your content, as it is not on any centralized server. Building on Lens Protocol means any centralized authority cannot shut you down since you have full control over your platform and community. Knowing this makes you confident that you are building a lasting, long-term project. Is Lens Protocol Worth It? It depends on what you want, even though it won't be a bad idea to try using the solution, especially if you like exploring new things. With it, you can have your connections and community for whatever purpose you want without the fear that your account will be taken down. The platform allows you to monetize your content. Thus, the whole process of building a community may become truly rewarding. However, you should also be aware that blockchains have their issues. For example, a vulnerability or attack on the blockchain can result in the loss of digital assets. Lastly, social networks necessitate storage and the ability to link profiles, and blockchains have difficulty storing large amounts of data. A two-way solution for data storage is required for this: your data will be stored on the blockchain and in decentralized and centralized solutions like IPFS, Arweave, and Amazon S3. Unfortunately, these storage solutions open your data up for potential damage. END"}
{"prompt":"what is lens protocol ->","completion":" Lens Protocol is a blockchain-based reimagining of social media for the age of Web3. However, unlike contemporary social media platforms, this offshoot of the Aave project embraces decentralization and wants all users to own their content and even monetize it. What are Lens Protocol’s chances of starting a social media revolution for web3? Is blockchain technology bound to be involved in the future of social media? In this comprehensive article, we look at this, as well as what Lens Protocol is and how it works. How does Lens Protocol work? What makes Lens Protocol unique? Benefits of Lens Protocol How to use Lens Protocol Other aspects of Lens Protocol Does Lens Protocol have a token? Can Lens Protocol revolutionize social media? Frequently asked questions. Lens Protocol homepage Lens Protocol is a project that is looking to reinvent the concepts and possibilities of social media in the sphere of web3. In web2, social media companies create their social graphs in a centralized manner. A social graph includes nodes that represent individuals, organizations, and the relationship between them. Typical social media platforms that utilize social graphs have all the information recorded in a centralized manner. In other words, the users do not actually own the information used on the platform. The use of blockchain technology can help give regular users back some control in web3. Lens Protocol presents itself as a decentralized and composable social graph that functions on blockchain. The program looks to provide easy ways for interested parties to create their web3 social media platforms. User ownership sits at the heart of the social graph, and the customizability of the features is an essential part of the project. The project has received a good deal of attention since its announcement in early 2022. Much of this is due to the team working on it. The project is an off-shoot of Aave, one of the essential lending platforms on Ethereum, and the brainchild of company founder Stani Kulechov. Sponsored Sponsored How does Lens Protocol work? At the heart of the project is the use of a decentralized social graph. Creating this is generally achieved through the use of a graph database (GDB). A GDB uses graph structures that include nodes, edges, and various properties, for storing data. In other words, these graphs show the participants in a network and the relationship between them. To understand how Lens Protocol actually works, it is best to know how it is different from its current competitors. There are several ways of structuring a social graph. Most high-profile social media platforms, such as Facebook or LinkedIn, use a centralized service. Data silos are used in the creation of social graphs as well. In this scenario, other applications that may want to integrate with the platform do not have access to data. This means that the structure of the platform is not customizable. It also means that the platform can be subject to a single point of failure, where it can be rendered unusable if the server becomes unavailable. Lens Protocol uses an open-source and composable social graph. This can be used freely by creators looking to establish their own social media platform on web3. User profiles are represented through NFTs. The Polygon PoS layer 2 solution stores all the profiles. Furthermore, the platform is compatible with wallets such as MetaMask, Gnosis Safe, and Argent. This encourages interoperability across platforms. What makes Lens Protocol unique? Sponsored Sponsored Lens Protocol promises to offer the tools to create a decentralized social media world and a level playing field for those interested in creating their own. Any content posted by the user, whether it’s an avatar change or a body of text, is available on chain. The use of modularity means that innovative users can create new features. It is then up to the community to decide whether to endorse them. In other words, these tools can make the information and the type of information being distributed free and agreed upon by the members of the community. Lastly, Lens Protocol hints toward a new era of connectivity in the much-anticipated web3. The composable, decentralized social graph is available to all creators. With it, new social media platforms can emerge. This is a guarantee for the survival of free speech. And it is a way to ensure that the information you share on your social media profiles remains yours. Benefits of Lens Protocol Lens Protocol benefits Lens Protocol’s tools exist to serve the web3 community. The protocol is, technically, usable by anyone looking to create a new social media platform. Furthermore, these features should be easily customizable. The community is the one to decide which of these features are most often integrated. The benefits of the Lens Protocol include the ownership of data, better connectivity, access to more information, a permissionless network whose service cannot be interrupted, and the lack of a central actor controlling the information. How to use Lens Protocol Sponsored Sponsored Lens Protocol’s design makes it easy for creators to start their social media profiles or for web3 supporters to connect with other users. There are a few key concepts that the protocol employs to achieve these purposes. The creation of a profile NFT is the start of a user’s journey on Lens Protocol, and each profile is represented by one. Having a profile allows the user to add content or connect with others. When such a connection is established, an NFT-721 asset will be created and will show as the equivalent of an NFT-follow. The central concept revolves around the idea of profile NFTs. Each user can create one, and this will enable them to maintain complete ownership over their content. These profiles integrate all the posts, comments, reposts (known here as mirrors). In the Lens Protocol ecosystem, these are all referred to as Publications. It is worth mentioning that individual addresses own these profile NFTs, and that an address can own multiple NFTs of this kind. The module is another important concept of Lens Protocol. The modules allow users to introduce custom functionalities to the system. Each of these modules represents a whitelisted smart contract with code that runs under specific conditions. The system includes three types of modules. Follow modules represent the action of a user following another profile. Users set up their follow modules when creating their unique profiles. They follow a subscription model and are highly customizable. Collect modules is the one used for creating online articles. Reference modules exist for interacting with other users and commenting on their posts. Other aspects of Lens Protocol how to use Lens Protocol’s design, essentially, replicates social media functions within the context of blockchain technology. The enforcement of each of these concepts occurs through the use of smart contracts. Publications contain all the content produced by creators, curators, and regular users. These include posts, comments, and mirrors. Sponsored Sponsored Comments allow users to add additional content to another profile’s post. All of one’s comments get stored on a chain in that user’s Profile NFT. Mirrors are similar to reposts and allow for content to be distributed further through the network. The mirrored content is subject to the conditions dictated by the original profile that originally posted it. Collect is a method for creators to monetize their content. Through this, other users can mint NFTs of the content published by the original profile under the conditions stipulated by the original publisher. Follow allows users to track other profiles. The minting Follow NFTs results upon the establishment of such a connection. Each profile may determine the conditions for this kind of connection. For example, a profile may determine that a fee of X amount of MATIC must be paid in such a scenario. Follow NFTs also have a Built-In Governance function. Does Lens Protocol have a token? Presently, Lens Protocol does not feature a native token. However, the likelihood that such a token will be introduced in the future is high. Users that take advantage of the protocol’s innovations right now are right to anticipate this, hopefully. Can Lens Protocol revolutionize social media? Social media use is ubiquitous, but the content that regular users create for these websites is not theirs to own. Furthermore, these websites have the power to censor information that does not adhere to their policies. Web3 offers an improvement, and projects like Lens Protocol are spearheading this transformation. Users can harness the potential of blockchain technology to improve the social media experience, and even customize their social media platform. Whether it’s Lens Protocol or some other project, the benefits of web3 for social media are apparent and could have a significant impact. END"}
{"prompt":"what is Lens Protocol ->","completion":" Before the beginning of the 21st century, social media existed only as an idea but it became a reality shortly after the century. Social media changed the world in many ways, particularly the social interaction of people all over the world. A core part of the infamous social media was the online social graph. The concept of an online social graph is a data structure that shows the relationship between users of social networks, people, places and things get to interact. However, most social media platforms are plagued with the problem of centralization which disallows people to take complete ownership of the connections between themselves and their communities. With Web3 technology already lurking around the corner, some social graphs like Lens Protocol will change the future of social media concepts. In this article, we will discuss the meaning of Lens Protocol and how it works. Lens Protocol is a blockchain-based open-source social graph for redesigning the concept of social media in the Web3 era and decentralized manner. Some Web2 social media platforms like Instagram and Twitter connect all users of the platforms in a centralized way using social graphs but utilising the Lens Protocol in Web3 will give users and content creators permission to control their data. It is designed to be permissionless and give people the power to take charge of the social connections between them and the communities. Lens Protocol gained a lot of traction in the whole crypto community and blockchain since it was developed in early 2022. The quick widespread of Lens Protocol can be attributed to the revolutionary nature of the social networking product and the famous Aave team which also aids in developing it. The result was an emergence of an ingenious protocol which paved way for the birth of the decentralized social graph that users can possess and control, providing options for content monetization and offering them absolute control of their links and data. The current social media space is flawed especially as regards centralization. Lens Protocol intends to address these shortfalls in the social media space and it has already started as it is gradually gaining enormous devoted users of the Web3 community. How Lens Protocol Works Lens Protocol is a social graph which was established through a graph database which uses graph structures that contain private nodes, and other available properties for data storage. The Lens Protocol was built on the Polygon MATIC proof-of-stake consensus mechanism and it shows the relationship between network members. Unlike Lens Protocol, centralized social media graphs make data accessible to centralized services only. Therefore, users, projects or third parties that may want to incorporate into the service cannot access it. The centralized network operators keep and lock up all the profiles, content and connections. Additionally, when the single server becomes inaccessible, the centralized service is vulnerable to weak access for failure. However, by steering towards developing social media decentralized applications (DApps), any social media platform built on the blockchain can plug into the Lens Protocol’s open social graph architecture. Furthermore, Lens Protocol is a more flexible design based on the modularity concept, unlike the centralized services which can not be customized. The modularity of Lens Protocol allows for the implementation of the latest features, and security of user-owned content and social relationships. Lens Protocol aligns with crypto wallets such as MetaMask and creates interoperability across platforms. The Advantages Of Lens Protocol The Web3 principles are the foundation of the benefits offered by Lens Protocol. Firstly, given the Lens Protocol does not need permission from any centralized operator, it creates an environment void of censorship and interruption. Third parties which include centralized authorities will not be able to remove, censor content or ban any profile. This gives Lens Protocol users power over their content and data. They can further use them on any social media platform existing on the protocol. Again, it is possible to build a complete Web3 social platform with Lens Protocol when its application gain from the protocol’s modularity and customized features. Finally, the PoS consensus mechanism of the Lens Protocol is energy efficient and very affordable, unlike the large energy consumption experienced by the PoW algorithm. The Disadvantages Of Lens Protocol Even though Lens Protocol has its benefits, there are some challenges involved in this protocol which should not be overlooked. Lens Protocols have a storage problem which can be connected to security issues. The amount of on-chain storage capacity in a blockchain is limited, hence, not all content and NFTs are stored at this level causing the need for another storage solution. All publications in Lens Protocols have a special ContentURl which indicates the content the publications contain. The content can be text, an image, a video etc. Some distributed file storage systems like IPFS or Arweave store the original files, which makes any user’s content very vulnerable. Additionally, NFT maintenance and smart contracts are risky as hackers have attacked decentralized finance (DeFi) networks severally. Lens Protocol And Its Usage Lens Protocol was designed to mirror social media functionality but in a Web3 setting using blockchain technology, NFTs and smart contracts. Just like many social media platforms in Web2, the Lens Protocol’s users can post, share comments, update profiles, follow profiles of friends etc. The first step of a Lens Protocol user is to create the Profile NFT. Possessing this NFT is a key to adding content, linking, communicating and gaining control over your data. The Profile NFT permits users to track other profiles through the personal Follow feature. This is not exactly the same option in Web2 social media. When a user of Lens Protocol follows a profile, they get a Follow NFT which can be encoded with additional value. The Collects feature of Lens Protocol allows users to monetize their accounts by setting a Collect option when uploading a publication to their Profile NFT. By being totally in possession of their content, creators can sell it to their followers under certain determined conditions. Conclusion Social media platforms have become very common among people in this 21st century, even though the networks are largely flawed in their centralized version. Users have suffered the lack of rights to manage their data because content generated by users does not belong to them and they are quite censored as well. This gives the centralized platforms the right to take down profiles that defaults in their stipulated policies. Web3, through Lens Protocol, has shown the possibility of offering users a decentralized pattern of data ownership and customization on social media. END"}
{"prompt":"what is a Lens Protocol Module ->","completion":" Modules are an integral part of the Lens Protocol: they allow profile owners to include unique, custom functionality on follow, collect and reference (i.e. mirrors and comments). This vastly opens the door to exciting new community-created features that greatly expand on the basic Lens Protocol social graph! From a more technical perspective, modules are whitelisted smart contracts that adhere to a specified interface which are called at defined execution steps. In other terms, modules present code akin to 'hooks' that are run at predetermined points. With all that out of the way, this tutorial will guide you through the development and testing of your very own module! Although there are three different kinds of modules that you can build, their construction is fundamentally similar, so this should provide a good foundation. END"}
{"prompt":"what is the smart contract for Lens Protocol ->","completion":" This is the core entry point contract for essentially all interactions with the Lens Protocol. It is an upgradeable contract via the standard OpenZeppelin TransparentUpgradeabilityProxy. This document elaborates on the functions of the implementation, assuming they are called via the proxy. Functions that take a struct as the sole input parameter will display struct members in the parameter table. Note that as a design choice, all NFTs should not mint a token with tokenId == 0 in any circumstance, as this is equivalent to an uninitialized variable. Furthermore, ERC721 standard functions have been omitted from this document. END"}
{"prompt":"what is the Lens Protocol GraphQL API ->","completion":" The API is a GraphQL API which is very similar to how a lot of people use the subgraph when using The Graph so it should be very familiar for many developers. If you have come from a REST backend we will explain how you can easily get up and running with this on your client. GraphQL gives us a lot of benefits but the main one is a schema first approach. We believe for mass adoption and building of Lens we need the tools to be super easy and abstract away as much as the blockchain stuff as we can. You will see how we did this with our schema, everything should just make sense without having a deep technical understanding of how the protocol works or having to understand Solidity. As the protocol data on the blockchain is very relational, our indexer does all the work for you. Mapping it into our Postgres database decoded and in a relational manner optimized for fast fetching. This allows you to query us with the same speed as if you were querying Twitter for example. We have packed the API with a lot of features and will be continuing to develop and improve it. By using this API in your application you automatically inherit many of these improvements. END"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment