zkUSD Deployment Readiness

This topic is to discuss the proposal submitted by @charlie . Please see below for the details of the proposal and discussion.

6th Jan ,2025
Current status: Funded.
Funding Note: The MVP funded via the program was a very high quality deliverable and we are excited to support the team to bring this product to Mina protocol. The risk of delivery is medium due to the complexity involved.

18th Dec ,2024
Current status: Under Consideration.
Opened for community discussion on : 18th Dec, 2024.

1 Like

Title

zkUSD Deployment Readiness: The next stage of development

Project Background

zkUSD is an innovative algorithmic stablecoin being developed on the Mina Protocol. The project aims to fill a critical gap in the Mina ecosystem by providing a stable medium of exchange essential for DeFi applications such as lending platforms, DEXs, and synthetic assets.

The initial feasibility study, completed in November, validated the critical components necessary for building zkUSD. This included developing and testing minting/burning logic, computational feasibility assessments within o1js constraints, and exploring optimal architecture for zkUSD’s deployment. The study concluded with the successful demonstration of a local proof-of-concept (PoC), showcasing the core functionality of zkUSD.

For more details, you can find the code repository, architectural analysis, and final presentation laid out in the final update of the original feasibility study proposal.

Proposal Overview

Problem

The feasibility study successfully validated the critical assumptions for developing zkUSD on Mina. However, transitioning from a proof of concept to a production-ready solution requires further development, integration, and compliance considerations. Without deploying zkUSD in production, the Mina ecosystem continues to lack a native stablecoin, which is essential for the growth of DeFi applications on the platform. This absence hinders innovation, user adoption, and places Mina at a competitive disadvantage compared to other blockchain networks offering comprehensive DeFi solutions.

Solution

This proposal aims to next stage of development necessary to prepare zkUSD for a production-ready deployment. By the end of this propsal, zkUSD will have a full integration test suite, with the current version deployed on testnet, ready for alpha-testing. This will set the stage for a full security audit and protocol infrastructure development before its eventual deployment to the Mainnet. The deliverables in this proposal focus on completing the application specific technical, and compliance work required to transition zkUSD from a proof of concept to a production-ready system.

In Scope

  1. Integration Testing and Protocol Refinement: Conduct extensive integration tests on Lightnet and Devnet, and implement architectural and protocol design changes based on test outcomes.

  2. Initial Devnet deployment: Once we are happy with our integration test suite, we will open up our Devnet deployment for alpha testing with the community. This will enable users to deposit test Mina to open vaults, mint zkUSD, and liquidate undercollaterlised vault, simulating the full end to end functionality of the system

  3. User Interface: Create an application focused intuitive and user-friendly interface that enables users to create and manage their vault positions.

  4. Legal and Regulatory Compliance: Perform a comprehensive legal and regulatory study to understand the requirements for launching zkUSD, and implement any necessary governance changes to ensure compliance and decentralization.

Out of Scope

  1. Oracle Off-chain Software Development: Developing the off-chain functionality for the protocols oracles to deliver prices on chain. For the intitial testnet deployment we will perform the oracle function of feeding the price data on chain, with the view to decentralise that as we build the oracle software moving to beta-testing.

  2. Infrastructure Setup: Establishing the necessary backend infrastructure for managing the protocol, including a highly available, robust Proof-of-Stake (PoS) participating node.

  3. Website and Documentation: The development of the website, including a landing page and accompanying documentation, is not included in this proposal. The focus will remain on the application itself.

  4. Full Security Audit: A comprehensive security audit is not included in this phase. This will be a critical next step before deploying zkUSD to Mainnet.

Impact

Deploying zkUSD in production will:

  • Provide a Native Stablecoin: Fill a critical gap in the Mina ecosystem by offering a native stable medium of exchange.
  • Catalyze DeFi Development: Encourage developers to build DeFi applications on Mina, fostering innovation and ecosystem growth.
  • Financial Opportunity: Users will be able to natively leverage their MINA holdings by creating vaults to efficiently utilize their MINA without liquidating their assets, opening up pathways for yield generation and strategic investment opportunities.

Audience

  • Individuals and teams building or interested in building DeFi applications on Mina.
  • Users and enthusiasts seeking enhanced capabilities within the Mina ecosystem.
  • Stakeholders and investors evaluating the potential and growth of Mina’s DeFi landscape.

Architecture & Design

Link to diagram

Overview

Building upon the proof of concept, this next stage of development will solidify the architecture, ensuring scalability, security, and compliance. The key components and tasks include:

Integration Testing and Protocol Refinement

The journey toward zkUSD’s production deployment requires rigorous testing and iterative development. Integration testing will be conducted extensively on Lightnet and Devnet to validate the system’s functionality under real-world conditions. These tests will not only ensure the protocol meets its intended design goals but will also provide critical insights into potential challenges and areas for improvement.
As part of this process, the protocol will undergo continuous refinement, incorporating lessons learned from testing and community feedback. This iterative approach acknowledges that as zkUSD progresses toward a production-ready state, new insights may necessitate significant changes to the architecture or to underlying protocol logic. By embracing these learnings, we will ensure zkUSD remains robust, scalable, and aligned with the ecosystem’s needs.

User Interface Development

To ensure zkUSD delivers an exceptional user experience, this proposal includes the involvement of an experienced designer to craft a polished and cohesive brand aesthetic. While the initial proof-of-concept focused on functionality, this phase will emphasize both usability and visual appeal, recognizing that a great user interface (UI) is a crucial aspect of adoption and trust in DeFi applications.

The designer will work closely with the development team to create a modern and intuitive user interface that reflects the zkUSD protocol’s vision. This includes developing a visually appealing design language, optimizing user flows, and ensuring accessibility across devices. By leveraging Next.js, the frontend will seamlessly integrate with this design, offering users a smooth, responsive experience for managing vaults, tracking collateral, and interacting with the protocol.

With a strong focus on UI/UX, the interface will provide clarity and simplicity while maintaining a professional and attractive appearance. This approach not only enhances usability but also reinforces zkUSD’s position as a trustworthy and user-centered product, paving the way for broader adoption within the Mina ecosystem.

Legal and Regulatory Compliance

This research will serve as a fact-finding exercise to thoroughly understand the regulatory landscape and its implications for zkUSD. The outcomes of this analysis will significantly shape the protocol’s future development, both from a technical and business perspective. A key focus will be determining the degree of decentralization required before production deployment, which may necessitate further work to introduce structures like a DAO to govern the protocol.

The findings will also identify the jurisdictions where any DAO-adjacent entities can be established and clarify compliance requirements for partnerships with exchanges. By uncovering these critical insights, this work will provide a foundation for informed decision-making, ensuring the zkUSD Protocol aligns with legal standards while preparing for long-term scalability and success.

Vision

As Mina’s first native stablecoin, zkUSD will provide a foundational building block for other protocols and applications, unlocking the potential for lending platforms, DEX’s, and other innovative DeFi solutions.

zkUSD’s deployment will demonstrate the capabilities of Mina’s zkApps. This proof point will inspire developers to explore Mina as a platform for creating zk DeFi products. The groundwork laid by zkUSD—such as robust oracles, governance mechanisms, and compliance frameworks—will pave the way for a new generation of applications to flourish.

Budget & milestones

Deliverables

  • Operational zkUSD Protocol on Devnet ready for alpha testing including:
    • Application UI/UX for interacting with user vaults
    • Comprehensive integration test suite
  • Legal and Regulatory decisions made including entity set up.
  • Final presentation and detailed report.

Midpoint Milestones (1.5 Month)

  • Initial understanding of regulatory landscape and subsequent planning for entity creation.
  • Integration test suite completed on lightnet, able to provide a demo on lightnet showcasing early UI iteration

Project Timeline

2 Months

Budget Requested

85,000 MINA

Budget Breakdown:

  1. Integration Testing and Protocol Refinement: 30,000 MINA
  2. User Interface Development: 30,000 MINA
  3. Legal and Regulatory Compliance Research: 25,000 MINA

Wallet Address

B62qnfDpwYS9u2uEcgdfcuWRqB5MmPQSeNdrVXMWF6cJXipzcGaMejM

Team Info

Proposer Github:

Charlie Mack

Education:

Self taught programmer, professional history as Scrum Master/Agile coach in large financial institutions

Experience:

Spent the last 3 years building full stack web3 projects including:

Nanobyte - browser wallet / payment processor for Nano
Notifly - AI powered personalised newsfeeds for crypto projects
Omnipus - LayerZero multi-chain defi memecoin project

Relevant Projects:

Chainmail - A ZK Email marketplace

Foundry-Stablecoin - A working implementation of DAI in Solidity

Achievements

ETHDam 2024 (Finalist) - BlockLock - on-chain password manager
ETH Berlin (Runner up) Chainmail - as above

Team Members

Team member:

Michał Adamczyk (anks)

Education:

Graduated IT from Warsaw University of Technology with a specialization in AI/ML.

Experience:

12 years in software engineering spanning research, machine learning, full-stack web development, mobile development, low-level cross-platform libraries, and web3 smart contracts development. Over 3 last years spent in web3: Cardano and then MINA.

The work included:

MinAuth - an o1js-based library and accompanying set of Typescript packages making it easy to set up authentication/authorization based on zero-knowledge proof verification.
liqwid finance DeFi - https://liqwid.finance/
cardano-transaction-lib - a Purescript library for building smart contract transactions on Cardano
Agora - governance modules for Cardano protocols

Achievements:

Protokit price at zkHack KrakĂłw

Discord handle: anks_

Team member:

Vikrant Patankar

Education:

Self-taught product designer and filmmaker with a professional background in user experience and branding design.

Work Experience:

• Studio Little Nice Things (2023–2025) – Product design and visual storytelling.

• Deep Work Studio (2021–2023) – UX/UI design for Web3 startups.

• Freelancing in Web3 (2021–Present) – Collaborated with projects like Spark MakerDAO, Obol Labs, and Omnipus.

Achievements:

• ETHDam 2024 (Finalist)

Socials: @vikr13nt

Risks & Mitigations

Regulatory Compliance

  • Risk: Non-compliance with legal and regulatory requirements could lead to project shutdowns or penalties.
  • Mitigation:
    • Conduct thorough legal research and consult with legal experts specializing in blockchain and financial regulations.
    • Implement necessary governance structures to ensure compliance and only deploy in jurisdictions where we are compliant.

Security Vulnerabilities

  • Risk: Potential vulnerabilities in smart contracts, oracles, or infrastructure could lead to exploits and loss of funds.
  • Mitigation:
    • Focus on best practicies, engage community testing, and prepare for a full security audit prior to production release
2 Likes

This proposal is funded.

The MVP funded via the program was a very high quality deliverable and we are excited to support the team to bring this product to Mina protocol. The risk of delivery is medium due to the complexity involved.

1 Like

Community Update #1

Oracle Redesign
We have completed another redesign of our oracle price feed as we have begun Lightnet testing. Our previous design required around 10 transactions to be submitted and processed each block to ensure the price flowed through its different states. This accounts for just under half of all the network capacity for zkApps so it was obviously no bueno. We have now moved to a zkProgram that will collect and aggregate oracle price submissions and generate a proof that users can use in their transactions to interact with vaults.

The protocol will still maintain the list of trusted oracles on chain.

UI
Ive been working on creating the scaffolding with a nextJs app to interact with the zkUSD protocol. As the tooling isn’t quite on the level of EVM yet a lot of this had to be created. I’m pretty happy with the state of it at the moment. Our designer is working on creating the app component for interacting with vaults which I will implement once ready. Right now I just knocked together some components using Shadcn. Its my first time using that and its so much better than using a component library.

We also made the design decision to use zkCloudWorker for our transaction proving and sending. That has been integrated with our UI to ensure we have a smooth user experience with compiling and proving contracts & transactions.

Proving Service

To facilitate the oracle price feed mechanism for users, we have created a proving service that will periodically create the zkProof of the MinaPrice and serve the latest one via a REST api for users to retrieve and use in their transactions. Of course they have the ability to generate this proof themselves but we provide this QoL increase for most users.

Test infra

We have begun creating our infrastructure test suite, it began with a creation of a transaction manager to better manage the transaction life cycle. Now we are shifting to building out the integration tests which will cover main areas:

  • Functional
  • Concurrency
  • Stress/Load
  • Failure Handling & Recovery
2 Likes

Community Update #2

Upgradability Refactor

As we began thinking about how hardforks are currently managed within Mina and how verification keys of contracts are bricked, requiring the owner of the contracts to update them though a signature, we realised that our current design wouldn’t work.

As our user vaults were their own zkapps, we would have been dependent on users upgrading their VKs in order to interact with those vaults. The system requires autonomous and timely liquidations to ensure peg stability, which means that if users didn’t upgrade then it could catastrophic to the zkusd protocol, as their vaults could become undercollateralised, without the ability to liquidate them.

Therefore, we redesigned the state management, effectively absorbing all contract logic into our engine contract while still utilising the users token accounts for tracking the state, and locking down any interaction with the token account through our engine account only.

UI

The UI is making good progress, hopefully will have this done relatively soon and will be able to move on to thinking about a very early devnet deployment to allow for alpha testing.

Integration Tests

We are still working on integration testing, most of the abstractions necessary for parallel transaction proving and processing have been completed which will pave the way for an extensive test suite. We are hoping to make significant progress on this over the next couple of weeks.

Part of the integration tests have been developing a financial risk modelling tool that helps us understand how the protocol will hold up in times of extreme price drop events across a number of different risk parameters. Such as scale of the system and how aggressive our users positions are. This has been enlightening, and there is still a lot of work to look at how the protocol recovers in the event of bad debt. We will probably spend some time on this towards the end of feb.