The Benefits of Lava

Yuval
Lava Network
Published in
6 min readAug 15, 2023

We are building the fastest and most reliable RPC service, routing RPC requests directly to an aggregated network of node providers.

To understand exactly what that means, and how it works, we need to be clear about the problem that Lava Network is solving. If you haven’t already, you can learn more about the Web3 RPC problem in article on the topic. Otherwise, we’ll dive right in to the basics of RPC, what exactly Lava is and how it’s positioned to solve the Web3 RPC problem.

Understanding RPC

When a person wants to know about something on a blockchain they usually just visit a website which presents the information they seek. It’s simple and painless! However, behind the scenes, that website is contacting a node and making a request for this information. This process is often referred to as a Remote Procedural Call or just RPC for short.

Once the requested information is returned from the node via RPC, it is presented to the end user in a simplified UI, that can be easily digested and understood. This is happening all the time — when making crypto transactions, deploying smart contracts, even when using decentralized exchanges. In fact, wallets like Metamask, automated market making protocols, and other dapps with beautiful interfaces all utilize RPC to accomplish their work.

There’s a lot more to know about RPC and the various formats of requests that are made and fulfilled. For now, what we have to understand is that each RPC relay carries with it important data that must be transmitted in a way that is:

  1. Secure — protected from bad actors
    If data is not delivered securely, a user could submit a false transaction or forfeit privileged information to a party.
  2. Fast — happens almost instantly
    Web3 apps can require hundreds of RPC calls in a single screen, and this data has to be delivered fast! Users are expecting smooth interfaces with realtime data updating on the spot. If your RPC takes too long to respond, the whole app UX goes down the drain.
  3. Reliable — happens every time
    If data is unavailable upon request, errors and issues may arise within a web application.
  4. Accurate — gives correct data
    If data is inaccurate, it cannot be used or presented without propagating glitches throughout a platform.

The challenge is meeting all four of these criteria simultaneously. Although RPC endpoints are relatively abundant for many blockchains and ecosystems, finding RPC endpoints which are secure, fast, reliable, and accurate for every ecosystem remains an enduring challenge for web3!

What is Lava?

Lava is an open source protocol that serves as a p2p market for blockchain RPC & APIs. It gives wallets, dapps and indexers the most reliable RPC & APIs, by optimally routing requests through a globally distributed network of node providers.

Technically speaking, Lava is a Cosmos-based PoS chain that connects RPC providers and consumers in a peer-to-peer way.

The way Lava works can be divided in 3 main actions:

1. Pairing

Every epoch, RPC consumers request a ‘Pairing List’ from the Lava blockchain. The pairing list is simply a list of providers that will offer consumers the best service based on geolocation quality of serve scores. Consumers use the pairing list to know which providers can serve them that epoch.

2. Quality Control

The interaction between RPC consumers and providers happens p2p and off-chain.

While receiving service, consumers automatically measure the performance of their providers, and send a signed quality of service (QoS) report to their provider, based on their Latency, Availability and Freshness. In order to claim their rewards, providers are required to submit a cryptographically signed payment request to the Lava blockchain, along with the QoS report which affects their total on-chain score, and effectively their rewards.

Providers can’t cheat by submitting false scores or payment requests as they must include their consumers’ signature.

This process is an essential piece in Lava’s quality control mechanism. The protocol holds providers accountable to their service using cryptographic signatures, economics and game theory, incentivizing low latency, high availability, and data freshness.

A similar principle is used to enforce data accuracy. The protocol samples provider responses and compares them to other providers. When a mismatch occurs, the conflicting answers are uploaded on-chain for a Honest-Majority vote, which create consensus. The faulty or malicious provider is then penalized or slashed, maintaining an optimistic incentive to provide accurate responses on the network.

3. Settlement

Providers enjoy seamless settlement on the Lava blockchain. Lava’s “Lazy Settlement” makes it possible for providers to batch payment requests together, and pay fewer fees by sending less transactions and submitting them when gas is low. In case of losing sync of the blockchain, providers are still able to retroactively request their rewards after regaining sync.

In the future, an “Emergency Mode” will be implemented, where even if Lava’s blockchain is down, consumers can still communicate with their last generated pairing list, and providers will claim rewards retroactively.

The benefits of Lava

Building with Lava holds many advantages over other blockchain data providers:

Quality of Service

  • Latency — RPC providers are ranked by latency, availability and freshness, ensuring that users are enjoying lightning fast relays.
  • Reliability — Every blockchain is supported by a redundant network of providers, and Lava is optimized to maximize availability, low-latency, and proper sync. Users aren’t affected if their provider goes down, they enjoy automatic fallback to other providers.
  • Accuracy — The protocol pseudo-randomly samples provider responses to detect fraudulent and malicious data! Any provider caught serving stale or incorrect data is penalized.

Open source

  • Multi-chain support — Lava powers a growing community of node runners that can easily adopt new chains and APIs according to demand. This is done by the addition of new ‘Specs’ to Lava’s open source — a simple process that will be largley automated in the future!

Cost efficiency

  • Lava’s unique economic framework incentivizes providers to compete and optimize their operations, resulting in highly competitive pricing planned at Mainnet.

Privacy

  • RPC requests are distributed across various providers on the Pairing List so as to obfuscate intention; nosey or malicious RPC providers are disempowered by default.

Lava’s offering

Lava empowers developers with a variety of entryways:

  • Lava SDK — a plug & play JavaScript library that powers multi-chain, fully peer-to-peer RPC.
  • Gateway — an intuitive UI for creating and managing projects & APIs, with usage analytics and SDK integration.
  • Server Kit — a highly performant & robust backend solution for enterprise grade applications. In fact, Server Kit is running in our Gateway’s backend.

For RPC providers, we created Lava Info — an analytics tool to track and optimize their operations!

Solving the Web3 RPC Problem

Overall, Lava offers one standardized solution to the Web3 RPC problem. By and large, Lava’s protocol provides the necessary tools for providers and consumers of blockchain APIs to access necessary data in a way that is fast, reliable, accurate, and secure.

Importantly, Lava provides additional protections and mechanisms that the RPC aggregators, indexes, and public lists don’t provide while remaining decentralized and configurable. It empowers the mavericks, who can monetize their nodes and reach more consumers! And it provides a place for big & small providers to compete across quality of service standards with other RPC providers.

🎓 Learn: Website | Docs 🎓
🧑‍💻 Build:
Gateway | SDK 🧑‍💻

--

--