funded

Open Transaction Chaining tooling to speed up Cardano dApps - By MuesliSwap

₳23,993.00 Received
₳44,200.00 Requested
Ideascale logo View on ideascale
Community Review Results (1 reviewers)
Feasibility
Value for money
Impact / Alignment
Solution

We will implement tooling required to support fast transaction submission (within seconds) using transaction chaining in the cardano-node, PyCardano and Nami wallet.

Problem:

Cardano is generally perceived as a slow blockchain. We want to implement technical solutions for fast transactions (2-3 seconds) based on transaction chaining in openly available tooling.

Yes Votes:
₳ 228,889,843
No Votes:
₳ 116,810,788
Votes Cast:
579

This proposal was approved and funded by the Cardano Community via Project F10: Development & Infrastructure Catalyst funding round.

[IMPACT] Please describe your proposed solution.

Developer tools on Cardano are generally lacking tools to support fast transactions. In the past, this has led to Cardano being described as a slow blockchain and the general perception that interactions on Cardano are limited severely by the block size and frequency (20 seconds). Meanwhile, several developers and experts in the field have repeatedly pointed out that through advanced methods such as mempool reading and transaction chaining, interaction such as consecutive pool updates are possible within 2-3 seconds. This includes consecutive batching transactions – with modern Smart Contract languages batching up to 20 transactions at once is no problem, resulting in extremely high throughput for AMM pools and other DeFi applications.

We see the main hurdle for developers to adopt these changes to be caused by a lack of openly available tools that enable fast transaction processing. To tackle this issue, we propose to improve the available tooling and set standards when it comes to transaction chaining. From our perspective, there are three main tools that need to be adapted to enable a broader community of developers to use transaction chaining:

The main component that needs adjustment is the cardano node. We want to propose changes in the cardano-node to consider transactions present in the mempool for building transactions. Alternatively, the node should accept a set of UtxOs where the user knows that they will be present on-chain at time of submission and build transactions speculatively. This update seamlessly propagates to Ogmios and the cardano-cli and all other tools that interact with the node to build transactions, effectively covering a large part of the developer tools being currently used by projects and that will be used by newcomers.

The second component that requires an improvement is the user facing browser wallet. While we can not implement support for crucial operations in every browser wallet, we want to implement them in the open-source available Nami wallet. The first required features is the handling of spent UtxOs in a transaction to be signed while it is not yet on chain, speculatively, and properly presenting this to the user. The second feature concerns signing of several transactions at once. This is necessary in order to allow speculated transactions to fail and fall back to another, also signed transaction instead.

There are also solutions being developed for this cause such as newm-chain. We will assess their applicabilty and make sure to develop a fully end-user friendly solution at the end.

Nami Wallet has a history of setting standards in the community, by simply providing working reference implementations. We want to attach to this history and provide an update to CIP-30 (the dApp wallet connector standard) based on the newly provided features that will benefit all developers. The standard will have to start as an experimental feature and will be likely only accepted as mature after the finalization of this project.

Both tools together cover the crucial parts of every dApp, the server-based backend and the user-facing frontend and provide the necessary means for developers to adjust their dApp for utilizing transaction chaining. This paves the road for drastically improving throughput and transaction speed on Cardano and break the narrative of being a small and inefficient chain.

[IMPACT] How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?

The proposal addresses the challenge in two ways:

  1. Open-Source availability: The necessary tooling for transaction chaining can only benefit all of the Cardano community if it is developed openly and freely accessible to everyone. It is for this reason that we as MuesliSwap want to enrich the ecosystem by implementing the changes into existing, open-sourced projects.
  2. Improving the end-user experience: The impact on the ecosystem should not be underestimated. By making this tooling available freely and integrated into widespread and largely used software, we open up the way to transform the entire ecosystem – within a very short time. Users will notice that their interaction with the Blockchain is almost immediate and responsive, improving their perception of the chain.
  3. Improving general Perception of Cardano This tooling developments will not only challenge the prevailing characterization of Cardano as a laggard in the blockchain space but also solidify it as a contender amongst its higher-speed counterparts. This would likely attract more users and investors to the platform, fostering increased adoption and growth in the process. Ultimately, this tool could be instrumental in transforming the public perception, performance, and potential of the Cardano blockchain.

[IMPACT] How do you intend to measure the success of your project?

The impact of this project will be measurable by assessing the amount of transactions that make use of or benefit from transaction chaining. This can be assessed on-chain and includes all transactions that spend UtxOs within the same or one block after submission – in general thus processing transactions within less than 20 seconds or one block size.

  1. Transaction Processing Time: Assess the average time of consecutive UTxOs. This is indirectly assessing the amount of transactions that make use of or benefit from transaction chaining. This can be assessed on-chain and includes all transactions that spend UtxOs within the same or one block after submission – in general thus processing transactions within less than 20 seconds or one block size. High amounts indicate that our tooling is used more widely
  2. Tracking Errors: Keep a log of the number of errors or failed transactions before and after the implementation of the tooling. We expect more failed transactions, as bulk signing would create many mutually-exclusive transactions. These will not clog up the system but rather show that the unique UTxO exclusivity is correctly employed.
  3. Platform Stability: Assess the stability of common dApps that employ the new transaction chaining manually.
  4. User Feedback: Collect feedback from users (developers and end-users)
  5. Integration and Compatibility: Evaluate how well the tooling integrates with existing systems and how compatible it is with other parts of the Cardano Blockchain
  6. Network Health: Observe the health of the entire network. We do not expect any degradation
  7. Scalability: Test the scalability of the system with the new tooling. We expect much superior scaling to existing tooling.

[IMPACT] Please describe your plans to share the outputs and results of your project?

The results of the project will be publicized through an ongoing process across multiple channels.

Primarily, the results will be published via commits on MuesliSwapTeam repositories. In a coding or software development context, a commit consists of making a set of tentative changes permanent. In this case, every productive change made by a software developer is kept track of and recorded onto the personal or public repositories. Therefore, the updated changes in terms of results will frequently be committed to the MuesliSwapTeam’s repositories where the public will be able to access and see what has been completed.

Furthermore, results will also be shared through PRs (Pull Requests) and issues on the cardano-node and Nami Repository. Pull Requests are proposed changes to a codebase that others can review and discuss before it's integrated into the project. By doing this, our team will provide an open channel for feedback and discussion about the on-going works in the project.

Issues, on the other hand, are a way to track tasks, enhancements, and bugs for your projects on Github. In the context of this project, they will be utilized to broadcast any bugs that have been fixed or enhancements that have been made, highlighting significant results.

Lastly, we will resort to using social media platforms, specifically Twitter, for immediate reach. Explanatory tweets about the project's progression and results will be dispatched through our Twitter account, @MuesliSwapTeam. This allows for a more casual and digestible format of communication to maintain intrigue and engage our audience while also keeping them informed about our project. Consequently, the publication happens in real-time, ensuring that no delays or gaps occur in delivering our achievements.

  • In synopsis, results will be published continuously, promptly, and openly, facilitating transparency and ongoing dialogue with the community.

    [CAPABILITY/ FEASIBILITY] What is your capability to deliver your project with high levels of trust and accountability?

Our team, the MuesliSwap Team, has a proven track record of delivering high-tech solutions with a strong reputation for trust and accountability. We have demonstrated our capabilities in the following ways:

  1. Pioneering DEX Development: We were the first to launch a decentralized exchange (DEX) on the Cardano blockchain, establishing our position as innovators in the ecosystem. Our hybrid AMM-Orderbook DEX with integrated DEX Aggregator sets us apart from the competition, showcasing our technical expertise and commitment to pushing the boundaries of decentralized finance.
  2. Successful Funded Projects: We have already completed two projects funded through Fund 9 of Catalyst, the Cardano project funding platform. One of these projects has been publicly deployed and is accessible to users, highlighting our ability to deliver on our commitments. We have a track record of meeting project timelines and delivering tangible results.
  3. Competent and Dedicated Team: Our team consists of a large group of dedicated technologists who are passionate about blockchain and decentralized finance. We have the necessary competence, skills, and capacity to successfully complete this project within the allocated time frame while ensuring high-quality outcomes.
  4. Trustworthiness and Accountability: We prioritize trust and accountability in all our endeavors. Our reputation within the community reflects our commitment to transparency, integrity, and delivering on our promises. We understand the importance of maintaining the trust of our stakeholders and strive to exceed expectations in terms of project delivery and outcomes.

Given our experience in pioneering DEX development, successful completion of funded projects, a competent and dedicated team, and our commitment to trust and accountability, we are confident in our capability to deliver this project with high levels of trust and accountability.

[CAPABILITY/ FEASIBILITY] What are the main goals for the project and how will you validate if your approach is feasible?

The main goal of this proposal is to make transaction chaining accessible to the broader public and consequently increase throughput and usability of Cardano. We will apply the following structured approach to validate our approach:

  1. Perform a Technological Audit: Review the technological structure of the Haskell and JavaScript open source codebase of the cardano-node and Nami Wallet to understand how it was built, its purposes, and its current level of functionality
  2. Understand Implementation Requirements: Identify and understand the necessary requirements for chaining transaction processing
  3. Code Review: This involves the careful examination of the code for any bugs or critical errors that could prevent its adaptation
  4. Perform Test Scenarios: Use test scenarios or use cases with detailed conditions to validate the system’s functionalities
  5. Peer Audits: Consider bringing in other developers proficient in Haskell, JavaScript, and blockchain technologies to evaluate the feasibility of the code adaptation project
  6. Adopt Proof of Concept (PoC): A PoC involves creating a small and simplified version of the larger project to demonstrate its feasibility
  7. Consult Experts: Particularly those with experience working with Cardano blockchain, Haskell, and JavaScript, to offer their perspective on the feasibility of the project
  8. Engage the Open Source Community: Share our intentions in relevant communities and forums and garner opinions and advice from other open source users and developers who might have tried similar projects before
  9. Analyze Similar Projects: Look into other projects that have adapted Haskell/JavaScript open source code for similar objectives to gauge feasibility (such as newm-chain)
  10. Seek User Feedback: We will seek seek user feedback about their experience using the code and its applicability in meeting their need

These processes will be done iteratively and steps may require repeating as the project progresses, as adjustments and changes are a part of every software project evolution.

[CAPABILITY/ FEASIBILITY] Please provide a detailed breakdown of your project’s milestones and each of the main tasks or activities to reach the milestone plus the expected timeline for the delivery.

Project Timeline:

Milestone 1 – 1st month after project start: Present assessment of the required changes to each component.

  • Subtask 1: Define requirements
  • Subtask 2: Conduct assessment of current components
  • Subtask 3: Identify necessary changes
  • Subtask 4: Produce and present assessment report

Milestone 2 – 2nd month: Implement the required changes for Nami Wallet and present a usable demo of the update.

  • Subtask 1: Develop detailed plans for required changes
  • Subtask 2: Implement changes in the Nami Wallet
  • Subtask 3: Conduct preliminary tests
  • Subtask 4: Present and demo the updated Nami Wallet

Milestone 3 – 3rd month: Implement the required changes for the Cardano-Node and present a usable update.

  • Subtask 1: Develop detailed plans for required changes
  • Subtask 2: Execute changes in the Cardano-Node
  • Subtask 3: Conduct preliminary tests
  • Subtask 4: Present the updated Cardano-Node

Milestone 4 – 4th to 6th month: Reserved for additional testing and assessment, communication with the community regarding the implemented updates (i.e. writing a CIP-30 update and agree on a suitable standard).

  • Subtask 1: Conduct additional tests on the Nami Wallet and Cardano-Node

  • Subtask 2: Make necessary adjustments based on testing outcomes

  • Subtask 3: Write a CIP-30 Update

  • Subtask 4: Communicate with the community and achieve agreement on a suitable standard.

    [CAPABILITY/ FEASIBILITY] Please describe the deliverables, outputs and intended outcomes of each milestone.

1st month after the project start: A comprehensive list of required changes to the Cardano-node and Nami wallet to implement the announced feature

  • Identify and understand the existing functionality and code base of the Cardano-node and Nami wallet.
  • Define the scope of changes necessary to implement new features.
  • Develop and document a clear, step-by-step plan for implementing these changes.

2nd month: A fork of Nami Wallet with the additional features implemente

  • Create a fork of the Nami wallet repository.
  • Implement new features in the forked Nami wallet.
  • Integration and functionality testing of the implemented features in the forked Nami Wallet.
  • Document the implemented features and changes in the code.

3rd month: A fork of the Cardano-Node with the additional features implemente

  • Create a fork of the Cardano-node repository.
  • Implement new features in the forked Cardano-node.
  • Integration and functionality testing of the implemented features in the forked Cardano-node.
  • Document the implemented features and changes in the code.

4th to 6th month: PRs at the Cardano-node repository, the Nami wallet repository, and the Cardano-Foundation CIPs repositor

  • Review, update and finalize the implemented features and changes in the forked Nami wallet and Cardano-node.

  • Prepare and submit a pull request (PR) in the Cardano-node repository to merge the implemented changes.

  • Prepare and submit a PR in the Nami wallet repository to merge the implemented changes.

  • Prepare and submit a PR in the Cardano-Foundation CIPs (Cardano Improvement Proposals) repository to propose and discuss new improvements in the protocol.

  • Ensure continuous communication with the community and repository owners about the submitted PRs.

  • Make necessary changes and updates in the PRs based on feedback.

  • Track progress of the PRs until they are merged.

    [RESOURCES & VALUE FOR MONEY] Please provide a detailed budget breakdown of the proposed work and resources.

The expected amount of work for each step are split based on the required workforce for each task to reflect the higher cost of Haskell developers of TypeScript developers. We are setting a salary of 150 ADA / hour for Type Script developers and 250 ADA / hour for Haskell developers.

1st month: 20 hours setup and assessment of the code base for Nami (TypeScript) and Cardano-Node (Haskell) each = 20 150 ADA + 20 250 ADA = 8,000 ADA

2nd month: 40 hours implementing the proposed changes to the Nami wallet = 40 * 150 ADA = 6,000 ADA

3rd month: 40 hours implementing the proposed changes to the Cardano-Node = 40 * 250 ADA = 10,000 ADA

4th month to completion: 30 hours writing and discussing updates and adjusting the provided code for each Nami and Cardano-Node = 30 150 ADA + 30 250 ADA = 12,000 ADA. The cost for the CIP-30 Update is included in the Nami wallet adjustments.

[RESOURCES & VALUE FOR MONEY] Who is in the project team and what are their roles?

The MuesliSwap Team consists of a diverse group of highly skilled individuals who bring a wealth of experience and expertise to the project. Here are the key team members and their respective roles:

  1. Project Lead: The Project Lead oversees the entire project, ensuring effective coordination, communication, and alignment with the project's goals and objectives. They provide strategic direction and ensure the successful execution of the project.
  2. Backend Developers: Our team includes experienced backend developers who specialise in Cardano and blockchain development in general. They are responsible for developing and implementing the off-chain backend infrastructure for interaction with the smart contract.
  3. Frontend Developers: Furthermore, we have skilled frontend developers with expertise in Cardano and blockchain development.
  4. Smart Contract Developers: We have dedicated smart contract developers who focus on the development, testing, deployment, and internal audits of the required smart contracts. They ensure the integrity, security, and reliability of the whole smart contract infrastructure.
  5. Project Manager: The Project Manager oversees the day-to-day operations, manages timelines, resources, and budget, and ensures effective project execution. They are responsible for coordinating team members, monitoring progress, and mitigating risks to ensure project success.

Each team member brings their unique skills and expertise to their respective roles, working collaboratively to deliver the project with high levels of proficiency and efficiency. Together, the MuesliSwap Team is well-equipped to drive the project forward and achieve its objectives.

[RESOURCES & VALUE FOR MONEY] How does the cost of the project represent value for money for the Cardano ecosystem?

The necessary tooling for transaction chaining can only benefit all of the Cardano community if it is developed openly and freely accessible to everyone. It is for this reason that we as MuesliSwap want to enrich the ecosystem by implementing the changes into existing, open-sourced projects.

The impact on the ecosystem should not be underestimated. By making this tooling available freely and integrated into widespread and largely used software, we open up the way to transform the entire ecosystem – within a very short time.

The rates applied hourly for the developers are slightly below standard rates at the ecosystem, the MuesliSwap Team will subsidize additional costs as it will benefit from the implementations itself.

Community Reviews (1)

Comments

Monthly Reports

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