All Articles

ZOK

An overview of our journey onto the completion of the zkIgnite cohort 1 grant. An endeavor underpinned by a $25,000 USDc grant and 15,000 Mina tokens. Our fundamental objective was to simplify working with complex data models, within the dynamic Mina blockchain ecosystem.

Introducing ZOK: Data modeling for ZK

ZOK— is a resourceful utility that allows for greater complexity by providing data modeling throughout zkDapps. ZOK’s API seamlessly integrates data guarantee across user interfaces and smart contracts, streamlining processes and alleviating the burden of repetitive type declarations. ZOK’s object schemas empower developers to articulate data constraints, ensuring a seamless flow of validated inputs. Beyond this, ZOK has been engineered to generate tailored data types for zk-contracts via a transpiler. By thoughtfully incorporating Mina’s core components, including Structs, ZOK enhances security and amplifies the developer experience.

Tackling Challenges

Our work directly addressed the pressing challenge in zk-dApp development—how to create efficient and reusable data validation mechanisms. Inadequate validation and parsing can lead to inconsistencies, vulnerabilities, and bugs. ZOK emerges as a solution, offering an intuitive avenue for expressing data structures and generating reusable types for UIs and zk-contracts. Moreover, ZOK was designed with the intention of easing the steep learning curve and addressing the talent scarcity in zk-dApp development, creating a more accessible platform for builders to contribute effectively.

Accomplishments

Transpiler Advancements: A key milestone was achieved with the development of a transpiler that converted object schemas into SnarkyJS Custom data types, enabling seamless transitions between UIs and zk-contracts. Simple API: By integrating SnarkyJS structs and extending ZOD, we created an expressive API that simplifies data validation rules. Efficient Data Compression: We pushed the boundaries by expanding the 8-field limit per struct up to 32. This optimization efficiently allocates multiple small numbers into a single field.

The team

Santiago Cammi: A medical doctor turned tech specialist, leading development at Charged Particles, with experience in NFT protocols. Budi: A seasoned professional, former core developer of Buidler (hardhat), and lead engineer at alchemist.wtf

We extend heartfelt gratitude to the entire Mina ecosystem—a reservoir of brilliance. Special mention goes to our mentor, Yunus, for guiding us and patiently addressing our myriad questions.

Git repo.