Miden Pioneers: Keom Is Reinterpreting DeFi with Zero Knowledge Rails

“Polygon Miden abstracts away all the technological guts,” says Head of Research at Keom, which is pioneering a suite of zkDeFi tools

Polygon Labs
February 15, 2024
Polygon Solutions
Image source: Dribbble

True zero-knowledge DeFi has yet to be built. 

But Keom is changing that by reimagining an onchain order book with ZK rails, as the first pioneer building on Polygon Miden. Keom is reinterpreting DeFi primitives with a ZK-first approach, tailored to Polygon Miden’s unique execution model.

With Miden, developers can create novel, high-throughput, privacy-preserving dApps that are impossible to build with current blockchain architectures. By blending state models of account-based systems like Ethereum with UTXO-based systems like Bitcoin and Zcash—and introducing ZK proofs for privacy and security—Polygon Miden reimagines blockchain design. Accounts communicate through notes, which are messages carrying assets that accounts can send to each other—and a script that defines how the note can be consumed. Accounts can execute locally and prove their transactions with ZK proofs.

So, what does this mean for pioneers like Keom? 

Keom leverages Miden and its unique execution environment to tackle a specific problem: Putting a decentralized order book exchange onchain. Doing this requires pioneering ZK DeFi in a new execution environment where “All the technological guts are abstracted away,” says Daniele Pinna, Head of Research at Keom. Keom will be a service that helps users build and specify the logic of their notes—or, in other words, the conditions that accounts want to govern their transactions. 

In this discussion, we speak with both Daniele Pinna and Garry Krugljakow, Head of Growth at Keom, about building something no one else has ever been able to build before, the exciting prospects for developers, and Keom’s future. 

Keom Protocol, a high-level overview

Krugljakow: Keom is building a suite of zkDeFi tools and primitives, such as an onchain decentralized order book exchange. Keom will allow the most complete and up-to-date snapshot of information pertaining to liquidity available across all the notes existing on Miden.

In the past, Keom has been involved in leading innovation like risk metrics, ZK R&D, and world-class legal expertise. In short: Keom’s research team is leveraging Polygon Miden infrastructure to advance and reinterpret existing DeFi primitives by reassembling DeFi on a UTXO-based chain.  

Imagine taking all of what you expect with current DeFi, stuffing it through a ZK-shaped hole, and landing it in a completely different execution environment. That’s what we’re building.

On how to build a truly decentralized order book exchange 

Pinna: So a decentralized order book exchange is a service which offers all the functionality typical of a central limit order book—CLOB, for short: order matching, order creation, bid/ask spread, and market depth visualization—without actually hosting the liquidity. 

In other words, a decentralized order book will be a service that organizes the execution of all the functionalities you’d expected from a traditional CLOB, but without holding any liquidity. Instead, that liquidity is shared across any account wishing to exchange assets on the same blockchain. It’s user-owned-and-stored liquidity. 

How does that work? 

All sitting bids and asks live directly onchain, and can be tapped into by any actor, whether through the use of the exchange, or freely on their own. In this sense, the exchange is decentralized, so the actual liquidity is not owned by any specific service.

This is the solution that Keom is building: An order book on Polygon Miden where no central entity can unilaterally forbid anyone from interacting with the chain’s liquidity or offer new liquidity of their own volition. Keom will actively monitor liquidity present on existing notes and aid users who want to interact with that liquidity. 

On note-building, with help from Keom

Krugljakow: Keom will be a service that helps users consume or create notes. In the Miden architecture, notes are how accounts send and receive assets. The cool thing with Miden is that developers can encode way more complex logic for how these notes function, while also creating a security buffer. 

Unlike traditional blockchains, accounts in Miden have control over how much information they want to make public or keep private. (That’s a ZK property, for those keeping track at home.)

So Keom helps users encode the desired spending conditions for their funds—the logic that must be met for a note to be consumed. The state of the available liquidity is encoded in how the notes are built, so these spending conditions can be made fully public, or partially public, or virtually private. 

It’s up to a user to choose when and to whom to disclose the details of their notes' spending conditions. In some cases, Keom may be the only actor in the know that some spending conditions are active on a given note, making information gathering the key competitive advantage. 

Offchain, Keom helps users consume pre-existing notes by aiding them in building transactions with valid ZK proofs, which will be verified by the Miden operator (uninvolved in the offchain consumption).

On security with Polygon Miden

Krugljakow: In traditional EVMs, the codebase of verified smart contracts that users interact with is publicly known. When a user stakes or deposits funds into a smart contract, their funds are only as secure as the coded logic of the smart contract. The discovery of one exploitable bug can instantaneously put large amounts of funds at risk. 

Using Miden’s note framework, each note behaves like its own standalone contract. Whereas exploitable bugs can still exist in a note’s spending condition, small differences across different notes and the selective public transparency of a note’s spend condition mean that an attacker would need to exploit notes individually, instead of attacking users' funds in bulk. 

This ushers in a fundamentally different paradigm for user security in DeFi.

On why Keom developers think Polygon Miden is so exciting

Pinna: Miden takes account abstraction to another level. It’s extremely exciting. You do have to cross a barrier of entry to appreciate this excitement, but on the other side, there are a ton of novel benefits and opportunities for developers. Ultimately, within the Miden framework, protocols will behave more and more like liquidity aggregation engines similar to swap aggregators on EVM chains.

I’m excited not only to see how DeFi primitives are reimplemented and redesigned with ZK at the forefront, but also to see what people build around the edges. There is this completely fluid freedom of choice on how much information about a note spend condition that accounts can choose to disclose. So I imagine there will be venues that allow users to aggregate or contribute for public information—to sell as public information to service providers that want information on spending conditions for sets of notes. And that can be built on top. We'll see. I mean, obviously, an onchain order book is what researchers at Keom have found exciting.

I was on a panel once, I don't remember the exact question, but the answer was: “What's exciting when you're dealing with new technology is that you don't know everything that can be built.” That's what's exciting, new technology that gives developers the freedom to build something you could never have imagined. 

* * * 

Follow @Keom_Research on X to keep up to date with their journey on Miden. 

Tune into the blog and our social channels to keep up with updates about the Polygon ecosystem.

Together, we can build an equitable future for all through the mass adoption of Web3.

Website | Twitter | Forum | Telegram | Discord | Instagram | LinkedIn | Polygon Knowledge Layer

More from blogs