Lens 🛠 Build Web3 Experiences with Lens Protocol - David Silverman, Alan Donoso Naumczuk
ETHGlobal·Sun, Oct 9, 2022, 12:00 AM
Join David Silverman and Alan Donoso Naumczuk of Lens for a workshop titled "Build Web3 Experiences with Lens Protocol". ETHGlobal hosted ETHMexico in Mexico City 🇲🇽 - our first IRL hackathon in LATAM in over four years. This year hackers had the chance to build the future of web3 with a chance to win over $150k+ in prizes from teams like WalletConnect, dYdX, AAVE Grants DAO, as well as experience talks from guest like Vitalik Buterin and Aya Miyaguchi! Thank you to the 580+ attendees from 27 countries who joined us for this unforgettable weekend of learning and hacking. For Mexico, 65% of hackers were from LATAM, and 46% were new to web3! Thank you for being a part of it! ❤️ After ETHMexico, we are heading straight into a full month of learning & building 🏗 Get ready for ETHOnline, our largest online event of the year! --------------------------------------------------- Follow us: https://twitter.com/ETHGlobal Check us out: https://ethglobal.com Email us at: hello@ethglobal.com
Transcript
[Applause] [Music] so yeah so uh i'm david i'm a product manager at lens yeah alan a smart contract developer on lens protocol and we're going to give a quick overview of of how lens works um as well as kind of a bit about how we think about apps that are built on top of lens uh so alan you can start us off yeah okay um is yeah so yeah so as soon as alan was saying uh some of the problems with existing social media is fundamentally you don't own your data your data is owned by the applications which you use facebook twitter we all know their names and lens kind of offers something different lens is a decentralized social graph protocol that developers can use to build social experiences you can build apps and tools on top of composable and decentralized social graph this allows you to focus on the user experience instead of user acquisition the user of one's lens app is also the user of another fundamentally all the data belongs to the user and they choose how to share it the lens protocol additionally empowers creators you can post from a singular front end and it will go to your audience regardless of what app they are using they own the links between themselves and their community and it forms a fully composable social graph so how do we do this the lens social graph is built on nfts uh standard erc721 it all centered around the profile nft this is your profile it has your profile image your name all kinds of different metadata you can define as well as all of your posts and publications when you post you're posting to this profile people can follow you so if i wanted to go follow alan on lens i would call follow on his profile nft and a follow nft will be issued um so again following is directly on chain and lastly there's posts comments and mirrors the ways you actually post to the graph these are not nfts they actually live inside of your profile but you can add logic to monetize them and turn them into an nft so instead of just tweeting randomly i can make a publication and i can sell or of a photo and i can sell that five times ten times for five matic 5e you pick the price okay this is [Applause] commentary continue depending on the case so as alan was saying when you when you post to your profile there's three different types of publications there is the simple post the comment and the mirror the post itself is uh just content uh this can be of any content type text image video um anything um the comment has content as well but it also has a reference to another publication um again the content can be anything um and lastly there's the mirror the mirror is simply a reference a mirror is a repost uh similar to like a retweet um the key thing about lens is lens is fully agnostic to where the data is stored so all we ask all that is asked for in the contract is the content url or the link so you can decide to say hey the content lives on ipfs or the content lives on ar weave or the content lives over on amazon s3 fundamentally we've left that open to you as the developer to un to decide and it is fully flexible to whatever use case you have additionally for smart contract developers there's ways to extend lens with modules there are three different hooks where lens call will call out to an external module the first is the follow module so the follow module is executed when somebody tries to follow the profile so if alan were to try to follow me all of the data about how he's trying to follow gets forwarded to another contract and that can be any logic for example i can say allen in order for you to follow me you have to pay me 5matic or you have to hold a board ape or you have to already be following lens protocol the logic is fully configurable for you as the developer posts and comments have two other types of modules a reference module this determines whether or not something can be referenced and that'll that caught that's called on comments and on mirrors so an example of that is only my followers are allowed to comment on my posts or reach or mirror them i could also say that only people who hold more than five fwb tokens are able to comment on my post or mirror them and they allow you to restrict access to certain communities and the last type of module is the collect module this is how you monetize publications and again it is fully configurable to how the developer wants so if i were to post a really great image uh or hear my time in mexico city i can say hey this i want to create an nft out of this i am issuing ten of them and they are five matic each i could also say you can only these are 10 of them one matic each but you can also only collect it if you follow me already again all of the logic is fully configurable this is a really awesome place if you're a smart contract developer yeah and is [Music] a is b so in addition to the lens contracts we also have the the lens api um which is a an api service that ave companies is currently offering and there's part of the benefits we recommend using for hackathons because it allows you to build lens apps really really quickly there's no need to worry about indexing querying data dealing with blockchain reorgs speed of fetching the data you don't have to worry about pre-filling contract data it exposes a web 2 style interface for you to interact directly with the protocol if you know how to use graphql you're going to feel right at home with the lens api additionally we have a gaslist api that allows applications to pay for gas on behalf of their users and in addition today we turned on a signature free api that allows users who opt in to allow apps to sign on their behalf allowing for one-click access incredibly smooth experiences uh definitely recommend you try them out on some of the app lens apps out today additionally the lens api integrates more protocols than just lens currently it allows you to pull data from ens proof of humanity po-op sibyl.org and today we also added worldcoin's world id verification it allows developers to add data from all of these protocols to make holistic experiences support for more protocols is coming so if you're a protocol and want to work with the lens api please come by the booth and chat we want to make sure we can get everything that causes great experiences to be linkedin applications be so one thing we think about is that lens allows for the building of this thing we call the experience layer all of these amazing front ends that integrate multiple different protocols to create holistic experiences and we've seen this a bit today so for example ave you can access the ave protocol through a variety of different experiences app.com zapper rainbow instadap or even the coinbase dot browser and for lens we're seeing the same come about there's lens friends leinster iris favor lens tube these are all different experiences built with lens and other protocols and each is a unique experience and that's something that we really hope to see when people build front ends with lens this is kind of how we think apps are structured when we when we build lens apps there's the blockchain the base that you're built on um lens is on polygon but there's a ton of other applications over on mainnet ethereum or gnosis chain avalanche optimism you we all know the various chains and there's applications that live on top there's lens in all of its modules there's live pier po-op proof of humanity ens all of d5 like avi and urine there's this middleware layer that helps developers build apps the graph by economy as well as the lens api and lens js and other open source package to help people build lens applications and then there's the experience layer the actual place where you go to experience the application where your users are so that is things like lenster xyz lens friends lens tube each of those providing entirely different experiences made by combining applications beneath them potentially across different chains and so you know we think lens apps use a slightly different structure than most normal similar is [Applause] [Music] we have time for questions um so if people have any questions you can raise your hand we'll we'll try to answer as many as we can um in addition after this talk will be at our booth and also in the back if people have more technical questions we're happy to go into into in-depth um in both english and spanish so at the beginning you you told that every profile is an nft right and every follow it's an nft too so as nft is standard 721 and it's and it's tradable so imagine i can sell my profile is that correct and what about the psycho about that so like if you sell your profile yeah you are selling all your followers to which i mean like because they follow nft points to a profile so you you are i am selling all all my profiles so i am selling to another guy or another woman um what i am and what i built through the my behavior through my social behavior so what about that yeah it's it's the same as if you were to sell like your twitter account today they have access to it's you know you're selling your posts your reputation it's just another asset and do you think that is good why not [Laughter] i think there's reasons why you would want to transfer maybe i want to move from a ledger to a multi-sig or if i'm a company i want to move it around between different accounts i think there's many reasons why you would want transfer and why you would want a marketplace i don't want to pass judgment on what developers want to build like a profile can represent many other things than just a you know just just just uh my identity could represent a community or group and in which case you want that to be transferable yeah yeah and and i just wanted to know if but you all already answered it uh if there was a like some security locks or something like that preventing that but i think that there is not right no i i think we we as as you own your profile that allows you to sell it too so it's like it's up to you and i don't know i don't see any like a special issue with that but we can just discuss like yeah but but we are not talking like selling a car or selling a computer we are talking like selling our profile that's all i think thank you thank you i i would highlight that lens has a lot of different ways for you to keep your profile and your nfts in a secure wallet while still letting you post and have access from a hot wallet so the dispatcher functionality as well as meta transaction you can read a lot about this in our documentation at docs.lens.xyz allow you to give access to your to your account without allowing it to be transferred around so there is security measures in place but fundamentally just like in d5 you control your assets with lens you control your content you control your reputation you control your profile and hello yeah okay my name is felipe i have a question about identity on verified identity how do you handle fake accounts considering brands are going to start creating profiles and also celebrities about it how do you handle someone is not going to try to fake someone else so part of it is you know lens is meant to be an unopinionated agnostic bass layer that who is real who is fake who is spam is not those are application level decisions and we defer to each application to make their own determination that is part of why in the lens api we provide information that may be useful maybe we can tell you that this profile has been verified by world id or this other profile has been verified with proof of humanity and you can use that as a verification system alternatively you can use your own part of the lens being agnostic means we put the hand we put the control in you the developer to determine what you want to show in the experience and the lens api is going to give you helper data but we think it's important that the decision is with the developer with the front end to make their own decisions i would i would personally love to see social verification tools built on this hackathon so feel free to do that yeah hello uh i have a question regarding the uh how do you manage like this algorithm to choose which content you uh show to which one so i i would like to to know more about that yeah so lens itself has no concept of of algorithms or of how to display them lens all it is is a a way of a way of having social relationships and content represented on the blockchain applications decide how they want to present data they can use their own app they can use whatever their their own algorithm is to determine what to show to what users that is for each application determined when we say that it is the experience layer and you're competing with the best ux that includes having the best algorithms having the best filtering and the best recommendations that's really what the different applications compete on the api will provide certain basic functions like you can call for a timeline or you can call for recommendations and those algorithms uh have been documented and they're in the docs i believe the timeline is just reverse chronological order based on people you follow it's very basic we encourage you another great thing to build during this hackathon would be an api that does a more sophisticated timeline query um so again lens is a protocol on the base layer doesn't even know what a timeline is that is for you as like an application to implement thank you hello yeah very quick uh when or how is one going to be able to claim their own handle soon tm uh no uh so ev everyone if you staked eth to have your ticket here at uh for east mexico you've now been whitelisted so you can go to claim.
lens.xyz with that wallet um if you're having any issues yeah awesome thanks um additionally if you stop by the booth and and you get a get a po-op or you get a pull-up from one of the team members you'll be whitelisted uh shortly um we intend to go full permissionless as soon as we can the team is working very hard on it when alan is not giving speeches that's like his number one smart contract task so we're hoping very soon hello uh i'm considering to create a vr application that works on lens protocols so like sns application on the vr but i'm wondering how we can access the data actually uh when i see several implementation right now they are calling uh api.lans.dev so is the data available on via smart contract or we need to use a rest api for that no no you can use the api or you can build your own index or if if you want so this great data is not available via smart contract but it's available via rest api so it's it's in the the data's of it like you know fundamentally when you think of what a lens publication is you're you're it's a transaction on chain that just says in this place of state you know in this index this is what a publication is and it has a content uri so there needs to be some software that will run through all of the various transactions and kind of assemble the relational structure we offer an api there's also the graph there is lens js there's a bunch of different solutions alternatively you can run your own indexer the data is available on chain you just have to know how to query it properly is it on polygon chain or okay yeah yeah basically the smart contacts are not good for complex query so it's good for random access but it's just that so the contacts are like emitting events of every like meaningful operation and then you can build your own in indexer to index those elements and reconstruct the data which is basically what our api is is doing so it's like you're providing something similar to the graph is doing as well right yeah okay thank you
Automatic transcript — names and jargon may be misspelled.