project screenshot 1
project screenshot 2
project screenshot 3

Lock It Up With LIT

Lock up any content that only owners of a whole ERC20 token can decrypt. Uses the Lit protocol (litprotocol.com). For example, an exclusive video just for owners of a given community or governance token.

Lock It Up With LIT

Created At

Web3 Weekend

Project Description

This project uses the Lit Protocol (litprotocol.com) to lock content behind an ERC20 token. First, mint or use an existing ERC20 token. Owners of this token can use it to access locked content. Maybe it's a cool "crypto tips" newsletter you haven't released yet. Then, use this project to encrypt and lock up your content utilizing the Lit Protocol.

Some background: The Lit Protocol is a new protocol designed to let you encrypt content that can be decrypted as long as the decrypter satisfies some on-chain condition. In this case, that condition is ownership of at least 1 ERC20 token of a given type. The Lit protocol is decentralized and node operators cannot decrypt or view content. Full disclaimer: I am a co-founder of the Lit Protocol and our network is currently running in an alpha state. The Lit Protocol is not part of this hackathon entry. Only the web app that you see in the demo that utilizes the Lit JS SDK is the hackathon entry.

Using the Lit JS SDK (https://github.com/Lit-Protocol/lit-js-sdk) (not part of this hackathon entry) this project encrypts your content, creates an HTML wrapper with an unlock button, and uploads the encryption key to the Lit Protocol nodes. This project then uploads the encrypted content to IPFS.

When a token holder is ready to unlock the content, they visit the IPFS url which is a webpage with an unlock button. The unlock button will make the user sign a message to prove they own the address that owns the token, and then sends this request to the Lit nodes. The nodes verify that the user owns at least 1 whole token, and provides the decryption keys if so.

The content is then decrypted and presented to the user for download.

The user may easily sell their tokens (and therefore, access to the locked content) on a bonding curve on uniswap v3 by creating a liquidity pool for their ERC20 token.

How it's Made

This project uses IPFS via Pinata, ERC20 tokens on ETH, metamask, infura, react, and the Lit protocol.

The ERC20 token for the demo was minted via this webapp https://vittominacori.github.io/erc20-generator/create-token/?tokenType=SimpleERC20

The token was sold to another account by creating a Uniswap v3 pool and buying the token from that pool.

background image mobile

Join the mailing list

Get the latest news and updates