funded
Hydra-Enabled Accounting and Micropayments System
Current Project Status
In Progress
Amount
Received
₳52,000
Amount
Requested
₳296,750
Percentage
Received
17.52%
Solution

Implement an app based on a decentralized payment system leveraging Hydra that would offer under 0.5% fees and instant settlement.

Problem

A decentralized payment system with minimal fees and instant settlement in Hydra for ADA payments in stores.

Feasibility
Value for Money
Impact Alignment

Team

2 members

Hydra-Enabled Accounting and Micropayments System

Please describe your proposed solution

Today, most purchases are made via credit or debit cards, which incur significant fees paid to banks and payment processing networks, ranging between 1.5% and 3.5%. An alternative could be using blockchain technology to facilitate payments, though the settlement process varies depending on the chain (Cardano confirmation time is between 20 and 60 seconds) and can increase in the event of network congestion. As more transactions are placed on-chain, congestion becomes a bigger issue. Despite relatively smaller fees, when accumulated, these can significantly impact micropayments, particularly for smaller amounts.

We aim to address both the fee and confirmation time aspects of micropayments while ensuring a smooth user experience throughout the payment process.

Our solution involves designing and building a mobile wallet application that allows users to pay with ADA at merchant stores using the contactless NFC communication protocol. The application enables users to load ADA into their wallet, which can then be used to purchase desired products through a simple payment process.

There are a few other initiatives aiming to tackle payments by leveraging Hydra. After analysing those it seems that the use cases these were designed for are conceptually different from what we are looking to build in this project. Specifically we need the ability to mimic a many to many relationship between customers and merchants.

  • Obsidian Hydra Pay - this solution is based on P2P payment channels, each of which resides in a separate Hydra Head. In this context, orchestrating a payment network that could satisfy millions of customers and thousands of merchants, would imply a too large number of Hydra heads making our end solution infeasible without significant changes in the topology, e.g. re-using channels across merchants or creating a layer of intermediary gateways aggregating customers/merchants. At the same time, we would still be open to revisit that approach, but want to focus on the end-to-end user journey and will start with a simpler accounting model.
  • Cardano Lightning Network - is aiming to build a network of two party ledger entries, each path across respective network representing potential payment routes. This solution is similar to Lightning Network on Bitcoin and while it might be efficient in general case, for our specific purpose it also doesn’t work without significant orchestration on top of the vanilla Lightning Network. It is worth noting that the Cardano Lighting Network just applying for concept phase.

The wallet app will utilize a custom accounting system specifically designed to manage the books and records of both individual users and merchants at scale. This custom accounting system will leverage Hydra and Hydra Head specifically. Hydra Heads have one major limitation: they allow only up to 5 participants per head. Our goal is to develop a smart contract where every user will have associated a unique script utxo containing their funds (that script address will represent the system wallet). These utxos will be committed to a Hydra Head and every time a payment is made, a transaction occurs in the head, spending the corresponding user script utxo extracting the funds and paying to the merchant address. Every certain amount of time, a decommit is made so merchants can see their funds on layer 1. Also the users could perform withdrawals in a similar way. The funds settlement process would be triggered at specific points in time, either on-demand or periodically, like at end of day or when enough microtransactions have occurred to fill a Layer 1 ADA transaction. As a result, there will be minimal fees associated with moving funds.

In order to remove concerns around custody of the funds we are looking to implement the solution in such a way that the Hydra Head is managed by multiple nodes deployed across different notable SPOs. This way funds transfer would be decentralised and not depend on a single party.

The solution will be comprised of several components:

  • The custom Hydra accounting system smart contract - it will enable managing the books and records for an unlimited number of users.
  • The user part of the wallet app - it will enable depositing / withdrawing and orchestrating micropayments from a user’s perspective
  • The merchant part of the wallet app - it will enable withdrawing and orchestrating the merchants part of the payment process

Here are the workflows and modules we'll implement in the project:

https://docs.google.com/presentation/d/1cQ-AR27TiA2CwvWXn8RItx3V8Z7u6wiYYEAyMoP9Ics/edit?usp=sharing

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

The wallet app will introduce a new payment mechanism based on the Cardano blockchain, encouraging wider adoption of Cardano by both end users and merchants. This will directly lead to more payment transactions per each on-chain transaction on Cardano. Because the wallet app will offer significantly lower fees compared to traditional payment systems, it will benefit both users and merchants by allowing merchants to either reduce the price of goods paid for using the wallet app or redirect the saved fees into other customer incentives.

Beyond the direct benefits of the wallet app, the custom accounting system can have a significant impact, as it can be reused to manage the books and records for other use cases. This will allow other interested parties to develop applications that leverage the custom accounting system while still enjoying the benefits it offers in terms of fees and settlement time.

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?

[Capability]

Our team is made up of two dedicated professionals whose skills complement each other: Tudor, a seasoned entrepreneur with extensive experience in the Cardano ecosystem, and Sorin, a software delivery specialist experienced in building highly efficient IT systems.

Together we are committed to deliver real life utility with the Cardano ecosystem.

[Feasibility]

We have engaged in several discussions with Hydra team and TxPipe about the feasibility of building such a system, and based on these talks, we are confident that it can be achieved. We are also in discussion with Hydra team about some potential enhancements related to the consensus mechanism currently used in Hydra Head - it currently requires 100% consensus between all Hydra nodes which adds security while reducing resiliency and potentially increasing consensus time in case of network latency or node unavailability.

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

Milestone 1: Research of current state of Hydra, taking into account limits for adding utxos to heads, commits and decommits. Also how to query information from the Hydra head. Note that partial commit/decommit feature is a necessary feature for this scope and the Hydra team is already working on finishing it up.

Research the work previously done with Hydra Pay and meet with Obsydian to fully understand the work that has already been completed.

Create the detailed design for a Hydra based custom accounting system that will enable managing the books and records for end users and merchants.

Create the design / UX for the wallet app.

Output

Wireframes for the customer app in Figma

Design for the accounting system including rationales for adopting specific design choices.

Milestone 2: Implement the wallet app that will enable the payment process from a customer end. IOS / Android

Output

User wallet app for IOS & Android

Milestone 3: Implement the custom accounting system based on the previously developed design.

  • Implementation of validators and minting policies in Aiken for locking the users’ funds and making the payments to merchants.
  • Implementation of offchain code for building the corresponding transactions and querying the necessary information.
  • Demo showing the uses cases running an Hydra head on a private or public testnet. The use cases include: user deposit of funds in layer 1, payments to merchants in layer 2, and withdrawals (from users and merchants) on layer 1.

Outputs

Aiken validators and minting policies for locking user funds and performing payments.

Typescript off-chain code for transaction building and querying.

Milestone 4: Implement the merchant side of the app to enable merchants to manage the process on their end and integrate it with the NFC reader.

Conduct audit and security testing

Outputs:

Merchant app

Audit & Testing report

Final Milestone: Project completion documentation and informational materials & campaign

Outputs

Demo of the end to end flows (Deposit, Withdraw, Payment).

Detailed documentation on implementation.

Informational materials and campaign.

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

Tudor Cotruta

Tudor's role involves maintaining and facilitating interactions within the Cardano ecosystem, managing the project to ensure deadlines and commitments are met, and actively contributing to communication with businesses, developers, and other entities.

LinkedIn:

https://www.linkedin.com/in/tudor-cotruta-a6661a88/

Sorin Canter

Sorin holds a degree in applied mathematics, a master's in information technology, and has over 20 years of experience in the IT industry in roles such as engineer, consultant, teacher, and coach. He also has extensive leadership and management experience. His role is to provide analytical insight to the project, digest and leverage technical matters, and proactively contribute to the development process.

LinkedIn:

https://www.linkedin.com/in/sorin-canter-21716327/

Together, we have demonstrated reliability and the ability to deliver through our participation in Fund 11 for the blockchain-based wine supply chain tracking platform.

Razali 'Raz' - Catalyst Advisor

LinkedIn: https://www.linkedin.com/in/razali-samsudin/

Please provide a cost breakdown of the proposed work and resources

Hydra research - 10k Ada

Custom accounting system (SC) design - 30k Ada

UX for wallet app - 10K Ada

User wallet IOS - 25k Ada

User wallet Android - 25k Ada

Custom accounting system smart contract and offchain code implementation and testing - 55k Ada

Merchant app - 35k Ada

Audit and security testing - 50k Ada

Project completion documentation - 10k Ada

Informational materials - 5k Ada

Onboarding and marketing campaign - 15k Ada

Management and contingency funds - 25K

Milestones preparation and submission - 1.75k Ada

Total: 296750 Ada

Dependencies on Hydra partial commits and decommits. These are being developed by the Hydra team and will be available for this and other projects soon.

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

We believe there is significant value for the Cardano ecosystem, as the wallet app will introduce a new use case that offers considerable competitive advantages. This, in turn, should lead to broader adoption of the Cardano ecosystem (with new users and merchants joining) while generating new transactions that will boost the growing usage of the Cardano blockchain.

Moreover, the Hydra accounting system developed as part of the project will add significant value by showcasing new use cases for the Hydra and Hydra Head protocol. This could inspire other enthusiasts to explore Hydra's potential, while also enabling developer groups to reuse and build on top of the Hydra accounting system without needing to reinvest time and money in redeveloping its exposed capabilities

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