Lens 🛠 Web3 Social Under the Hood - David Silverman
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Join David Silverman of Aave Companies for a workshop titled "Web3 Social Under the Hood" Thank you for joining us for ETHSanFrancisco—our first west-coast hackathon in nearly four years. This was officially our biggest event ever 🎉 👥 1700 attendees 🗺 from 46 countries 🌱 38% new to web3 📮 284 projects And: ETHGlobal just turned five! 5️⃣🎂 Thanks to every single one of you for making this community great 💙 --------------------------- Follow us: https://twitter.com/ETHGlobal Check us out: https://ethglobal.com Email us at: hello@ethglobal.com #ethereum #web3 #blockchain #eth
Transcript
foreign [Applause] [Music] GM everyone yeah uh so I'm David I'm a product manager from Ave companies uh where I work on our social products including lens protocol uh and want to talk to you all today to go a bit under the hood first into why we felt it was needed to build lens and the problem lens is kind of trying to solve why blockchain is really the only solution we have a little bit about the lens architecture and then closing out with the lens API which is one of the best ways to build with lens and to build this new class of web 3 apps we call the experience layer fancy marketing term so the problem statement web 2 social media is fundamentally broken um let's think about the login flow for for the average app when you sign into Facebook you're authenticating to Facebook they're then kind of looking up your data in the database taking it and rendering an experience that data is sexualized it is not portable Facebook has no incentive to make it portable it is their monetary stream all they really want to do is make sure they're getting more data they can then use to monetize further and Snapchat has the same experience and Linkedin is the same experience and YouTube has the same experience and Tick Tock has the same experience as does rip Twitter and the difference of what we're going for uh with web3 is we want to kind of make it where you own your content you bring it to an application so that it is fully portable and that really makes networks beholden to the users as opposed to users being beholden to the network in web3 in a lens application which is fundamentally different you are not just authenticating with the application but you are bringing the identifier so that it can find your data so you can bring it your data I sign into an application by bringing it data and then it only then can it render experience the data is in this kind of more public area which means it is forkable I can switch experiences at will experience can specialize to different types of users we've already started to see this in the lens ecosystem there are apps that specialize in for creators people who create content and there are apps that are specialized for people who are trying to curate content in their apps that are specialized people trying to consume content and because it is a chart a shared database that is user owned it is not the same company it is not the same development team building all of those which causes for better experiences for everyone So In Sum web3 social is about bringing power back to the user so we're going to lower the barrier for developers by making it really easy to build social apps and tools on a composable decentralized social graph and the key thing as a developer you get to focused on the user experience and not customer acquisition the name lens is named after this plant like the lens Claris it fertilizes the soil allowing other plants to grow alongside it lens apps want all of the apps in the ecosystem to do well because data generated on one app is available to another to a different application as long as you're in the lens ecosystem everybody wins it is a collaborative game not a zero-sum game for creators you get to own the links between yourself and your community and you are able to move anywhere with ease pick the career tool that you want and distribute to your users at the platform they're using not just the one where your creator tool lives so how are we actually building this well we're on a blockchain we are live on polygon today uh we have a profile nft the profile nft is minted and it has a Publications array that you get to post to we'll come back to posts in a quick minute that profile nft has this thing called a follow logic that emits follow nfts so you get a Follow nft by following me davidev.lens and it gets dynamically updated with posts you can always see the latest thing that I have published the follow nft includes built-in governance and delegation so I can set up many votes for my community maybe if you want to see me talk more about lens maybe you want to hear me give more hot takes about blockchain I get to pull my followers for what they want to do token IDs are based on the order of following Bradley in the audience was my first follower Christina my audience was my 10th follower and that has built in value if it if I pop off and they can be able to trade that in the future posts comments and mirrors uh they are they're part of my profile nft they are part of who I am as I move around with my profile so does my content come with me um and they have this awesome thing called a collect function which allows them to be instantly monetized I can set the rules for how collect nfts are minted from a publication and that gives me a way to determine my own as a Creator determine my own monetization logic one of the key things and design principles of lens is we are as agnostic as possible to give as much power to developers nowhere in any of this did I specify where you need to store your data we let you pick if you want ipfs for example shout out to the sponsor IR weave or you can even go centralized links with S3 um we also don't enforce any particular encryption scheme you as the developer or the user can pick privacy you want or you can leave things fully public the option is up to you we are just providing a minimal spec to help organize the blockchain data into a social graph and so far in our private beta the community has really loved the land verse lens verse we have over 90 000 profiles they have a closer connectiveness than most of the major social networks and we are seeing this concept of collect really take off as creators like to experiment with brand new you know the collection of user generated content and micro purchases and there are tons of different people you can follow from major content creators like g-money to Dows like index Cooperative to blockchains themselves like polygon now over to the lens API which is the fastest way to build your own social application or in or use lens data at all now to make it clear lens is entirely on chain anyone can access the data as they see fit your node directly throughout a service like Alchemy or querying something like the graph however we all for our own API with the lens API you don't need to worry about indexing querying reorgs or fetching data that's all done for you you don't have to worry about pre-filling contract data or validating it or using weird with Sig methods our real goal is to offer something that is easy to approach for development it looks and feels like a web 2 graphql API it is simple to interact with the protocol and there is really not a huge learning curve you can just focus on the stuff you want to build in fact some of the easiest things you can do to build is use a follow-on lens button very similar to the kind of ones we have for existing social today or a sign in with lens button this wraps sign in with ethereum so you're still getting validation that the user owns the address but Additionally the lens API will return all of the data it has on that user their lens data their ens their co-ops their proof of humanity or worldcoin status and more and plenty of people are using this today here's eth Global on their home page has a link to their lens profile as well as a way to follow them through the lens API and it's a great way to see content such as this talk and many of the others for ethsf so what's next and where are we going um on the middleware layer we're going to be adding more and more data providers to allow you as devs to build holistic experiences um we already said ens proof and proof of humanity a world coin we have many more coming out if there's a protocol you want please stop by the table we really want to build it to help give you guys a powerful development tool for experiences we have this really awesome concept called dispatcher and relay which allow applications to pay for gas on behalf of the users um it allows seamless onboarding for the masses and already we have done four and a half million transactions since we released this feature in June making the lens API one of the largest evm gasless relays additionally we have plenty of teams that are working to extend the lens contracts to support multi-chain as well as off-chain data to be read on polygon using really powerful protocols such as layer 0 and chain link ccip and D Bridge you'll be able to read data from multiple chains onto polygon so you'll have the ability to say you can only comment on my post if you hold a board ape you can only follow me if you hold more than 15 sdkave and the real desire is we are trying to power this thing that we call the experience layer this next generation of applications the lens API is stitching together data from lens live peer proof of humanity ens World coin pull-up xmtp push and Ave itself in order to provide a data layer for U devs to pick and choose what applications regardless of chain to put into the experience that you craft because at the end of the day we have experiences there are tons of different applications here but they all want to have different uis for Ave you can go to app.ave.com zapper rainbow instant app coinbase for lens there are a ton live today lens friends lens the lens tube favor orb um Leinster there are plenty of different uis that are all using the same contracts under the hood and for us this is kind of the evolution of experiences that we think is going to be coming to web3 things started out with singular app single Source you can see that on the uniswap application right the only thing I can do is interact with the UNIF system of contracts and it's only on a singular chain there's more current experiences like the Ave UI which add in a few apps together you for example the repay with collateral function stitches in Power Swap to allow for a slightly better experience but it's still fundamentally single chain uh here's a screenshot from one of the lens applications lenster it is stitching together data from multiple applications across multiple chains there's ens on mainenet lens on polygon World coin on polygon co-op on gnosis chain and many more just in this one frame that's not even the entire screen and we really think that this is the future of web3 applications additionally we are we are upgrading our API to continuously provide powerful features to allow you to create web to Native feeling experiences the first thing is we believe that gas is an application cost AWS bills are part of a business cost for an application and gas is the web 3 equivalent we believe that you should be building it into your business model and therefore our contracts offer metadata as well as permit as well as this concept called dispatcher and many of the lens apps have opted into this ux again 4.4 and a half million gasless transactions through our API representing an overwhelming majority of lens usage and it's not costing a lot we also have this thing called the optimistic UI or the optimistic API something we just released that causes users and apps not to know there's a blockchain running in the background apps are given an optimistic assumption that certain write calls succeed if I follow you on lens on a lens app using the lens lens optimistic API then any app reading from the optimistic API will assume the follow succeeds and upgrade regardless of hard refreshing the session or otherwise this allows zero wait time to reflect State changes to users and gives an incredible feeling of responsiveness and we we're going to be expanding this to many more calls than the lens system and hope that other developers use this on their contracts or their their sdks lastly unified queries apis that return data from multiple applications across multiple chains we've already integrated this into our profile function with a singular call you can get lens Co-op ens worldcoin pohsibil.
org data and more in a singular call those contracts are on multiple different chains including off-chain data and that is something that we want to expand on more for developers you guys deserve contextual contextual data regardless of where the source chain is we hope to continue building on that path so that is what I have to talk about today uh happy to have plenty of time for questions awesome [Applause] any any questions uh if you want to get a lens profile you can stop by the booth we are still in closed beta but we have tons of awesome uh tons of spots left and want to make sure that anyone building today can get one so the first question is where where the contracts deployed are we only on polygon or will we go multi-chain so the lens contracts are open source through EPM they can they can go anywhere we have a deployment that we run on polygon we also have two test Nets uh both on polygon Mumbai uh one with zero permissions on it and one that mirrors mainnet um we are happy on polygon uh it is a chain that is scalable enough to handle the load of lens um it is a massive massive number of transactions and polygon is shown to be able to hold our scalability uh we look forward to continue building there yeah so we uh yep so we have a Creator program where you can email creators at lens.xyz uh for Creator grants and we have uh developer grants at ecosystem at lens.xyz uh we want to help make sure that you help build uh awesome tools as part of this ecosystem so the question was about closed beta closed beta for now just means the actual minting of profiles is limited uh for a variety of reasons but basically that means that once you have a lens profile you can use any of the lens applications in the ecosystem on mainnet however no and and so we really until until the uh the mint the mint block is removed uh we you you'll present you're presumably in closed beta as well uh the devs are working their best to do things to relieve it um we are hoping to end it uh sometime early in the next year yeah so the lens contracts themselves are and I'll go to kind of the so I think that shows it out yeah so the lens contracts themselves are built on polygon and there are ways in which you can extend them we call them modules collect module follow module and reference module these are ways for developers to hook in their own contracts into the lens system lens does not itself specify any bridges for receiving or sending cross-chain data you can plug in any Bridge you want this follows the same design pattern we used in a hobby V3 so we know that there are active teams building building Integrations with layer zero there are teams building Integrations with chain link ccip another one of these Brit messaging Bridge of protocols as well as d-bridge and Stargate so lens is agnostic to the bridging solution used their teams use the application developer can pick which one you trust strategy so the roadmap I think for us the roadmap is more you know we're trying to be this kind of you know we are the we want to be the Social account the the account structure that is used we're just here to kind of provide a minimal structure to allow for anyone to build social graph powered applications this could be as simple as including like a little bit more contextual data when you sign in so oh here's a cover photo a profile image I know what people follow so I can maybe give better recommendations I can see my positions or my friends positions or people's who I follow those positions in a defy app for an nft project it might be able to I can recommend what you might want to Mint or what you might want to buy in a Marketplace based on what you follow we're here to kind of provide information and again because lens as a protocol is intentionally incomplete it requires other things to be plugged into it and so we're for maximum integration um as we mentioned I think just this week uh we announced integration with xmtp to allow end-to-end encrypted direct messages between lens profiles uh again showing kind of the extensibility of the project awesome I think I'm at time uh xmtb will be getting built into the API um so the API kind of sits on top of it's it's not any contract right it just is a series of indexers and plugs into various different protocols so at some point xmtp will be built into the API to allow applications to easily pull conversations and other relevant information based on an authenticated user I believe folks from developer Dow have built a subgraph that you can query we also do recommend that you use you know the API is open there's no key there's no nothing to query it no account needed it is able to kind of stay up to date much faster than a traditional sub graph to allow you to get real-time information from the from from the social graph itself yeah so the question was about other web 3 social options um I would say that lens is one of the few true web 3 social protocols that exist we are directly on chain we are directly interoperable with other protocols some people have taken the approach of building your own blockchain or keeping your data off chain entirely we believe that by being on Chain by being truly interoperable by staying committed to web 3 principles um that's kind of the the ethos behind lens and I don't think we've seen others build in that kind of mindset being fully decentralized on chain yeah so we have an integration with ens um where through the lens.xyz ens name you can query any data about our various data about a lens profile so I'm David EV dot lens if I want I can query using ens's off-chain resolver uh davidov.davidv.
lens.xyz and I will pull up my profile picture on lens my cover photo my avatar my name location other various data that I have put into my lens profile can be queried via ens if you want an alternative to the API or if you're already using ens resolvers in your project foreign and then there's also in the lens API itself there's an integration that will look up the profile holding a um holding a lens profile and let you know what its ens is if reverse resolution is set or what other names resolve to it uh to set reverse resolution I would I would talk to the uh ens team uh you can find that out uh in their documentation uh there's a simple contract call you can do on chain there's a registry yeah so the bounties we have uh there's a bounty for integrating the uh the lens API either sign with lens follow with lens um the really simple integration uh let me see if I can find that example um and then there are larger prizes for those that build the best kind of social application uh the best use case with lens um yes the easiest way to be eligible prize is just very simply integrate either sign up with lens which is a wrapper of silence ethereum or follow on lens button uh we even have visual examples and simple HTML links uh I have to go back and look I don't know what's up my head awesome well we'll be over at the booth uh over by the the hedges by the main stage uh and happy hacking everyone
Automatic transcript — names and jargon may be misspelled.