Technical Details

Architecture

Metaprotocols on top of Bitcoin are really similar in how they work. They usually have an indexer, actively listening to the Bitcoin Node and awaiting mints and transfers of inscriptions. Based on these inscription it does some off-chain computation, stores the results and provides an API to make it available to the world.

Lambda Protocol is no different. We have an unique architecture to allow faster reindexing and allow easier decentralization to a bigger userbase.

Indexer

As described above, the indexer is running and listening to the Bitcoin Node. This means to run an indexer you also need an active Bitcoin Node. This makes it more difficult for non-technical people to run it as the hardware requirements go up.

Lambda's Indexer processes all inscriptions containing "p": "lam" , stores them with the relevant metadata to have all the relevant information to execute them. These executions are stored in a database.

Lambda Client

This software is doing most of the work. It connects to the indexer via Websockets to query all the executions and live updates of incoming blocks. Every execution is then processed sequentially by

  1. loading the smart contract logic + data (from a database or cache)

  2. creating the ContractParams consisting of Ecosystem, Metadata, Oracles, and more. These are available to the smart contract function

  3. executing the smart contract function

  4. storing the new state

  5. storing the transaction details to know what happened

If an error happens the state is reverted and an error transaction is stored

API

Both contract state and transaction details are made available to the outside world. There is an SDK to allow for easier querying. But you can always just use the REST API directly.

Last updated