Hoskinson Introduces Moriarty for Midnight DeFi
Charles Hoskinson reported that a Moriarty loan contract compiled to zkIR and its transaction validated on Midnight Preview. The new language is being developed for Midnight’s planned DeFi kernel, with program correctness proofs built into the transaction process.
By SongMarketCap
Updated:
Charles Hoskinson has disclosed the first concrete test result for Moriarty, a programming language he is building for Midnight DeFi. A loan contract reached Midnight’s zero knowledge intermediate representation and its transaction validated on the Preview network, while the language itself remains under development.
Moriarty Defines Instructions for Midnight DeFi
Hoskinson described Moriarty as a Turing-incomplete intent language for Midnight’s planned DeFi kernel. It is designed to express what a financial transaction should accomplish and the conditions it must satisfy.
Its deliberately limited design narrows the range of possible program behavior, while formal semantics specify how each instruction executes. Hoskinson is studying common components behind lending, swaps, perpetual contracts and synthetic products, but did not present them as completed Moriarty features.
Midnight uses NIGHT as its native network asset. Moriarty would sit at the application layer, where developers could eventually define operations involving NIGHT and other supported assets. No production application using the language has been announced.
Loan Contract Validates on Midnight Preview
Hoskinson said the Moriarty repository contained more than 596 commits when he presented the project. The clearest development milestone was a loan contract compiled to zkIR, the intermediate representation used in Midnight’s zero knowledge execution process.
“I was able to actually get the transaction to validate on the Midnight preview,” he said.
Preview is a development network, and Hoskinson stated that Moriarty was not finished. He estimated another two to four weeks of work before handing it to Lucas and other team members, without announcing a production launch schedule for Moriarty or a NIGHT DeFi product.
Correctness Proofs Target DeFi Contract Risk
Hoskinson said Moriarty is intended to attach a proof of program correctness to a transaction. The proof would demonstrate that the submitted program follows the rules expressed by the language before the transaction is accepted.
“You have a proof of the correctness of the program going with the transaction,” he said.
He linked that design to under-constrained circuits, where a zero knowledge circuit fails to enforce every intended condition. Missing constraints can allow an invalid result to pass the remaining checks and place funds controlled by a contract at risk.
The Preview test confirms the compilation and validation path Hoskinson described. His next stated step is the team handover, moving Moriarty from a personal prototype toward infrastructure that Midnight DeFi developers can evaluate and extend.