New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Lens 🛠 Intro to Lens Protocol

ETHGlobalSun, Oct 9, 2022, 12:00 AM

Join David Silverman of Lens Protocol for a workshop titled, "Intro to Lens Protocol." This workshop is part of ETHNewYork 2022, a three-day in person hackathon that will feature hackers, mentors, enthusiasts, sponsors and speakers who are all gathering in New York June 24-26, 2022 to talk about the future of money, finance, the web, ownership, the way software works and the way power is distributed. We're excited about a new frontier. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

[Music] my name is david uh i'm a product manager at avid companies uh doing social products including lens protocol and i'm here to chat with you all today to give a quick overview overview of the lens protocol uh why we built it uh what are some of the design decisions we we went with uh we can touch a bit about the lens api uh drop a little bit of alpha as to some things you can build uh with lens especially here at the hackathon today at amsterdam uh so let's get into it um web 2 social media is broken uh from a fundamental perspective there are three kind of key issues uh first off uh networks sell your data um every free service you're used to facebook instagram snapchat but even even other services things like uh opentable or eventbrite they're taking your data and they're selling it um and that's okay that's a tradeoff i think many are willing to make but but we don't really have an option to matter second off user data is not portable these these networks own your data it is in their custody they're using it to monetize and because of that they have no desire to share it with other platforms when i post a video to tick tock it doesn't automatically show up in youtube shorts or instagram reels i have to go and do that myself and it makes the switching cost very significant if i as a creator want to leave a platform and go somewhere else um like many creators had to do when musically shut down and became tick-tock or vine shut down and many tried to go to instagram or other sites or youtube it's really hard to bring an audience you lose that connection and if you're a platform do you lose your connection to your audience again and into your income stream and that's not a great way to to to be and then lastly these data centralized and we already know what can happen in that situation there are hacks i already get a ton of spam uh between the spam bops on twitter lately and and ledger and trez are getting hacked i don't need more more email spam and people trying to steal from me so how do we fix that we can fix it with web3 social and i would say that the idea of web3 social is to bring power back to users and creators creators by making data self sovereign again so let's see social media through a new lens lens protocol allows developers like you to build social apps and tools on a singular composable and decentralized social graph this allows you to focus on user experience and better algorithms instead of user acquisition and for users and creators lens protocol allows you to own the links with your community it allows you to monetize in ways that you see fit and it forms a fully composable and decentralized social graph so we got that thesis out of the way let's let's dig a little bit into what exactly lenses our social protocol revolves around an nft infrastructure layer now these nfts aren't aren't board apes they're not punks they're not going to have a cute little image these are you know they're a little bit more more uh more powerful the first nft we build around is the profile nft it's minted upon creation it contains an array called publications which is updated with all of your posts all of your comments all of your mirrors which is our term for a share and additionally if you've if you've worked with ens or unstoppable it may look very similar the the next thing it also has is following there is some follow logic that when succeeds will mint a follow nft so if i david go to follow alan and i passes follow logic i will receive an allen follow nft um its id is going to have the token id is based on the order of following if i'm alan's fifth follower i will have token id4 because we are developers and we start all counting at zero the follow nft contains some built-in governance so if i'm a creator like one of our devs on the team josh josh does really great solidity tutorials he can pull his audience to see if he should be doing more videos about maybe ave v3 or if instead he should be doing things on solidly or other experiments in the ecosystem and this governance is compatible with snapshot open zeppelin governor and the ave governance as well um in fact the community lens community has already created several strategies um so yeah um lastly post comments and mirrors again our term for shares uh these are these live inside of a profile nft so they are always permanently linked with the original creator um that said we have the ability to mint derivatives uh which we call collect nfts so if i have a really awesome photo of me speaking here at amsterdam and i choose to post it on lens on my lens profile i can set some collect logic i can say that you know this photo can be collected five times at one matic each and should that price be paid a collect nft will be minted with a identical content uri so you would receive an nft of that exact publication additionally there can be included uh mirror fees so begin mirrors our term for share if alan were to mirror my publication and uh bradley a friend of ours in the audience would collect it off that mirror allen could receive a piece of the fees and so lens also has tools to incentivize good curation as well now that's kind of the base how can you extend lens if you're a web 3 developer the first thing you should really start to look at with lens is these things called modules modules are ways to run arbitrary logic that return some boolean value that will result in either the mint or rejection of some action there are three types a follow module a reference module or a collect module so let's start with the follow module the follow module is set on a per profile basis so i'm at david i'm able to set some follow logic that will be checked before someone is allowed to follow me it can be as simple as anyone can follow me an unlimited number of times i think we call that the the empty follow module um i could do something i can monetize my follow you have to pay me one each in order to follow me it's a bit steep but i promise i have really good content um you know we can do really complex actions uh there was a a a team that created uh what they called the the the uh the carbon neutral follow so it would be five matic to follow it will automatically 0x swap that into a certain amount of carbon credits and retire on chain making the entire action carbon neutral arbitrary logic means arbitrary logic and i'll let you interpret that as you wish especially as you guys think of things to build so again that's the follow logic minting follow nfts the fall logic controls yes or no the reference module uh comments and mirrors have to refer to some other piece of publication if you've ever used twitter and you can say you can only reply or retweet this if you are a follower of mine or only people tagged can reply or retweet this is a very similar logic except unlike those fixed categories again reference logic can be arbitrary you can only comment on my post if you hold a board ape nft you can only mirror my content if you have 32 fwb or more in your wallet you can only comment or mirror on my posts if you follow the at lens protocol account which you definitely should do right now and lastly the collect module the collect module controls the minting of collect nfts this is the monetization logic that i mentioned earlier things can be really simple as i said anyone collect can collect an unlimited number of times you could do it that there's a limited number of collects we call the limit collect module you can only collect this 10 times once per address or we could do you can only collect 10 times in a 24 hour period again these are just examples that we've included in the repo and on the test net but you are more than welcome to create your own and again arbitrary logic your mind is the limit there's a team today that did an ave collect module uh i'm paid tenmatic for one of my pieces of content it is automatically deposited into ave and the resulting eight tokens are sent to my wallet imagine nfts with composable defy so let's go back to kind of our goal we want to foster a broad diverse and evolving social ecosystem again all of our content all of our profile data everything is fully composable and transferable on chain it can bring in your existing defy and nft applications and anything else that may be built in the future follow nfts have built-in governance mechanisms including snapshot and delegation by default we can create these new concepts of social dials these aren't social data centered around some erc20 token or an nft we can evolve a bit beyond that and actually do social daos and governance and organization based around based around actual on-chain verifiable action do you follow with me do you engage in my content then you can be rewarded with voting power we have modules that can be built to do arbitrary logic as well as to include a governance managed treasury fee back to composability users can take their graph to whatever experience you want don't like the algorithm over on twitter bring your content over to another clone your content your followers your following and as a creator your audience move with you to wherever you want in modularity again developers you can focus on the front end the network effects are up to the protocol your job is to make the best possible experience the best way to express your creativity in order to create a great social experience in times we've seen apps that were great and novel lose out to network effects you know we had a group called meerkat decided to do live streaming and then periscope came along and they eventually lost their ip over to twitch because they had the greatest network effects i think we all remember clubhouse and how it was soundly defeated by twitter spaces right new ideas and paradigms have lost out frequently due to network effects and lenses a chance to change that another thing we've done at avid companies we've produced a lens api um we've openly said that we're you know web through social media is a long game we're creating our own model implementation we've decided to open source the same tools that we are using to build our own front end it is an api that allows anyone to use lens as if it is a standard web 2 api with graphql all you have to do is focus on building an experience to onboard the next billion into web3 you don't have to worry about indexing or querying data we're going to be on polygons so you don't need to worry about reorgs or the speed of fetching the data you don't have to worry about pre-filling contract data or validating it especially when using with sig functions or metadata just pass arguments let the lens api take care of all the formatting again you get a web 2 style interface to interact with the protocol especially if you are new to the world of web 3 this is a really approachable place to start leave the modules and complex logic facility developers if you want to build with lens here's a great easy entry point to start playing around and if you're an application on a different chain or an application that's off chain and you want to use and write and read lens data feel free to use the api it's a great way to get started and do something low effort as you dip your toes into web3 social and again there's no huge learning curve focus on the stuff you want to build you know our api is in beta our developers are in the discord around the clock fixing in features and adding new ones when people need new endpoints it's a really great place to get started sharing a little bit of alpha some ideas to kind of get you started um front ends you know lens is just a social graph and a social graph isn't useful unless it has a front end for people to interact with it the facebook social graph isn't useful unless you're using instagram whatsapp or facebook while lens we have a community run implementation called lenster there are tons of others over 50 front ends were done through previous youth global hackathons uh you can be the next big one and it's a chance to really lay your claim as one of the first web three social applications and it doesn't have to be limited to traditional social you know it's very easy to build something that we think of with social like snapchat or instagram or a twitter clone but i encourage people to dig a deep dig a bit deeper things like opentable uh or eventbrite can all use the same kind of data structure if you're an advanced developer out there and want to start exploring multi-chain lens is a really great way to do with that as i said modules use arbitrary logic there's nothing saying that the arbitrary logic can't be i have received a valid message from some contract running on another chain imagine selling polygon nfts but receiving payments over on avalanche or receiving payments over on solana if you want to experiment with messaging protocols such as layer 0 chain link ccip or any call from the any swap team or many of the other cross chain oracle solutions it's a cool way to experiment with multi-chain in a non-defy context and lastly social daos i i genuinely think the next kind of innovation to come off of lens is the evolution of social taos we've seen people start with erc20s social tokens we've seen a change over to the concept of maybe using nfts to organize people socially whether that be experiments like links dow but now we have the opportunity to do social dials that are coordinated around actual social action verifiable on chain we can even have a shared profile put on chain additionally a chance for dow tooling to be made social it'd be really cool that right now twitter accounts for daos are controlled by individual users you can get really nasty if there's a governance fight imagine if we took a profile and locked in the contract such that let's say for example at ave was controlled by the avre governance but ave governance could delegate so that a few different people on the marketing team or a marketing sub dao had the ability to post on behalf token holders still retain absolute control there's tons of new tooling and primitives that can be built out when dows and other contracts are given first class status so that's all i have for today i encourage you to join the over 115 developers and 55 projects building on top of lens we're currently on the polygon test net we're on our fourth test net and we really do take developer feedback we've rewritten the contracts pretty much from the ground up several times based on feedback from working with developers like yourself and we really want to make sure that what we build is becomes the standard form through social in the future and we always do that when we're building with a community um so thanks for taking the time to listen today and was always going to drop a little bit of alpha uh you know please scan the code to come join us over at rave um we'd love to see you guys throughout the throughout the weekend over at the lens and ave station down on the first floor in the back over by wallet connect and uh gearbox um our team will be there all weekend and look forward to working with you guys thanks very much

Automatic transcript — names and jargon may be misspelled.