Book club in a book as NFTs powered by Lens, Lit, and Polygon 📚 ⛓
Book Lens is a book club where readers can create a social group inside the same book using the Lens Protocol, also we gate access to the book by integrating Lit Protocol, making only the owner of the book access this experience; and finally, we deployed on Polygon blockchain to make it scalable due to the need to create multiple transactions in the social network we’re creating.
How it's made
To describe how we build the project we will divide it in the main protocols used: => Lit Protocol We used Lit to gate the EPUB URL of each book to only the owner of the NFT. The process is, we encrypt the EPUB IPFS URL, and set it in the NFT metadata, so basically each NFT will have a different EPUB IPFS metadata. Then, we create the access control conditions and encrypt the symmetric key together with the authorized signature and chain, and finally store the encrypted symmetric key on a Supabase table. With this mechanism even though we store some parameters, only the owner of the NFT can access the EPUB IPFS. => Lens Protocol We used the Lens API to once the reader accessed the platform and validated its NFT ownership he could access the full experience of not just to read, but to create his profile and be able to create publications viewable by other owners of that book. Publications are highlights of some book phrases I feel related to. => Polygon Blockchain We used Polygon because we understand this project will require multiple write calls to the smart contract, so an affordable transaction cost is required. => Other libraries Among the other libraries we used, where: Alchemy API to subscribe to events. Wagmi to interact with the blockchain