Skip to main content

Paying for the Usage of the Lit Network

Like other decentralized networks, Lit has a certain amount of computation available for users that's metered to allow for a responsive network with nodes that are able to stay in-sync with one another.

In order to use the decentralized testnet (Datil-test) and production-ready mainnet beta (Datil) Lit networks, you will need to pay for usage of the network. This is done using Lit test tokens, Capacity Credits, the Lit Relayer, and the Payment Delegation Database.

Overview of What Requires Payment

note

Currently requests requiring payment of Lit tokens is done only using the testLPX test token. More information about the test token is available here

General Lit Network Usage

Request TypeRequires PaymentCan Be Paid for Using the Lit RelayerPayment TypeRequires Gas
Connecting to a Lit Networkn/an/a
Generating Session Signaturesn/an/a
Reading Data from Lit Contractsn/an/a
Lit Action ExecutionCapacity Credits
Setting Up a Payment Delegation PayerLit Test Tokens
Adding / Removing Payment Delegation PayeesLit Test Tokens

Capacity Credits

Request TypeRequires PaymentCan Be Paid for Using the Lit RelayerPayment TypeRequires Gas
Minting a CreditLit Test Tokens
Delegating a Creditn/an/a

PKP Usage

Request TypeRequires PaymentCan Be Paid for Using the Lit RelayerPayment TypeRequires Gas
Minting a PKPLit Test Tokens
Adding / Removing PKP Auth MethodsLit Test Tokens
Signing with a PKPCapacity Credits

Encrypting Data

Request TypeRequires PaymentCan Be Paid for Using the Lit RelayerPayment TypeRequires Gas
Encrypting Datan/an/a
Decrypting DataCapacity Credits

Wrapped Keys Usage

Request TypeRequires PaymentCan Be Paid for Using the Lit RelayerPayment TypeRequires Gas
Generating a Wrapped KeyLit Test Tokens
Importing Wrapped Keyn/an/a
Exporting Wrapped KeyCapacity Credits
Getting Wrapped Key MetadataCapacity Credits
Storing Wrapped Key Metadatan/an/a
Listing Wrapped Keys for a PKPn/an/a
Signing a Message with Wrapped KeyCapacity Credits
Signing a transaction with Wrapped KeyCapacity Credits
Custom Wrapped KeysLit Test Tokens and Capacity Credits

Overview of Payment Methods

Lit Test Token

Currently the testLPX test token is the native currency for the Lit Chronicle Yellowstone rollup blockchain. It's currently used to pay for the gas of on-chain transactions, as well as for minting PKPs and Capacity Credits.

To obtain the tstLPX test token, please use the faucet. The tstLPX test token will be sent to your wallet address, allowing you to perform transactions on the rollup.

Capacity Credits

Capacity Credits are NFT tokens that represent reserved computational capacity on the Lit network. When minting a credit, you specify and pay to reserve a specific amount of requests per second over a period of time. You'll then use these credits when making requests to the Lit network to perform actions such as decryption, executing Lit Actions, and signing transactions using PKPs and Wrapped Keys.

For a deep dive into Capacity Credits, including minting and usage details, checkout the in-depth documentation.

Lit Relayer

The Lit Relayer is an open-source service currently hosted by Lit to facilitate onboarding into the Lit ecosystem. It helps reduce initial costs by covering or subsidizing certain interactions with the Lit network, such as minting PKPs and paying for network requests to perform actions like decryption, executing Lit Actions, and using PKPs.

While the Relayer eases the onboarding process, it's important to note that its availability is not guaranteed. Users may experience rate limiting and/or congestion due to its shared nature.

As your application moves into production, we recommend implementing this functionality directly into your own application instead of using the Lit Relayer. This will ensure that you can use the Lit network with minimal friction and disruptions in service, as your direct implementation will be much more reliable and scalable.

For a deep dive into the Relayer, including its usage and offered services, checkout the in-depth documentation.

Payment Delegation Database

The Payment Delegation Database is a service provided by the Lit Relayer that streamlines payment management for your users. This service offers an alternative to relying on the Lit Relayer's payment subsidies or minting individual Capacity Credits for each of your users. With the Payment Delegation Database, you can establish a Payer Wallet and designate your users as Payees.

The Payer Wallet acts as a central account that manages payment for Lit network usage on behalf of your users (Payees). Payees inherit the reserved capacity of the Payer Wallet, which automatically receives a minted capacity credit when registered with the service.

For a deep dive into the Payment Delegation Database, including how to register a Payer Wallet and add users as Payees, checkout the in-depth documentation.

Choosing the Right Payment Method

The Lit network offers various ways to implement payment for usage of the network, suiting various use cases and application scales. Consider the following guidelines when selecting the most appropriate option for your needs:

  • Capacity Credits: Ideal for individual users or small-scale applications requiring direct control over their network resource allocation. This option is ideal when you don't have to manage payments for a large user base.
  • Lit Relayer: Best for initial testing and prototyping. It reduces onboarding friction by subsidizing some network interactions, but is subject to availability and potential rate limiting.
  • Payment Delegation Database: Suitable for larger applications or those with a large user base. It simplifies and centralizes the minting and delegation of Capacity Credits to your users, eliminating the need to manage individual Capacity Credits for each user.

For optimal results:

  • New developers may start with the Lit Relayer managing Capacity Credit on their behalf for easier onboarding.
  • As your application grows, transition to managing Capacity Credits yourself for more reliable resource allocation.
  • Large-scale applications should consider the Payment Delegation Database for managing payment on behalf of many users.

Getting Started

To begin using the paid Lit networks:

  1. Assess your needs: Consider your expected usage, scale of operations, and whether you'll be managing payments for multiple users.
  2. Choose a payment method:
    • For testing and prototyping, start with the Lit Relayer managing Capacity Credits.
    • For individual or small-scale use, consider managing Capacity Credits yourself.
    • For applications with many users, look into the Payment Delegation Database.
  3. Set up your chosen method:
    • For the Lit Relayer, go here to begin integrating it into your application.
    • For Capacity Credits, go here to learn how to mint and use them.
    • For the Payment Delegation Database, go here to learn how to register a Payer Wallet and add your users as Payees.
  4. Monitor your usage and adjust as needed.