Lucid Evolution: Redefining Off-Chain Transactions in Cardano

According to the 2024 Cardano ecosystem developer survey, most developers cited having a difficult getting started experience as one of their main pain points when developing on Cardano. This was majorly attributed to developers not being able to find the information they’d like (unfindable and scattered documentation), difficulty onboarding to Haskell, and inconsistencies between development libraries and APIs.  Another major pain point was the difficulty building off-chain transactions and the interoperability between on chain and off chain components. 

Anastacia Labs have been building Lucid Evolution, a platform that’s designed to simplify development on Cardano by eliminating some of these challenges associated with building transactions and interacting with smart contracts. Originally, Lucid was developed and maintained by Spacebudz alessandrokonrad as an open-source project. However, when it’s maintenance stopped in the late 2023,  Jonathan from Anastasia Labs and others stepped up to the challenge of preserving and enhancing the codebase.

As a core library in Cardano that underpins multiple protocols, Lucid was indispensable. Lack of maintenance would not only impact smart contract interaction functionality but also affect the protocols relying on it. When Anastacia Labs took over Lucid, they renamed it to Lucid Evolution, which aligns with their goal of creating a Cardano ecosystem that’s robust, reliable, and adaptable to the evolving needs of its developer base. 

While the Evolution library maintained its original Lucid name, it employed a different approach but still strived to ensure a smooth transition, maintaining similar endpoints and core concepts with only minor API changes.

In this article, we’ll go through what Lucid Evolution is, how it works, and how it’s making the life of developers on Cardano easier. We’ll also take a look at some production-grade tooling and platforms powered by Lucid. 

What is Lucid Evolution and How Does it Work? 

Lucid Evolution is an off-chain framework library for Cardano, designed to facilitate developers needs and the development of decentralized applications. It includes various packages such as utilities for signing data, Plutus integration, and wallet management, all built using TypeScript to ensure type safety and a better developer experience. The library allows you to create Cardano transactions and off-chain code for your Plutus contracts. It achieves this by providing an abstraction layer that hides the complexities of Cardano’s infrastructure.

One of the benefits of using Lucid is that it is built using JavaScript/TypeScript, which makes it easier for developers to access a broad range of libraries from the JavaScript community. This lowers the barrier to entry for developers looking to build on Cardano and reduces the amount of time and effort required to get started.

For a better understanding of Lucid, it’s essential to understand how Cardano operates. On Cardano, the majority of computation occurs off-chain. Smart contracts, also known as validators, are simply scripts that lock UTxOs. To spend these UTxOs, the validator must be executed, resulting in either true or false. However, a validator alone cannot modify the state of the chain; only the transaction can do so. The validator ensures that the transaction is created with certain necessary constraints. Lucid Evolution is a framework that simplifies the process of building these transactions to meet the validator’s constraints. In summary, Lucid Evoution makes it easier to construct transactions that satisfy the requirements of the validator.

It’s important to note that Lucid Evolution isn’t a smart contract language or a tool to create validators. It’s an off-chain component that streamlines the process of managing everything from building transactions to creating wallets. With Lucid, developers can focus on building the logic for their dApps while the platform handles the complexities of transaction and wallet management. This simplifies the development process and allows developers to build Cardano-based applications with greater ease and efficiency.

Lucid Evolution supports the Mainnet, Preprod, Preview and Custom networks

For you to query any data on the blockchain using Lucid Evolution, you need to start by choosing a provider or service that allows the library to interact with the Cardano blockchain. Lucid Evolution allows you to choose from a number of providers including Blockfrost, Kupmios, Maestro, Koios, UTxORPC, YACI DevKit, and more.

The provider in lucid.provider is the provider instance you pass to Lucid() when selecting the provider you use to query UTxOs, datums, and protocol parameters. We’ll cover some deep dives into implementing some Lucid core concepts in a different article. However, you can start by checking out their developer docs.

Improving Developer Experience with Lucid Evolution

Developers in the Cardano ecosystem benefit from Lucid Evolution by: 

  • Improved APIs – Lucid Evolution API interfaces are enhanced for better developer experience and function calls streamlined for common operations. Through the Evolution library, you take advantage of built-in support for popular features, reducing the need for external dependencies
  • Enhanced error handling – Error management just got better and a lot smoother with the integration of the Effect library into Lucid Evolution. Developers can debug quicker with detailed, context-rich error messages. The library also uses structured error types making it easier to handle exceptions.
  • Refined structure – Evolution uses a modular architecture, separating functionality into distinct packages. We will be able to add new features as independent modules within the existing architecture
  • Enjoy a developer-centric experience – The goal of Anastacia Labs is to enrich the developer experience through code examples for various use cases. The team  publishes regular updates to add features and improve the library.  You can also get support for your questions through the  Anastacia Labs Discord channel

Dapps Powered by Lucid 

According to the 2024 Cardano Developer Survey, Lucid ranked third while Lucid Evolution ranked fourth among the most popular libraries and frameworks on Cardano. 

This shows the increasing adoption of the library among Cardano developers, with several notable projects already built on top of Lucid Evolution. These include Cardano Foundation, IBC, EMURGO Academy, Midgard Protocol, Liqwid Finance, Indigo Protocol, Splash, Meld, Maestro, Mynth, Pondora, WingRiders, Atrium, Genius Yield, VESPR Wallet, Fetch, Strike Finance, Summon, GenWealth, BettingADA, and Cardexscan.

Looking Forward

Lucid Evolution has great plans to further improve the getting started experience for Cardano developers. One of the awaited features include the ability to simulate blockchain behavior locally in a matter of minutes, bypassing the need for incomplete emulators or private testnets managed externally.

With this approach, developers can quickly spin up test environments using Docker containers controlled through a TypeScript API. This makes it easy to validate transactions in realistic conditions without heavy setup. A consistent and reliable testing environment will also make it easier for developers to identify and fix issues. For more information about their roadmap, planned features, and more, check out the Lucid Evolution project board on GitHub.

To learn more or get started with Lucid Evolution, check out their official website on https://anastasia-labs.github.io/lucid-evolution/. You can join also the Anastasia Labs Discord channel to get help from the community and our team. There’s a dedicated channel for Lucid Evolution where you can ask questions, share your ideas, and get help with your projects.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts