On the 25th anniversary of National Day, my two brothers from the university dormitory and I spent a full 7 days in a rented room in the urban village of Guangzhou, with nearly 20 empty Dongpeng Special Drink bottles piled on the floor and takeout boxes stacked at the door, just wanting to create an anonymous voting tool on-chain for the frisbee club we often visit—after all, there are a few girls on the team who don't want others to know who they voted for as captain, saying that the Tencent document administrator can see the backend records, insisting on complete anonymity.@MidnightNetwork

The three of us are seasoned veterans who have been writing Solidity for 4 years, and we can write Web3 contracts with our eyes closed. We previously created two somewhat famous DeFi yield farming tools, and originally thought this could be done in half a month.

In the end, I dove headfirst into ZK development and was completely baffled.

To do anonymous voting, you have to use zero-knowledge proofs to hide the voter's address and options. However, the three of us know nothing about cryptography. We stared at Circom's documentation for three days and couldn't even understand the most basic proof circuit. The error messages were all cryptographic terms that looked like ancient scripts, and I couldn't find answers even on Baidu. In the end, I was forced to watch Bilibili's 'Zero-Knowledge Proofs That Even Middle School Students Can Understand' science popularization video, and the more I watched, the more confused I became.

Later, when I had no choice, I found a junior from the computer science department who was into cryptography. I treated him to three barbecues, and after almost two months of hard work, the final product still had a ton of bugs, generating a proof took over ten seconds, and on-chain verification often failed.

The project directly flopped.

The captain of the frisbee club patted me on the shoulder and joked, saying, 'Bro, you guys have been messing around for two months, and it would be better if I just used Tencent Docs to do an anonymous vote. At least it doesn't lag, and I don't have to learn anything new.' That night, the three of us went for barbecue and drank a case of beer, feeling increasingly frustrated—it's not that we couldn't write code, but the barrier to ZK development was simply too high, high enough that ordinary developers couldn't even touch the door.#night

Oh, by the way, that cryptography junior later even took our half-baked project to brag about it in his coursework, saying he guided three Web3 developers who knew nothing about ZK projects.

It really pissed me off.

Thinking back on it now, it makes my teeth grind.

And now there are so many people in the industry who are always bragging on Twitter that ZK is the future of Web3, but they can't even set up the Circom development environment. They are just pure fakes, and if you ask them to write a demo, they would be dumbfounded.

After playing in the Web3 space for so many years, I understand the industry’s Achilles heel too well: the narrative around privacy has been called out for almost five years now, and ZK technology is praised to the heavens, but the number of privacy applications that can be implemented is pitifully low.

It's not that people don't want to do it; it's that they genuinely can't.

To develop a ZK privacy application, you not only need to know how to write smart contracts, but you also have to be proficient in cryptography, understand the circuit design of zero-knowledge proofs, and be able to optimize proof generation performance. Just these prerequisite knowledge areas can block 99% of ordinary developers at the door.


Not an exaggeration at all.

In the end, the only teams that can build ZK applications are large teams with cryptography experts; ordinary small developers and individual developers can't even get a ticket to enter. The privacy track ultimately becomes a game for a select few, and the ecosystem simply can't take off.

It's also because I've stepped into this huge pit before. During the Fireside Dev Hang live stream held by Midnight and SuperNode on March 11, I was originally just eating pig trotter rice and slacking off, thinking it would just be another official hype about technical prowess.

But as I watched, I dropped the chopsticks from my takeout on the table.

It really left me stunned.

The Compact language they talked about surprisingly flattened the threshold that we struggled for two months to overcome back then.

First, let me be honest with the brothers who didn't catch the live stream: this Compact language is not some new toy for cryptographers; it is a genuine tool made for us ordinary developers—it's completely built on TypeScript. As long as you can write TS and have basic Web3 development skills, you don't need to understand any cryptography knowledge or write complex ZK circuits, and you can quickly develop applications with privacy protection.

The most explosive moment in the live stream was when the official tech guy wrote a demo live, using just a dozen lines of TS code to create a privacy-protected anonymous transfer function. After finishing, he deployed it to the test net with one click, and generating the ZK proof took less than a second, successfully verified on-chain.

At that moment, I directly cursed at my computer, saying, 'Damn, if we had this back then, wouldn't our two months of suffering have been for nothing?'

I immediately tossed the live stream link into our small group from back then, and my two roommates who watched it replied with a string of question marks, asking if this really doesn't require circuit writing?

I wouldn't have believed it in the past.

Oh, by the way, there was a little incident during that live stream. When the tech guy was writing the demo, he accidentally mistyped a variable name, which caused an error during deployment. The comments were flooded with 'car crash, car crash,' and the guy smiled and scratched his head, fixed it in two seconds, redeployed it successfully, and it made the demo seem even more reliable than a perfect presentation.

There were also people in the comments arguing, saying, 'With such good encapsulation, could there be a backdoor?' The tech guy immediately threw out the link to the open-source repository of Compact, saying all the code is open source, and everyone is welcome to audit it. The comments exploded with '666.'

Many people might not have a concept of what this really means.

Previously, when we developed ZK applications, we had to design circuits ourselves, write proof logic ourselves, optimize performance ourselves, and deal with various problems of on-chain verification. It was like having to learn how to build an engine and assemble the whole car before you could step on the gas.

The Compact language is essentially like giving you a fully fueled car.

You only need to know how to steer and accelerate; you can drive without worrying about how to build the engine or design the circuit. The underlying ZK proof generation and verification are all tightly wrapped for you. You just need to write business logic using familiar TS syntax.

What's most reassuring is that this thing is completely integrated with Midnight's DUST.

Your privacy application written in Compact uses DUST for resource consumption when calling privacy computation and generating ZK proofs. DUST automatically produces daily as long as you hold NIGHT, so developers don't need to spend extra money to buy privacy resources, nor do you need to calculate gas and privacy computation costs yourself; the contract takes care of it for you.

The officials also mentioned in the live stream that this test net update specifically optimized DUST's resource calling logic, so developers no longer need to manually manage the allocation of privacy resources, saving us a lot of hassle.

Also, the upgrade of the developer toolchain discussed during that live stream really hit the pain points of us ordinary developers.

For example, they created a dedicated plugin for VS Code, which includes code completion, real-time syntax checking, one-click deployment to the test net, and even local debugging tools for ZK proofs.

Previously, when we wrote ZK code, the error messages were cryptographic logs that looked like ancient scripts, and finding a bug would take several sleepless nights.

But the error prompts of this plugin are as straightforward as errors in ordinary TS code, clearly indicating where the problem is and how to fix it.

During the live stream, I also asked a question in the comments, wondering if encapsulating the underlying ZK logic would affect the performance of proof generation. The official tech guy immediately provided data, saying that Compact maximized the speed of ZK proof generation with extreme optimization, and the proof generation speed is 30% faster than writing Circom circuits by hand. Moreover, there have been developers in the test net who used it to write DeFi protocols, running for a week without any performance issues, which really exceeded my expectations.

Of course, I'm not saying this thing is perfect.

In the past few days, while testing with my roommates, I also ran into a small pit: the third-party libraries it currently supports are still limited. Some of the TS toolkits we commonly used before can't be utilized, and we have to modify the code for compatibility.

It's quite annoying, but acceptable.

There are also some obscure ZK-related error messages that are still not straightforward enough, requiring me to sift through the official documentation for a long time.

Several friends involved in large protocols mentioned in the group that, after all, it's a new language, and the ecosystem is not yet established. Large teams may still need to wait and see, but for us small developers, it's already sufficient.

Ultimately, whether an ecosystem of a public chain can thrive has never depended on how impressive its technology is or how profound its underlying cryptography is.

It depends on whether it can allow more ordinary developers to come in and whether it can lower the barriers to entry to a sufficient level.

Previous privacy public chains were all about increasing technical complexity and cryptographic depth, raising the threshold higher and higher, so that in the end, only a few experts could play, naturally turning the ecosystem into a desert.

What Midnight is doing is not making ZK technology more complex but simplifying it.

So simple that any developer who can write TS can create privacy applications. This is the real core that can break the privacy track's boundaries.



Now I've already pulled the two roommates from back then to use Compact on the Midnight test net to rewrite that anonymous voting tool for the frisbee club.

The core logic that took us two months to resolve back then was completed in just two days this time, tested through dozens of rounds, and both the anonymity and proof speed are fine.

It's just that one of my roommates slacks off every day, and all the code is written by me and another person.

When it goes live, he must treat us to barbecue.

It must include oysters.

Yesterday, the captain of the frisbee team asked me when that voting tool would be available. I told him that as soon as the Midnight mainnet goes live, it can be used that day.

He said if it really works, the team would treat us all to milk tea.

This time, I finally won't be teased by him anymore, saying that what we're doing with blockchain is not as good as using Tencent Docs.$NIGHT

NIGHT
NIGHTUSDT
0.04885
-4.59%