vote pending
Lucid Evolution 2.0 - Blueprint & Enhanced Plutus Schema
Current Project Status
vote pending
Amount
Received
₳0
Amount
Requested
₳200,000
Percentage
Received
0.00%
Solution

Rewrite the Lucid-Evolution schema package using Effect Schema to enhance flexibility, improve TypeScript inference, and ensure better compatibility with Plutus data types, solving current limitations

Problem

Lucid-Evolution’s reliance on TypeBox for schema types hampers flexibility and TypeScript inference, complicating the handling of complex Plutus data types, type assertions, and recursive types

Anastasia Labs

1 member

Lucid Evolution 2.0 - Blueprint & Enhanced Plutus Schema

Please describe your proposed solution

Upgrade Lucid-Evolution schema package using Effect Schema aims to address the limitations of TypeBox in handling Plutus data types. This enhancement will bring several key improvements:

Key Features

  • Improved Flexibility: Better management of Plutus data types
  • Enhanced TypeScript Inference: Stronger type assertions and support for recursive types
  • Safe Deserialization: Secure handling of UTxO datums
  • Seamless Integration: Smooth incorporation into the transaction builder
  • Type-Safe Derivation: Creation of Datum and Redeemer from blueprints <https://github.com/cardano-foundation/CIPs/tree/master/CIP-0057>
  • Utility Functions: Schemas for managing basic types like addresses and assets

Advanced Capabilities

  • Configurable Encoding: Options for bounded (canonical) and unbounded (non-canonical) encoding
  • Customizable Data Handling: Ability to specify encoding strategies for specific parts of a datum

This upgrade will significantly enhance the development experience for Cardano blockchain applications, providing more robust and flexible tools for managing complex data structures and transactions.

We can already see from these schema validations that Effect Schema is the best-positioned library to do this work.

<https://monadical.com/posts/typescript-validators-jamboree.html#Effect-schema>

Please define the positive impact your project will have on the wider Cardano community

Impact on Cardano Development

Improved management of Plutus data types will enable developers to create more complex and sophisticated types. The implementation of configurable encoding options aims to avoid error messages such as:

Failed to deserialize PlutusData using UnConstrData:\n\nCon(\n Data(\n BoundedBytes(\n BoundedBytes,

This enhancement aligns with CIP-0057, promoting standardization across Aiken, PlutusTx, and Plutarch.

Additionally, enhancing error messages will improve developer experience, transitioning from generic messages like Error("Could not serialize the data: " + error) to more descriptive and user-friendly messages.

Measuring Impact

To evaluate the impact of this upgrade, the following metrics will be monitored:

  • Adoption: Track the number of projects and developers integrating the new schema package.
  • Error Reduction: Assess the change in reported bugs and issues related to schema management in Cardano projects before and after the upgrade.

`

What is your capability to deliver your project with high levels of trust and accountability? How do you intend to validate if your approach is feasible?

The core team is uniquely positioned to enhance Lucid Evolution, having already demonstrated our capabilities through tangible achievements and a deep understanding of the Cardano ecosystem.

We've successfully implemented key improvements, such as robust error handling and a refined type system, making Lucid Evolution more reliable and predictable. We've streamlined dependency management, reduced redundant code, and optimized performance, resulting in a leaner, more efficient library.

Our efforts go beyond fixing existing issues. We've led Lucid Evolution's integration with CML 5, unlocking new possibilities like Plutus V3 and Conway features for developers. Additionally, we transitioned Lucid Evolution from a monolithic structure to a modern monorepo, enhancing scalability, maintainability, and code reusability, while streamlining development workflows.

Furthermore, we've integrated the latest Plutus V3 capabilities and governance features into Lucid Evolution, bringing new functionality to the platform.

These achievements represent real progress that directly benefits the Cardano ecosystem. The core team remains committed to open-source development and active collaboration within the community.

What are the key milestones you need to achieve in order to complete your project successfully?

Milestone 1: Core Schema Implementation

A. Milestone Outputs:

Implement core data schema structures using Effect Schema.

B. Acceptance Criteria:

  1. Core schema structures must correctly handle Plutus data types.
  2. Utility functions must successfully manage common Cardano types with full type safety.

C. Evidence of Milestone Completion:

  1. GitHub repository showcasing the implemented core schema structures and utility functions.
  2. Unit tests confirming the correct functionality of core schema operations.

Milestone 2: Safe Deserialization and Type-Safe Derivation

A. Milestone Outputs:

  1. Implement safe deserialization for UTxO datums.
  2. Establish a framework for type-safe derivation of Datum and Redeemer from blueprints.

B. Acceptance Criteria:

  1. Safe deserialization of UTxO datums is secure and operational.
  2. Type-safe derivation of Datum and Redeemer functions as intended.

C. Evidence of Milestone Completion:

  1. Documented process for safely deserializing UTxO datums.
  2. Code examples demonstrating type-safe derivation of Datum and Redeemer.

Milestone 3: Advanced Features and Integration

A. Milestone Outputs:

  1. Implement configurable encoding options (bounded/canonical and unbounded/non-canonical).
  2. Develop customizable data handling for specific datum components.
  3. Integrate schema package into the transaction builder.
  4. Enhance support for recursive types in Plutus data structures.

B. Acceptance Criteria:

  1. Configurable encoding options work as expected for both canonical and non-canonical formats.
  2. Developers can specify encoding strategies for specific parts of a datum.
  3. Schema package integrates seamlessly with the transaction builder.
  4. Recursive types are handled efficiently and type-safely.

C. Evidence of Milestone Completion:

  1. GitHub repository updated with advanced features.
  2. Comprehensive test suite validating configurable encoding and custom data handling.
  3. Updated documentation detailing new features and integration guidelines.

Milestone 4: Utility Functions for Cardano Types

A. Milestone Outputs:

  1. Develop utility functions to manage Cardano addresses, assets, values, and other common types.
  2. Implement a comprehensive test suite for these utility functions.

B. Acceptance Criteria:

  1. Address functions handle various formats and conversions accurately.
  2. All utility functions are type-safe and conform to Cardano standards.
  3. Comprehensive test coverage ensures the reliability of these utility functions.

C. Evidence of Milestone Completion:

  1. GitHub repository updated with utility functions for addresses, assets, and values.
  2. Documentation detailing the use and capabilities of each utility function.
  3. Extensive unit tests covering various use cases and edge cases.

Final Milestone: Lucid Evolution Integration &amp; Documentation

A. Milestone Outputs:

  1. Comprehensive documentation aligned with Cardano standards
  2. Project Closeout Report and demonstration video

B. Acceptance Criteria:

  1. Lucid Evolution seamlessly integrates with current Cardano infrastructure
  2. Documentation provides clear guidance for developers using Lucid Evolution
  3. All identified bugs and issues are resolved and documented
  4. Project Closeout Report summarizes achievements, challenges, and lessons learned

C. Evidence of Milestone Completion:

  1. GitHub repository (https://github.com/Anastasia-Labs/lucid-evolution) containing:
  • Final codebase with all improvements and integrations
  • Comprehensive documentation
  • Bug tracking log and issue resolutions
  • Documentation on ecosystem alignment with latest Cardano advancements
  1. Project Closeout Report available in the repository
  2. Demonstration video showcasing key features and improvements of Lucid Evolution

Who is in the project team and what are their roles?

Jonathan Rodriguez - Senior Blockchain Developer

Linkedin

Jonathan Rodriguez is a distinguished Cardano Smart Contract Developer with a wealth of experience in auditing and optimizing key protocols within the Cardano ecosystem, including Minswap V2, IBC protocol (Cardano Foundation), Optim Finance, Lenfi V2, Genius Yield, and Wanchain Bridge.

His deep technical expertise in smart contracts is further evidenced by his development of the Lucid Evolution framework and his authorship of CIP-128. Jonathan is also a co-creator of the Cardano Design Patterns Libraries, which serve as valuable resources for the wider developer community.

Beyond his technical development work, Jonathan has made significant contributions to the Cardano network's resilience, playing a pivotal role in mitigating a DDOS attack.

His efforts in the Cardano community extend to delivering over five successful Project Catalyst proposals, which have added important open-source tools and innovations to the ecosystem.

Jonathan's role as a Smart Contract Developer and lecturer for the "Cardano Solutions Architect" course at Emurgo Academy demonstrates his commitment to shaping the next generation of blockchain developers.

Please provide a cost breakdown of the proposed work and resources

The total budget for the proposed project is estimated at 200,000 ADA, equivalent to 60,000 USD at the current ADA price of 0.30 USD. This plan is designed to efficiently deliver the project within 6 months, ensuring quality while addressing all cost considerations.

Senior Developers:

Hiring two senior developers is essential for the successful completion of the project within the specified timeframe. Their combined expertise will be crucial for delivering high-quality, secure code.

  • Hourly Rate: Senior developers’ rates range from 80-120 USD per hour.
  • Estimated Total Cost in ADA (6 months):
  • 80 USD/hour: For two developers working full-time (40 hours per week for 6 months), the total cost per developer would be 76,800 USD, equivalent to 128,000 ADA.

Thus, hiring two senior developers at the 80 USD/hour rate will collectively cost approximately 256,000 ADA over the full project duration. However, since the total project budget is 200,000 ADA, the cost per developer will be split, bringing each developer's effective budget allocation down to 100,000 ADA for the duration of the project.

Managing Price Volatility

To mitigate the risks associated with ADA's price volatility, the project will implement Fixed-Rate Contracts (Partial):

  • A fixed portion of each developer’s payment will be denominated in ADA at the contract’s start, while the remaining portion will be paid in a stable currency, ensuring predictable compensation despite ADA price fluctuations.

Tools &amp; Services

The project will require essential third-party tools and services to support efficient and secure development.

  • Infrastructure: $800/year (~2,667 ADA)
  • This cost covers hosting, servers, and cloud resources required for continuous development and deployment. The selection of cost-effective infrastructure ensures uninterrupted progress with minimal overhead.

Community Engagement &amp; Publicity

Community engagement and promotion are vital for raising awareness and ensuring the project's long-term success.

  • Community Engagement &amp; Marketing: $3,000 (~10,000 ADA)
  • This budget will be allocated to community outreach, educational content creation, and promotional activities within the Cardano ecosystem to ensure visibility and adoption of the project.

Contingency Fund &amp; Continued Maintenance

A contingency fund has been established to address unforeseen costs or challenges that may arise during the project, ensuring smooth execution and continued maintenance.

  • Contingency Fund: 20,000 ADA (10% of the total budget)
  • This fund will provide flexibility to manage unexpected expenses, serving as a safety net to keep the project on track.

No dependencies

How does the cost of the project represent value for money for the Cardano ecosystem?

The upgrade of the Lucid-Evolution schema package provides significant value to the Cardano ecosystem by improving the development experience and offering a cost-effective solution.

This upgrade will give developers—both experienced and new—better tools for managing complex data and transactions, especially those working with Aiken and PlutusTx for on-chain code. It aims to streamline and enhance the process of building decentralized applications (dApps).

Lucid Evolution is a core library within the Cardano ecosystem, supporting numerous protocols. Maintaining and upgrading it is essential for projects like Mynth, Pondora, Genius Yield, Splash, Ada Markets, Meld, Summon, Strike Finance, Atrium, and many others.

By investing in this upgrade, we’re ensuring the long-term reliability of a key component in the Cardano ecosystem, preventing issues that could arise from neglecting its maintenance—issues many developers faced during the last Conway hard fork.

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3m 24s
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4m 3s
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3m 48s
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2m 16s
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3m 14s
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3m 19s
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4m 59s
    Darlington Kofa
0:00
/
~0:00