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