Last updated a month ago
5 billion people face a justice gap, lacking access to basic legal rights like wills and powers of attorney. High costs, geographic barriers, and missing legal identity leave them legally unprotected.
Willa expands access to legal aid starting with wills. Using Midnight blockchain and privacy-first AI, we provide secure, affordable tools that establish legal aid, identity and protect rights.
Please provide your proposal title
Willa: A Privacy-Preserving AI DApp for Legal Wills
Please specify how many months you expect your project to last
3
Please indicate if your proposal has been auto-translated
No
Original Language
en
What is the problem you want to solve?
5 billion people face a justice gap, lacking access to basic legal rights like wills and powers of attorney. High costs, geographic barriers, and missing legal identity leave them legally unprotected.
Supporting links
Does your project have any dependencies on other organizations, technical or otherwise?
No
Describe any dependencies or write 'No dependencies'
The project has no critical dependencies. It operates end-to-end even without external services. However, we intend to use IAGON as the preferred storage layer for legal documents and identity artifacts when deploying in production environments.
Will your project's outputs be fully open source?
Yes
Please provide here more information on the open source status of your project outputs
This project will be fully open source from day one. All code, including the Compact smart contract, demo UI, AI chatbot integration, and supporting documentation. Everything will be published in a public repository under the Apache-2.0 license.
Please choose the most relevant theme and tag related to the outcomes of your proposal
AI
What is useful about your DApp within one of the specified industry or enterprise verticals?

The DApp shows how Midnight’s Compact contracts support privacy-preserving AI workflows in regulated legal processes. It provides a practical pattern for secure document generation, consent logging, and selective disclosure without exposing private data.
Usefulness in the Legal Vertical
• Private onboarding: identity and asset data stays local and encrypted.
• Consent and custody: Compact contract logs user consent and document hash commitments.
• Selective disclosure: Legal reviewers verify the required information while the user’s data remains broadly private, and the blockchain preserves custody, integrity, and immutability.
• AI assistance: local LLM drafts using jurisdiction-specific templates with no external API calls.
• Developer reference: a reusable pattern for combining local AI, encrypted storage, and Compact contracts.
Technical Deliverables (aligned to the repo structure)
• Compact contracts for consent logging and selective disclosure (contracts/).
• Minimal backend with clear entrypoints for draft generation and commit hashing (server.js).
• Local LLM integration through llama.cpp and prompt templates (ai/).
• Simple demo UI for draft, revise, and commit flows (ui/).
• Basic tests and a reproducible local demo (tests/, scripts/run_demo.sh).
• Clear README with run instructions and model configuration.
Core Architecture (summary)
User inputs sensitive data → stays local and encrypted.
Local LLM drafts will → user revises.
Commit event → SHA-256 document hash → Lace signs → Compact contract stores commitment and consent.
Optional selective disclosures support attorney review without revealing the underlying data.
Evidence of Usefulness
Willa demonstrates responsible AI scaling in regulated industries through working code examples of privacy-preserving smart contracts and wallet integration, creating a reusable architecture for privacy-first DApps across law, healthcare, and finance.
What exactly will you build? List the Compact contract(s) and key functions/proofs, the demo UI flow, Lace (Midnight) wallet integration, and your basic test plan.
Contract 1: Confidential Document Check
• submit_doc_commitment(doc_hash, metadata)
• request_verification(check_type)
• prove_doc_check(check_result)
• selective_disclose(fields, proof)
Purpose: Bind a commitment to the user, run private checks off chain, and publish only proofs of correctness.
Proofs: Range checks, format checks, model inference proofs, selective disclosure proofs.
Contract 2: Trust Registry
• register_verifier(entity_id, policy)
• publish_policy(policy_hash)
• verify_policy(proof)
Purpose: Define which verifiers can request which checks while keeping their policies private.
Contract 3: Audit Anchor
• submit_audit_digest(digest)
• verify_digest(proof)
Purpose: Periodically anchor integrity hashes to Midnight to support compliance without exposing data.
Contract 4: Dispute Mediator
• initiate_dispute(commitment_id, claim_type, evidence_hash)
• submit_evidence(dispute_id, party, evidence_digest, authenticity_proof)
• appoint_arbitrator(dispute_id, arb_entity_id)
• render_verdict(dispute_id, verdict, justification_hash, penalty_action)
• appeal(verdict_id, new_evidence_hash)
Purpose: Enable privacy-preserving dispute resolution between users and verifiers using cryptographic evidence and registered arbitrators—without exposing the original document.
Lace (Midnight) wallet integration
• Wallet creates a local proof session and signs commitments and disclosures.
• Handles selective disclosure choices before on chain submission.
• Interfaces with the Trust Registry to show which policies apply.
Basic test plan
• Unit tests for each contract function including malformed proofs, replay attempts, and policy violations.
• Integration tests across the full wallet to contract flow.
• Model based tests ensuring consistent proof generation across document types.
• Adversarial tests on manipulated documents, OCR noise, corrupted metadata.
• Performance, gas, and batch verification benchmarks.
Usefulness: pattern and necessity
The system directly maps to selective disclosure and private validation patterns. It enables verification without revealing personal information. Public chains cannot support this without leaking data, while Midnight and Compact provide confidentiality by design. In essence,
• Confidential proof publication with minimal leakage.
• Off chain computation with on chain validation.
• Private policy enforcement and transparent audit anchoring.
• Structured selective disclosure flows that traditional chains lack.
Novelty
This project adds a new proof pattern for confidential document accuracy checks supported by small private models. It becomes a building block for KYC, credential verification, private RAG evaluation, and regulated data exchange. Current Midnight examples do not offer this pattern.
How will other developers learn from and reuse your repo? Describe repo structure, README contents, docs/tutorials, test instructions, and extension points. Which developer personas benefit, and how will you gauge impact (forks, stars, issues, remixes)?
This proposal is a direct outcome of our core team member’s participation in the University of Zurich’s Deep Dive into Blockchain (DDIB) Course supported by the Cardano Foundation:
• Privacy-preserving patterns, Cardano best practices, and developer experience principles learned in the course shaped Willa’s design.
• Real-world impact focus reinforced building a tool that addresses the justice gap rather than a purely technical demo.
• Open-source sustainability lessons guided extension points and community engagement.
As a result, this proposal gives back to the Cardano ecosystem, providing both a functional legal aid DApp and a high-quality educational resource for developers.
Developer Value & Personas
• DApp developers: Learn privacy-first flows with Compact contracts and wallet signing for secure data handling.
• zk-curious developers: Explore selective disclosure proofs in practice, generating verifiable claims without exposing raw data.
• Integrators / regulated industry builders: See secure AI-assisted workflows where sensitive data stays client-side yet verifiable on-chain.
Community Impact & Adoption
• Clarity & Reusability: Modular design allows others to fork, adapt, and extend workflows for new document types, predicates, or AI models.
• Educational Reference: Serves as a working privacy-first DApp template in law, healthcare, and finance.
• Signals of Adoption: Measured through forks, stars, issues, and downstream projects, encouraging community iteration.
• Pattern Diffusion: Introduces a reusable building block: consent-based AI workflows with verifiable proofs
This reference DApp will serve as a practical, forkable example for building privacy-first AI tools in legal, health, and finance domains. Moreover, this knowledge ensures Willa serves as both a functional legal aid tool AND a high-quality educational resource for the Cardano developer ecosystem which reflects our commitment as scholarship recipients to give back through well-documented, reusable code
Please describe your proposed solution and how it addresses the problem
Drafting legal wills involves highly sensitive personal data. Existing AI tools either expose this data or lack mechanisms to respect user consent, creating compliance and privacy risks in regulated domains. We propose a privacy-preserving AI chatbot for will drafting that leverages Midnight’s Compact contracts to ensure:
• Consent logging: Users’ approvals are recorded on-chain as verifiable commitments without exposing raw PII.
• Selective disclosure: Legal reviewers can verify minimal claims (e.g., age, consent) via zero-knowledge proofs.
• Document integrity: Final wills are cryptographically committed, guaranteeing authenticity without revealing content.
• Local AI processing: Sensitive inputs are encrypted and processed entirely client-side, ensuring no raw data leaves the user’s device.
Engagement
• Users: Individuals in Cape Town seeking secure, AI-assisted will drafting.
• Legal reviewers: Attorneys verifying compliance without accessing full personal data.
• Developers: Builders exploring integration of AI with programmable privacy for regulated applications.
Uniqueness
• First reference DApp combining AI workflows with Compact contracts for legal use cases.
• Reusable patterns for consent-based AI drafting and privacy-preserving document proofs.
• Extends Midnight beyond finance/governance examples to regulated legal services.
Benefits
• Users: Secure, accessible tools for drafting wills.
• Legal professionals: Verifiable proofs without unnecessary data exposure.
• Developers: Open-source, modular example to learn and extend privacy-first AI workflows.
This proposal demonstrates how Compact contracts enable responsible AI in regulated industries. Introduces a novel building block—privacy-preserving legal drafting—that strengthens Midnight’s ecosystem as the platform for confidential, consent-driven applications.
Please define the positive impact your project will have on Midnight ecosystem
In summary, this proposal
• Demonstrates Compact contracts enabling privacy-preserving AI workflows in a regulated legal use case.
• Expands Midnight’s ecosystem with a new building block: consent-based AI legal drafting.
• Provides developers with a reusable, open-source reference repo adaptable for law, health, or finance.
• Reinforces trust in Midnight as the platform for confidential, consent-driven applications.
Measurement of impact
• Quantitative: Repo forks, stars, issues, downstream examples; number of developers running demos or tests.
• Qualitative: Feedback from legal reviewers, developer community discussions, adoption in workshops or tutorials.
• Milestone evidence: Reproducible demo, passing test suite, successful Lace wallet integration.
All code, contracts, UI, and docs published under Apache‑2.0 in a public repo. Basic examples and README for onboarding new developers. Updates and lessons to be shared with the Midnight community via Catalyst reports, forums, and open documentation. Opportunities highlighted for extending consent-based AI patterns into other industries.
Value to the ecosystem
• Delivers a working, open-source PoC that shows how Midnight can power responsible AI in sensitive domains.
• Attracts new builders and reinforces Midnight’s role as a platform for privacy-first innovation.
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?
We are deeply embedded in the Cardano ecosystem, contributing as Plutus Pioneers, scholarship recipients, and active community participants. This project reflects our commitment to giving back through open-source, educational, and privacy-first solutions.
_Team Members: _
• Bharath Ramesh, PhD – Founder of FlintX, AI and privacy technology leader. Experienced in building privacy-first AI platforms, decentralized solutions, and open-source repositories. Active Plutus Pioneer since 2021, mentoring and contributing to the Cardano ecosystem. Successfully delivered the F9 FetaChain project with full accountability and public reporting.
• Fred Ronney – Pioneering attorney with 30+ years designing sustainable legal aid programs for moderate- to low-income populations. Recognized by the American Bar Association as “Father of Legal Incubators” and awarded the Father Robert Drinan and Zaragoza Awards for public service and humanitarian contributions.
• Hongxu Su – Web3 developer skilled in decentralized protocols and AI integration, with a background in computer engineering (National University of Singapore) and hands-on Web3 infrastructure experience at Scroll.
• Bobby Cruz – Analytics product developer and Economics PhD researcher. Specializes in law, emerging technologies, and machine learning. Graduate of the Deep Dive into Blockchain program (University of Zurich, 2025), supported by a Cardano Foundation scholarship.
• Ons Souidi – Web3 backend developer and blockchain engineer (INSAT, Tunisia). Deep Dive into Blockchain graduate with practical experience in smart contract and protocol development.
• Amina Ahmed –Technical Project manager and computer science graduate with expertise in enterprise systems, cybersecurity, networking, cloud, and blockchain. SAP S/4HANA certified and Deep Dive into Blockchain graduate, combining technical execution with organizational efficiency.
Feasibility
• The project is scoped into 3 milestones over 3 months, each with clear deliverables and acceptance criteria.
• Validation includes unit and integration tests for Compact contracts, end-to-end encrypted session workflows, and a fully reproducible demo with Lace wallet integration.
• All work is documented in a public repository under Apache‑2.0, ensuring clarity, reproducibility, and transparency.
Trust & Accountability
• Proven track record of delivering funded Catalyst projects with milestone-based reporting and public evidence.
• Funds are managed responsibly, with clear deliverables and demonstration of progress (tests passing, demos running, documentation complete).
• Transparent repo structure and open-source licensing further reinforce trust.
We are best suited because of these key reasons:
• Legal domain expertise: Decades of real-world experience ensure solutions meet actual legal needs.
• Blockchain and AI execution: Demonstrated success in privacy-preserving systems, Web3 protocols, and delivery in Project Catalyst (FetaChain Fund 9)
• Vertical-specific validation: Features validated against multiple jurisdictions to ensure compliance and tangible impact on the justice gap.
• Community contribution: The project provides a reusable, educational example for developers integrating AI and privacy in regulated domains.
Please provide a cost breakdown of the proposed work and resources
This proposal outlines a 3-month plan to build a simple DApp using "Compact" smart contracts for consent/info sharing.
Month 1 ($3,500): Setup, core contracts (consent.compact, disclosure.compact), tests, and README.
Month 2 ($3,000): Build UI, integrate with contracts/Lace wallet, add AI chat, and create user guides.
Month 3 ($2,500): Final review, testing, demo video, legal check (Fred Ronney), and final report.
Total Cost: $9,000 USD
Accountability & Fund Management
How does the cost of the project represent value for the Midnight ecosystem?
New building block: Introduces privacy-preserving AI legal drafting, extending Compact contracts beyond finance/governance examples.
Reusable patterns: Consent logging, selective disclosure proofs, and document integrity commitments serve as modular components for other regulated applications.
Open-source repo: Apache‑2.0 licensed, enabling forks, extensions, and downstream adoption.
Developer enablement: Clear repo structure, tutorials, and test suite lower barriers for DApp builders, zk-curious engineers, and integrators.
Legal credibility: Collaboration with Fred Ronney ensures real-world relevance and compliance in regulated domains.
Impact vs. Cost
For $9,000, the ecosystem gains:
A complete reference repo with contracts, UI, wallet integration, and tests
A proof-of-concept video demonstrating end-to-end functionality
A completion report documenting lessons learned and extension opportunities
Measurable signals: repo forks, stars, issues, downstream examples, developer engagement
Qualitative signals: feedback from legal advisors, graduate researchers, and community discussions
Why This Represents Good Value
Low cost, high leverage: Modest funding produces a fully working, open-source PoC combining legal + AI + privacy-preserving blockchain integration.
Ecosystem expansion: Demonstrates Midnight’s relevance in sensitive industries (law).
Trust and accountability: Team has proven track record (F9 FetaChain close-out, Plutus Pioneer experience) with milestone-based fund management.
Catalyst for new builders: Repo clarity and tutorials attract zk-curious developers, DApp builders, and integrators.
Reusability: The AI Chatbot + Private Consent Proof architecture is a primitive immediately applicable to other domains, such as healthcare (patient consent) and finance (loan applications), multiplying ecosystem impact.
This project represents excellent value for money: for a relatively small grant, Midnight gains a novel, open-source reference DApp that demonstrates how Compact contracts can enable responsible AI in regulated domains. The outputs are concrete, reusable, and measurable, ensuring long-term ecosystem benefit well beyond the initial funding.
I confirm that the proposal clearly provides a basic prototype reference application for one of the areas of interest.
Yes
I confirm that the proposal clearly defines which part of the developer journey it improves and how it makes building on Midnight easier and more productive.
Yes
I confirm that the proposal explicitly states the chosen permissive open-source license (e.g., MIT, Apache 2.0) and commits to a public code repository.
Yes
I confirm that the team provides evidence of their technical ability and experience in creating developer tools or high-quality technical content (e.g., GitHub, portfolio).
Yes
I confirm that a plan for creating and maintaining clear, comprehensive documentation is a core part of the proposal's scope.
Yes
I confirm that the budget and timeline (3 months) are realistic for delivering the proposed tool or resource.
Yes
I Agree
Yes
Bharath Ramesh, PhD – www.linkedin.com/in/bharathrb/
Founder & Technical Lead – Oversees AI architecture, Compact contract development, privacy-preserving workflows, and project delivery. Deep Cardano ecosystem contributor.
Fred Ronney – https://www.linkedin.com/in/fredrooney/
Founder & Legal Lead – Provides domain expertise in legal drafting, will compliance, and low-cost legal aid models. Validates legal patterns and selective disclosure requirements.
Bobby Cruz – https://www.linkedin.com/in/databobbycruz/
Founder & Execution Lead – Responsible for overall execution and community building and reachout efforts, ensuring alignment with best practices and responsible fund management.
_Extended Team _
Hongxu Su – https://www.linkedin.com/in/hongxu-su-614114291/
AI/Web3 Developer – Integrates Compact contracts with AI and wallet interactions, handles encrypted session flows, and ensures smooth on-chain/off-chain coordination.
Ons Souidi – https://www.linkedin.com/in/ons-souidi-48a19b24b/
Backend & Blockchain Engineer – Supports infrastructure, testing frameworks, and secure data handling pipelines.
Amina Ahmed – https://www.linkedin.com/in/amina-ahmed-83b048219/
Product Manager – Coordinates workflow between legal, AI, and blockchain components. Ensures project milestones, documentation, and usability are developer- and user-friendly.
Collaborators
Dr. Navjit (IAGON)
Decentralized Storage – Advises on off-chain storage of encrypted user documents. Supports integration with IAGON infrastructure where blockchain storage is insufficient.
We have started to collaborate with Iagon, who are pioneering a decentralized marketplace for storage and computing resources. Their platform aims to simplify and democratize access to the shared storage economy, making it accessible to everyone. Initially, the focus is on creating a transparent storage marketplace, enabling providers to trade their surplus storage with consumers at fair prices, while ensuring data privacy and security. Through file encryption, encoding, and a unique sharding algorithm, Iagon can store files with any desired degree of redundancy and security, making it suitable for sensitive legal documents like wills.
Geography Focus
The initial PoC targets Cape Town, South Africa, with potential for later expansion to Gaza, India and similar regions with limited access to affordable legal services.
Commitment & Capacity
All core team members have confirmed availability and are actively engaged. Collaboration with IAGON is secured to ensure storage feasibility for encrypted legal documents. We are prepared to direct a portion of the funds toward running IAGON nodes in jurisdictions that require in-region storage for wills, ensuring compliance where IAGON infra is not yet available.