Privacy in Cardano DeFi: A Zero-Knowledge Protocol for Lending and Borrowing

Discover how Cardano’s new ZK-powered DeFi protocol enables private lending and borrowing while balancing transparency, compliance, and user privacy.

Can the adoption of decentralized finance (DeFi) extend to mainstream financial consumers if it is all too transparent, while the regular folks have secrets they want to keep? If we are to give an honest answer, doubtful. Or, if you’d like to be neutral, it would be that it depends. If we examine some of blockchain technology’s key selling points, transparency is among them. This is true, but only up to a certain point.

At the business level, which in this case could be a decentralized application for handling payments on an e-commerce website using blockchain technology, you’d want to do the following. Protect your financial information, keep customer data secure per the General Data Protection Regulation, and, of course, lock out competitors from your financial strategies, a good example being product discounts. This is DeFi’s most challenging technical barrier — we need secrecy, but not too much of it. Instead, it is about finding the right balance.

A Technical Solution to a Real Adoption Problem

This isn’t to say that DeFi hasn’t made valuable contributions with tools that solve financial problems. If we could mention a few, the likes of financial operations such as lending and borrowing, liquidity mining, trading, and asset issuance are a few in a long list of practical applications. However, for DeFi to survive in the long run, it needs to command an ever-growing adoption and utility, which is only possible through a technological bridge between compliance and confidentiality, a solution to the hurdle mentioned above.

This essay is a dissection of a new ZK-powered lending protocol on Cardano and its significance. We will introduce the underlying problem for further context and take a technical approach to solving this problem using zero-knowledge privacy technology. Even if you don’t come from a technical background, this article will help you understand how technical developments are done in major blockchains and what such initiatives have as an impact on the overall Web3 community at large.

The Problem: Privacy Trade-Offs in Traditional DeFi

The word “DeFi” is a loaded one. It refers to a revolutionary technology that brings greater accessibility to financial services, achieved by removing intermediaries and enabling peer-to-peer (P2P) borrowing, lending, and other financial strategies, such as yield farming, on public blockchains. The current DeFi model is beneficial to the entire ecosystem, although it comes with its own set of challenges, with privacy being the primary area of concern in our discussion today, yet it is not the only issue.

The Transparency Dilemma in DeFi

One problem with most DeFi protocols built on public blockchains is that they operate on fully transparent ledgers. When an action occurs within a lending or borrowing protocol, such as a deposit or loan liquidation, it is visible to anyone with the technical capabilities to query blockchain data. It is tied to a user’s wallet address, which in Web3 represents your digital identity. It fosters audibility and inspires trust, counterintuitively, it also introduces vulnerabilities that many users are entirely unaware of.

If one has the technical know-how to inspect your wallet address, they can view the deposited collateral, outstanding loans, repayment history, and all interactions with other decentralized applications (DApps). It doesn’t take long to figure out that with sufficient research, they can paint your financial profile, turning your DeFi freedom into a data point on a public canvas. Traders, or competitors, armed with knowledge, have the potential to manipulate markets in their favor.

Consequences of Privacy Loss and Failed Workarounds

The lack of privacy breeds multi-dimensional risks. For practical insights, consider regulations that undoubtedly aim to deem this open visibility as non-compliant, or ordinary users who hesitate to use DeFi, precisely due to the absence of confidentiality. What this tells us is that transparency is a double-edged sword: on one hand, it cultivates trust in blockchain protocol mechanics and logistics, and on the other, it undermines user sovereignty and financial autonomy.

Exposure of data denies DeFi protocols the mandate to collect private data, as when defied, information leakage is a recipe for financial losses or, in the worst case, legal actions. Ideally, this means that DeFi protocols are unable to offer any customized solution, a reflection that’s only evident as limited capital utilization. This is another new problem that, in its own right, demands a standalone solution. What this depicts is a speculation in crypto assets rather than a real economy. By now, you should be seeing the risks.

If we champion anonymity in DeFi (as expected and, at least at the time of writing, is the case), procyclicality is the norm now that overcollateralization is the dominant trend, even though it is pervasive in DeFi lending. Put simply, we are conducting lending, with the DeFi platform acting as the intermediary to facilitate transactions without requiring information. As you can see, this is another problem in its own, all stemming from a shortage of privacy.

Failed Fixes: Why Mixers and Wrappers Fall Short

To patch this hole, several attempts have been made through mixers and token wrappers. Mixers like Tornado Cash obfuscate transactions but are under heavy regulatory scrutiny due to their association with illicit financial operations. Wrapped tokens, too, offer a semblance of abstraction, but they do not hide wallet behavior. Instead, they only change asset representation on-chain. While both of these approaches have seen their utility, they suffer from significant limitations (outside the scope of this article), with the most obvious being incomplete and non-compliant privacy guarantees. 

Cardano’s Approach to DeFi Privacy

That cleared up, we can now turn to how Cardano is tackling privacy in the realm of DeFi, particularly in the scope of lending and borrowing. What role does zero-knowledge (zK) technology play as the means to an end? The simplest approach is to walk through the entire solution, hiking towards its impact in the end.

The ZK Solution: Leveraging Zero-Knowledge Proofs for Compliance-Friendly Privacy

This protocol, in response to the problems mentioned above, utilizes zk-SNARKs technology, specifically the Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge, as its core privacy mechanism to secure borrowing and lending transactions in DeFi. It is a zk-Snark cryptographic proof that allows one party (a prover) to demonstrate explicitly to another (a verifier) that they hold certain information without revealing actual details. 

In the context of DeFi, consider a situation that is instance-specific, such as proving the possession of sufficient collateral while concealing the actual amount and the specific asset type to be used as collateral. If you are new to zero-knowledge technology, then we suggest a quick review of:

While the above pieces are all bout Zero Knowledge, each is tied to a specific use case. Use them to broaden your understanding. Now, let’s explore the application of zero-knowledge proofs in DeFi for enhanced privacy.

Protocol Architecture: How Private DeFi Lending Works on Cardano

The workflow can be simplified into four major steps:

1. Zero-Knowledge Proofs (ZKPs) for Collateral Verification

In regular DeFi protocols, it is a requirement that borrowers disclose the value and type of collateral to lenders. This protocol utilizes zero-knowledge technology to demonstrate that a borrower has sufficient collateral, disclosing neither the actual asset nor its value, such as the amount. Based on predefined parameters set by the lender or protocol (a smart contract), zero-knowledge proofs show that the borrower meets the collateral threshold.

In practice, the steps involved in collateral verification using zk-Snarks are as follows: A borrower creates a zk-proof that certifies ownership of the necessary collateral, which is then sent to the lender (or smart contract). Lastly, the lender or smart contract verifies the proof using a public verification key. The verification process occurs without disclosing or learning any sensitive information about the borrower’s holdings. Not only does this approach ensure that the borrower’s privacy is maintained, but it also instills trust in the lender that the borrower is eligible for the loan.

2. Private Transactions for Borrowing, Lending, and Repayment

zk-SNARKs technology anonymizes all transactions in the borrowing and lending process. Typically, the process includes loan initiation, where the borrower proves collateral ownership without revealing their wallet balance; interest payments, where the borrower pays interest while keeping exact amounts hidden and aligned with the agreed terms; and repayment, where the borrower repays the loan while concealing their wallet balance. These private transactions clearly enable users to engage in the Cardano DeFi ecosystem without leaving a trace of their financial activity, thereby protecting their financial privacy.

3. Secure Smart Contract Architecture

At the implementation or technical build level, the design of this protocol’s smart contracts integrates with zk-SNARK for handling collateral locking and unlocking, loan issuance, and automatic payments to trigger repayment actions. This means that the protocol is built on a privacy-first design at its core.

4. Non-Interactive Nature

Because zk-SNARK proofs are non-interactive, meaning proofs can be generated and verified without the back-and-forth communication between the involved parties, they are particularly useful in DeFi ecosystems. In decentralized systems such as the Cardano network, this mechanism minimizes the need for continuous interactions. 

It shouldn’t be difficult to see that the outcome of this operational model reduces complexity and increases the scalability of protocols and projects utilizing this technology. From your perspective, you may be wondering what makes this project unique. The answer is…

Why Cardano: Leveraging the Ecosystem’s ZK-Friendly Infrastructure

Our primary goal is to eliminate traditional privacy concerns in DeFi. The protocol accelerates the growth of the Cardano ecosystem by integrating seamlessly with existing DeFi platforms and serving as a scalable, adaptable privacy layer. This means that all the above-linked ZK-SNARK solutions can integrate this protocol and utilize it to enhance their SDKs with additional capabilities.

By providing privacy in collateral verification, borrowers’ assets remain a mystery. Consequently, complete privacy in the lending process makes it ideal for usage by privacy-aware users and institutions alike. This approach minimizes trust assumptions. In fact, blockchains were designed to eliminate intermediaries. As a result, there will no longer be a need to trust third parties with sensitive data, bearing in mind that these transactions maintain transparency (in their own way) by being verifiable on-chain. 

The protocol justifies its need by keeping sensitive information private, and it encourages the adoption of Cardano at the institutional level. Technically, this solution aligns with Cardano’s preference for secure, modular, and scalable systems. It is a natural fit for Cardano’s UTXO model and upcoming scalability layers.

Roadmap: Milestones and Community Involvement

For the technical steps involved to bring this project to life, the progression is as follows:

Milestone 1: Architecture and System Design

To begin with, the goal is to define a zk-SNARK-based framework for DeFi lending and borrowing for privacy in the involved transactions. The deliverables of this step are a system architecture document outlining the zk-Snark integration for verification, loan issuance, and repayment. Additionally, the smart contract designs are to be presented for locking/unlocking collateral, verifying zero-knowledge proofs, and automating loan repayments, alongside a technical flow diagram for all of the subsequent components.

For acceptance, the smart contracts must enable collateral verification and loan issuance without revealing sensitive details, and zero-knowledge proofs must power loan repayments. This step is complete, and the smart contracts have been published on GitHub.

Milestone 2: Smart Contract Development for Private Lending and Borrowing

The goal here is to develop the core smart contracts that handle collateral verification, loan issuance, and repayments handled via zk-SNARKs. If you’ve taken a look at our other articles, this stage is what we refer to as the circuits phase. Marked as complete, this step has delivered the expected smart contract codebase as seen on GitHub alongside the relevant documentation.

Milestone 3: zk-SNARK Integration for Private Transactions

In the third milestone, the goal is to implement zk-SNARKs for collateral verification, borrowing, lending, and repayments. Deliverables include the integration of a ZK-SNARK-based proof system that verifies collateral, initiates loans, and handles repayments. In addition, lies testing and validation of the zk-proofs to ensure they work as intended (they are verifiable on-chain without revealing the underlying details), and as a wrap, a functional zk-SNARK proof generation library for use in private lending and borrowing transactions. Similarly, this step is complete as evidenced by the public GitHub repository. It also has test cases demonstrating zk-SNARK-based private transactions and collateral verification.

Milestone 4: User Interface (UI) for Private DeFi Transactions

A step second in place and close to the last where the goal is to build a simple user interface (web application). Using this web application, Cardano DeFi users to lend, borrow, and make repayments in full privacy using zK-SNARKs. Regarding the deliverable expectations, this milestone provides a functional web UI that enables users to engage in loan processes, fully integrated with smart contracts. A user should be able to map out their flow for generating zk-proofs, repayments, and collateral verification. ,

Only once users can use the UI, and the demonstration video available with this step can be considered complete. In short, a deployed interface will be available for you to test, alongside its published code on GitHub.

Milestone 5: Project Close-Out Report

Lastly, this project closes out with a summary of its progress, technical achievements, and future potential. In a fully completed Project Catalyst project, this step is the last deliverable item. In this case, it’s a report that provides a brief overview of each milestone, outlines the technical challenges, and identifies future development opportunities. Moreover, the developer documentation is also to be ready, with guides to help developers and institutions understand the system’s architecture and how to interact with it from a technical standpoint. In simple words: a close report, all code, and its documentation on GitHub.

The Project Team and Budget Allocation

The level of technical expertise and aptitude required to bring this project to life is high on a standard budget. Let’s break it down:

The Team: Key Stakeholders and Collaborations

Ownership of this project falls under Dominik Tilman and his company, TrustLevel. TrustLevel develops tools and protocols that measure the reliability of data, information, and reputation of decentralized systems. Time and again, the entity has been funded by grants across different blockchain networks. Examples include Cardano, Arbitrum, and SingularityNET. All these funding rounds focused on building a decentralized reputation layer (DRL). This positioning indicates a strong connectedness across Web3 and a dedicated community that champions the adoption of these tools.

To mention a few, the Voting Calculation for DeepFunding and a ZK Voting Protocol are among the tools built by TrustLevel, all of which have open-source code outputs. Dominik and his team have a proven track record of delivering successful Catalyst-funded projects since Fund 3. Recently, the TrustLevel has worked on the Aiken Smart Contract library in Funds 11 and 12, specifically on zero-knowledge protocols for Cardano’s open-source governance.

Active Collaborations and Core Contributors

TrustLevel actively collaborates with other Cardano ecosystem builders, even though they aren’t involved in building this project proposal, including:

  • SidanLab and MeshJS — A collaboration on smart contract development, specifically the Aiken Smart Contract Library in Fund 11.
  • LidoNation — A partnership to work on Catalyst reviewers’ scores by analyzing user behavior and building models to evaluate the reputation and overall trustworthiness across the entire Cardano Project Catalyst ecosystem.
  • Photrek — A joint effort towards the development of a voting calculations and community engagement tool in SingularityNET, a round-up of builds and tests for decentralized voting mechanisms.

Active builders for this protocol are members of the TrustLevel team, including:

  • Dominik Tilman, Project and Technical Lead — A technical founder with over 15 years of experience in company building and digital innovation management. Dominik is the founder of TrustLevel.io & Conu21.com.
  • Josch Rossa, Full-stack developer and LLMs — A full-stack developer in Java and Python development languages. Josch builds tooling that simplifies boilerplate and scaffolding in Java and Python ecosystems.
  • Alex Ramalho, Full Stack AI Developer — A full-stack AI/DevOps engineer behind tools like self-tracking-software—a TypeScript/Python platform for personal analytics. Alex also builds developer utilities for UI and backend applications.
  • Sergey K, Blockchain Developer — A full-stack Web3 developer skilled in DeFi, NFTs, and blockchain integrations using React, Next.js, and NestJS. Sergey has led projects across dApps, Telegram bots, and smart contracts with a strong focus on performance and scalability.

The Budget

Evenly distributed, the capital allocated to this project is 185,000 ADA, which aligns with the development milestones outlined below. It is based on an hourly rate of 75 USD, the average pay rate for professionals, technical staff, and developers. 

MilestoneDescriptionBudget(ADA)
Milestone 1Architecture and System Design60,000
Milestone 2Smart Contract Development for Private Lending and Borrowing60,000
Milestone 3zk-SNARK Integration40,000
Milestone 4User Interface (UI) for Private DeFi Transactions15,000
Milestone 5Project close-out and reporting10,000

Building Cardano’s Private DeFi Layer: Pioneering Private Lending

Upon completion, we have what could be termed a catalyst for DeFi within the Cardano ecosystem. We view this protocol as a blueprint for ZK DeFi primitives. This project aims to enhance privacy, security, and trust in DeFi. Moving forward, users will now be able to prove collateral and transact without disclosing sensitive information. More significantly, this protocol is an open-source protocol. It means that Cardano users have the tools to protect their financial data while enjoying secure, decentralized transactions.

    Over time, we can expect this protocol to expand DeFi capabilities on Cardano. It attracts privacy-conscious users, developers, and technical founders. Together, they come up and work on projects that enhance the privacy infrastructure ecosystem tools. As more users flock to Cardano for its privacy, its adoption is likely to grow as well. 

    Scaling with ZK Tech: Efficiency and Real-World Impact

    In terms of scalability, implementing zk-SNARKs in smart contract logic further enhances Cardano. Zk-SNARKs support non-interactive verification, an efficient method for reducing on-chain interactions and increasing transaction efficiency. To put it another way, Cardano is heading towards a more scalable and efficient DeFi ecosystem.

    It is in measuring the success of a project that we can tap into its impact. For measurements, this protocol relies on both quantitative and qualitative metrics. In the field of quantity, we are evaluating user adoption, transaction volume, collateral locking, and DApp integrations. The goals are to reach at least 100 unique users within the first year and process a thousand transactions. Additionally, also track the number of loans issued and integrate the protocol with at least three DeFi platforms. 

    On the quality haul, expectations narrow down to community feedback and satisfaction with privacy. If you guessed it, you’re right. Achieve an acceptable satisfaction rate of 80% based on the feedback from borrowers, lenders, and developers regarding the protocol. At least 90% of platform users must acknowledge that the system effectively protects their privacy during transactions for the solution to qualify as satisfactory.

    Learn more about this project by looking at TrustLevel’s GitHub ZK repository and the official proposal on Project Catalyst.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Related Posts