Guides

Gasless & Signless

To optimise your app's user experience, there are multiple different approaches you can take to achieve gasless and/or signless transactions.

Gasless transactions, where Lens Protocol funds the gas used, is free for everyone on testnet (Polygon Mubai) and free for whitelisted apps in production (Polygon Mainnet). See eligibility requirements and the app whitelisting below.

Signless transactions means that user can send transactions without having to sign any approve modal in their wallet. This is done through the profile manager (aka dispatcher), which each profile has to opt-in to. Once enabled, the profile manager acts as a delegated signer and signs and sends the transactions on behalf of the profile.

Which Solution To Use?

Using the profile manager is always the preferred choice, where possible, as it facilitates both gasless and signless transactions. This means users can use your app without signing any approval modals and without paying any gas themselves.

Users must opt-in to using the dispatcher, so before processing a transaction, you must check whether their profile has the functionality enabled.

Use the dispatcher for post, comment, and mirror related actions.

If a profile does not have the dispatcher enabled, you can still facilitate a gasless transaction on their behalf. Unlike using the dispatcher, they must provide a signature through signing a message with their wallet.

Using this approach, you must assemble the typed data for the action the user wants to take using the provides meethods (e.g. createPostTypedData), the profile wallet must then sign this data and the signature is used to relay the transaction on-chain.

Use the transaction broadcasting for post, comment, and mirror related actions.

Eligibility requirements

The Lens Protocol team believes in supporting content creators and followers who create an engaging environment for everyone. Currently, we use machine learning algorithms to identify high-signal accounts and curated profiles based on factors such as follower graphs, content and other factors. Unfortunately, low-signal, pesty profiles diminish everyone's experience and waste gas. As a way of curtailing flagged, low-signal profiles, we have decided to stop paying gas fees for profiles that do not meet a certain signal threshold and create a nuisance. The protocol will remain open to anyone to do any actions; however, going forward, low-signal accounts must pay their own way.