Midnight Hackathon Winner Latch Builds Private Spending Controls for AI Agents

The DeFi track winner deployed a revocable AI agent payment contract on Midnight Preprod. The accompanying developer update covered contract calls, MIP-11 and a Shielded Chips tutorial for private application assets.

By SongMarketCap

Cardano News - Midnight Hackathon Winner Latch Builds Private Spending Controls for AI Agents

Latch, winner of the DeFi track at the July 2026 Midnight Hackathon, has deployed a Compact smart contract that allows owners to define private and revocable spending permissions for AI agents. The project was presented during the July 29 Fireside Dev Hang alongside updates on upcoming Midnight developer features and shielded token tools.

Midnight is Cardano’s partner chain for programmable privacy and selective disclosure. Its development environment allows applications to verify contract execution while protecting financial policies, user identities and other sensitive data.

Latch Restricts AI Agent Wallet Access

Latch was developed by Ashiha Mahesh Kumar and Atharv Mantri around the risks created when autonomous agents need to purchase APIs, datasets, infrastructure or other digital services. Giving an agent unrestricted access to a funded wallet can turn a compromised workflow, prompt injection or faulty decision into an open financial liability.

The project replaces full wallet control with a limited spending capability. Owners can define a total budget, maximum payment amount, approved spending category, usage limit and revocation status. A nullifier mechanism prevents an approved request from being submitted more than once.

Latch also separates private management data from information available to outside observers. The Owner View displays spending rules and detailed rejection reasons, while the Public Observer View receives only commitments, authorization status and restricted receipts. Private limits, categories and rejection details are excluded from the public data model.

According to the project’s Devpost submission, its Compact contract is deployed on Midnight Preprod through a connected Lace wallet. The contract implements three circuits, createCapability, authorizeSpend and revokeCapability.

The interactive walkthrough currently uses a local simulator that mirrors those authorization rules. Simulator actions are not submitted as Preprod transactions. Latch’s next development milestone is to connect the complete application workflow directly to the deployed contract.

Midnight Prepares Contract Calls and Shielded Token Standards

The Fireside update also covered contract-to-contract calls, events, ECDSA signature support and further improvements to the Compact development environment. The functions are moving toward quality assurance and test environments but are not yet publicly available on the Preview network.

Contract-to-contract calls would allow one Midnight smart contract to invoke functionality provided by another. Events would give dApps and external services a structured way to track contract activity, while ECDSA support would expand compatibility with existing wallet, signature and security infrastructure.

Midnight plans to release documentation, examples and tutorial code as the individual functions become available for developer testing.

The update also included MIP-11, OpenZeppelin’s proposed standard for native shielded tokens on Midnight. The public development issue remains open and is listed as in progress under the Compact Contracts 0.3.0 alpha release process.

Its first phase covers minting and burning native shielded Zswap tokens with modular ownership, role-based or multisignature controls. A later transfer phase depends on contract-to-contract calls and custom spending logic.

A shared implementation would provide wallet and dApp developers with a consistent structure for issuing and destroying shielded assets instead of requiring each application to create an independent token model.

Shielded Chips Tests Private Assets and Contract Custody

Shielded Chips uses a roulette application to demonstrate how public game rules can operate alongside private ownership and payout data. Observers can verify that a pseudonymous participant placed a wager and whether it won, while the player’s wallet address, identity and private payout amount remain protected.

The house is the only party authorized to mint the game’s chip tokens. Before a round begins, the smart contract takes custody of the required assets from both sides and then applies the published rules to determine the payout.

The design separates those shielded application assets from $NIGHT, Midnight’s public, unshielded native and governance token. Under the demonstrated model, $NIGHT does not function as the private chip used inside the game contract.

The test environment also covers transactions designed to fail. The contract must reject an unsupported shielded token, prevent a losing participant from claiming the payout and confirm that the disclosed result matches the value committed before the outcome was revealed.

The Shielded Chips repository and tutorial were not public at the time of the update. Their planned release is intended to document shielded token minting, contract custody, pseudonymous identity, private payouts and failure testing.

Publishing that code would place a reusable application example beside MIP-11’s common token interface. Latch’s separate Preprod integration would complete direct contract enforcement for capability creation, payment authorization and revocation, giving Midnight developers two distinct implementation paths for shielded assets and constrained AI agent payments.