Last updated today
Many current Cardano protocols struggle to achieve a flexible & efficient design. This leads to frustrating & convoluted upgrade paths, script bloat, and a tedious DevEx, all wasting team resources.
This is the total amount allocated to MLabs - Efficient Contract Upgrades with Yielding Tx Pattern. 3 out of 5 milestones are completed.
1/5
Spec and design
Cost: ₳ 49,983
Delivery: Month 1 - Sep 2024
2/5
YTxP Ops and Scaffolding
Cost: ₳ 59,978
Delivery: Month 2 - Oct 2024
3/5
ytxp-sdk
Cost: ₳ 39,986
Delivery: Month 3 - Nov 2024
4/5
Ytxp-lib core library
Cost: ₳ 19,993
Delivery: Month 4 - Dec 2024
5/5
Testing and Documentation
Cost: ₳ 29,992
Delivery: Month 5 - Jan 2025
NB: Monthly reporting was deprecated from January 2024 and replaced fully by the Milestones Program framework. Learn more here
The Yielding Tx Pattern is a novel design pattern. Its segmented approach to scripting logic and tx flows keeps upgrades simple and script bloat limited all within an intuitive monoidal context.
No dependencies
Apache 2.0
NA
Problem
Transaction flow design is a challenging problem for Cardano smart contract creators. Typically, transactions must be checked for numerous conditions to be processed by a protocol or dApp. The validation logic is incorporated into ledger scripts which are of limited size.
However, most dApps are complex meaning they rely on various transaction types incorporating complex contexts. Adequately processing these transactions within a protocol's complex rule set is a challenge most teams struggle to overcome. Naive design decisions often incur huge costs later on as application complexity grows.
Need for Enhanced Design Patterns and Open-source Tooling
The expansion of the Cardano ecosystem and the increasing complexity of applications being built on its platform necessitate more adaptable and efficient transaction protocols. Developers need tools to facilitate this process and to ensure protocols can be updated efficiently and relatively painlessly.
Furthermore, inadequate designs are costly, leading to:
Among similar issues.
Solution
The YTxP project aims to address these challenges by developing two key libraries: ytxp-lib and ytxp-sdk. These libraries evolve the Transaction Token Pattern (TxTP) into a more generic and flexible pattern. Overall, the YTxP has several key elements:
YTxP can be implemented with a variety of on-chain and off-chain frameworks. This proposal includes ytxp-lib as a plutarch reference implementation of the on chain code. ytxp-sdk, on the other hand, focuses on YTxP types supporting both on-chain and off-chain frameworks, serialization, cardano-api compatibility, etc.
By offering an improved transaction protocol architecture alongside an on-chain supporting framework and utilities, these libraries will enable developers to build more robust and efficient smart contracts, enhancing the Cardano ecosystem's capabilities.
Market
The primary beneficiaries will be the YTxP library consumers, AKA Cardano smart contract developers. However, downstream improvements will positively impact DApp users by providing more feature-rich applications and faster product cycles.
What does this proposal entail?
This proposal seeks to drastically improve the infrastructure available for Cardano smart contract development by introducing and implementing the Yielding Transaction Pattern (YTxP). Our plan is structured around several key deliverables:
In what way will the success of your project bring value to the Cardano Community?
The YTxP libraries are designed to transform the development landscape for Cardano smart contracts by making them more adaptable, efficient, and easy to upgrade. By reducing the complexity and rigidity of current scripting practices, the YTxP enables developers to build more dynamic and robust applications. This leads to a direct increase in the quality of DApps available to end-users, enhancing the overall ecosystem's attractiveness and functionality. Furthermore, in future iterations and proposals we will be able to build upon this to provide library consumers more integrated and robust frameworks built upon YTxP.
Our team members have considerable experience in protocol design and supporting tools as well as Cardano best practices, category theory expertise, formal methods, and so on. We were the main proponents of the precursor Transaction Token Pattern design which has been incorporated into live protocols operating on Cardano. We have also incorporated design schemes similar to YTxP into other projects.
Finally, to date, MLabs has an outstanding track record of delivering on Catalyst Projects. All of our accomplishments are publicly available for scrutiny, and our mlabs-haskell GitHub repo provides a wealth of information on past Project Catalyst efforts.
Spec and design
Outputs:
-Design document outlining the purpose, architecture, and components of the library
-Specification document describing the soundness of the design approach
Acceptance Criteria:
-Design document provides a coherent overview of the of the library and includes visual representations such as transaction diagrams
-Specification document clearly describes the soundness of the design approach
Evidence
-A collection of markdown documents in a publicly-available GitHub repository comprising the design document
-A collection of markdown documents in a publicly-available GitHub repository comprising the specification document
YTxP Ops and Scaffolding
Outputs:
A fully configured GH repo with
Acceptance Criteria:
-Repo is properly initialised and structured
-Makefile successfully builds the library
-Code formatting is consistent
-Hercules CI successfully and reliably runs
-Haddock/Hoogle documentation is accessible
Evidence
-Link to repo containing completed setup
-Hercules CI output incorporated into repo
-Link to Haddock/Hoogle documentation or option for locally built documentation
ytxp-sdk
Outputs:
Acceptance Criteria:
Evidence
Code Repositories and Documentation: Links to the publicly available GitHub repository containing the ytxp-sdk library codebase.
ytxp-lib core library
Outputs:
Development of the primary components of the ytxp-lib core library, including:
Acceptance Criteria:
-Comprehensive Implementation: Each component and YieldingScripts
-Module Compatibility: All modules should be integrated properly, demonstrating seamless interaction and data flow between the components without any conflicts or errors.
-Code Integrity and Style: The implementation should follow best coding practices.
Evidence:
-Direct links to the publicly-available open-source ytxp-lib library.
Testing and Documentation
Outputs:
Comprehensive testing and detailed documentation for both the ytxp-lib and ytxp-sdk libraries, ensuring they meet operational standards and are user-friendly for developers.
This will include:
Acceptance Criteria:
-Test Coverage: On chain tests for the core library and serialization tests for the sdk.
-Documentation Clarity and Completeness: Documentation must be clear, comprehensive, and technically accurate.
-Tutorial Usability: Tutorials must guide new users through setting up and deploying typical use cases effectively.
-Closeout Report: Video demonstration and report as required by the Catalyst rule book.
Evidence:
-Direct links to the documentation and guides
-Direct links to the test suite
-Link to closeout report posted to YouTube or similar service
MLabs
MLabs has quickly become one of the premier development firms in the Cardano Ecosystem. We are an IOG Plutus Partner and work regularly with IOG to develop the Cardano blockchain and ecosystem. Our team is composed of talented developers who have helped build community projects such as:
Through our work with early-stage projects, we have one of the largest groups of Haskell/Plutus developers in the community.
Website: https://mlabs.city/
Core team
Peter Dragos
Project Manager
During his time at MLabs, Peter has contributed to the design, implementation, and management of numerous Cardano DeFi protocols, including Liqwid, XPlorerDAO, Metera, and others.
The Yielding Transaction Pattern stems from early sketches that Peter and his teams worked on shortly after the release of the Plutus language and its principles have been applied as optimizations to existing protocols, including SundaeSwap, Discovery, Minswap, Butane, Summon staking split, and Lending Pond. His background in mathematics and technical commitment to high-quality, didactic code have helped teams and clients reach new heights, and he is excited for the opportunity to share authoritative documentation and a reference implementation for the YTxP with the community.
https://github.com/peter-mlabs
Edi Granado
Software Developer
Edi has contributed to numerous Cardano DeFi protocols, including well-known ones like Liqwid. He observed Peter and his team working on the YTxP early on and incorporated his ideas into other protocol designs. With many years of experience in software development, Edi has worked for companies such as Platonic.Systems and Emurgo Africa, and currently works for MLabs. He is pleased to contribute to implementing the YTxP reference.
https://github.com/the-headless-ghost
Alberto Fanton
Software Developer
Alberto is a Haskell developer deeply immersed in functional programming and the Nix ecosystem. With a solid background in distributed systems and Bitcoin applications, he has recently ventured into the Cardano ecosystem. At MLabs, Alberto contributed to various Cardano projects, including off-chain development, on-chain protocols, and the enhancement of development experience and operations. Driven by curiosity and a commitment to innovation, Alberto's overarching goal is to make YTxP effective and accessible to everyone.
Giovanni Garufi
Software Developer
Cardano DApp developer and auditor, worked on several Cardano protocols, both from the backend and frontend side. Passionate about mathematics and functional programming, and always thrilled to explore how these blend together. Loves working on tooling and libraries that can be useful for other developers. Giovanni hopes YTxP can be a means to build more complex and interesting DApps for the Cardano ecosystem.
Jeff Cheah
Software Developer
Jeff is a software engineer at MLabs, specializing in Haskell and Plutus with a focus on Cardano DeFi protocols. During his time at MLabs, Jeff has contributed to projects like XPlorerDAO and others. He was involved in the early development of the Transaction Token Pattern (TxTP), which introduces a new way to manage smart contract state transitions by using transaction families and deferred validation. Previously, at FP Complete, Jeff contributed to key open-source Haskell projects, including Stack. Jeff's focus on functional programming and high-quality code drives his work to improve the efficiency and accessibility of blockchain solutions for Cardano users.
https://github.com/jeffhappily
Nigel Farrelly
Software Developer
Nigel has been a core contributor to a number of projects during his time at MLabs, with a focus on both off-chain and on-chain development. He has worked with a variety of languages and frameworks in this time, with his fondness for Haskell and functional programming originally stemming from experiments with the live coding environment TidalCycles.
https://github.com/nini-faroux
Luke Mahoney
Delivery Manager
Luke brings a wealth of experience in software development and project management, particularly within the DeFi and open-source sectors. While at MLabs, he has played pivotal roles in planning and organizing several prominent DeFi initiatives. He has also helped organize and manage MLabs' Project Catalyst efforts that have funded numerous open-source efforts in the Cardano ecosystem like CTL, LambdaBuffers, and others.
https://github.com/somthn0somthn
Budget/cost breakdown:
Subtotal: 538 hours @110 USD/hour = 59,180 USD
Total (@ rate $0.296 USD / ADA): 199932 ADA
**In the interest of full transparency, please note we have applied a conservative USD/ADA exchange rate in pricing this proposal. This is to ensure our operations remain stable regardless of market conditions. Although we firmly believe the future of Cardano is bright, we recognize the price of ADA and all cryptocurrencies is inherently volatile. Our financial obligations are denominated in fiat. Most importantly, this includes the salaries of our engineers whose hard work makes projects like this possible.
In the unlikely scenario of severe negative price movement beyond our forecasted rate, it is possible that MLabs may need to temporarily suspend work on this proposal until the market recovers. Rest assured, this decision would be made solely to protect our business's long-term viability and never taken lightly.
We appreciate your understanding and support, and we are excited to see what we can achieve together.
By delivering the YTxP libraries, we aim to dramatically improve the efficiency and effectiveness of smart contract development on Cardano. We believe we have budgeted appropriately and provided a de-risked rate that still allows us to deliver an impactful project to the community. Furthermore, our proposal offers broad future improvements to the space, including:
Cost Efficiency: The YTxP approach minimizes the need for frequent and complex upgrades, which are currently a significant cost and time burden for developers.
Enhanced Developer Experience: By improving the underlying architecture of transaction handling and script interaction, YTxP will streamline the development process.
Long-Term Value Creation: The open-source nature of the YTxP libraries ensures that once developed, these resources can be utilized by an unlimited number of projects without additional cost.
Community and Ecosystem Growth: By lowering barriers to entry and providing a more accessible framework for developers, YTxP will attract new talent to the Cardano blockchain.