# Powering Verifiable Computation for the Nostr Revolution
*"Cryptography shifts the balance of power from those with a monopoly on violence to those who comprehend mathematics and security design." - Jacob Appelbaum*
As someone who deeply believes in cypherpunk ethos and advocating for digital freedom, I've been captivated by the potential of [Nostr](https://github.com/nostr-protocol/nostr) to *reshape our online interactions*.
Nostr is the **Freedom of Speech Protocol**, but it's also much more! It's a way to completely *rebuild the internet*, from the ground up.
The emergence of [Data Vending Machines (DVMs)](https://nips.nostr.com/90) within the Nostr ecosystem is exciting. Today, I want to share my thoughts on why DVMs are game-changing, and introduce you to [Askeladd](https://github.com/AbdelStark/askeladd) - a project idea aiming to bring verifiable computation to this new paradigm.
## Data Vending Machines: A Free Market for Computation
![dvm-meme-001](https://hackmd.io/_uploads/HJBqFkFKC.jpg)
Imagine a world where any service you need - from language translation to complex data analysis - is just a message away. No accounts, no gatekeepers, just pure functionality at your fingertips. That's the promise of Nostr DVMs.
These "vending machines" are essentially automated service providers on the Nostr network. You broadcast a request, attach a small payment (using [NIP-57](https://nips.nostr.com/57)) in Bitcoin (via the Lightning Network), and available DVMs compete to fulfill your job. It's like having the entire world's computational power accessible through a simple messaging protocol.
What makes DVMs truly revolutionary:
1. **Censorship-Resistant**: There's no central authority to shut down or censor. As long as Nostr relays exist, DVMs can operate.
2. **Permissionless**: Anyone can create a DVM offering any service. The barrier to entry for providing computational services globally has never been lower.
3. **Built-in Payments**: The integration with Lightning Network means micropayments are seamless. Pay for exactly what you use, with minimal friction.
4. **Global Competition**: DVMs worldwide compete on speed, cost, and quality. This race to the top benefits everyone.
The implications are profound. Niche services that were never economically viable can now thrive. Innovation can happen at breakneck speed as new DVMs can be deployed instantly to a global market.
## Don't Trust, Verify: The Need for Provable Computation
As exciting as this DVM ecosystem is, it introduces a critical question: How do we know the computation was performed correctly?
When you're dealing with potentially sensitive data or relying on results for important decisions, blind trust isn't enough. This is where the magic of zero-knowledge proofs, specifically STARKs (Scalable Transparent ARguments of Knowledge), comes into play.
Imagine if every computation came with a mathematical proof of its correctness - a proof that you could verify quickly without having to redo the entire calculation. That's the power of STARKs. It's like having a foolproof "show your work" attached to every result, but one that doesn't reveal any private information about the inputs or the specifics of the computation.
This is what it takes to build the next iteration of the internet; the Integrity Web.
## Bridging DVMs and Verifiable Computation
![download](https://hackmd.io/_uploads/BJ7VFlFFA.jpg)
This is where the idea of Askeladd comes in. Askeladd aims to build the infrastructure layer that brings trustless, verifiable computation to the world of Nostr DVMs.
Here's how it works:
1. **DVM Logic in [Cairo](https://www.cairo-lang.org/)**: DVMs built with Askeladd implement their core logic using the Cairo programming language. Cairo is designed from the ground up to make computations easily provable, without requiring deep cryptographic knowledge from the developer.
2. **STARK Proof Generation**: When a DVM processes a request, Askeladd uses the cutting-edge [STWO prover](https://github.com/starkware-libs/stwo) to generate a STARK proof (a [Circle STARK](https://eprint.iacr.org/2024/278) to be exact 🤓) of the computation's correctness. STWO is blazingly fast, making proof generation practical even for complex tasks.
3. **Proof Distribution via Nostr**: The generated proof is then broadcast back through the Nostr network, alongside the computation result.
4. **Client-Side Verification**: Users can quickly verify the proof, gaining mathematical certainty that their job was processed correctly.
The beauty of this system is its seamless integration with the existing DVM workflow. Users don't need to understand the intricacies of zero-knowledge proofs; they just get an extra layer of trust "for free."
## Why This Matters
1. **Enabling Critical Applications**: With verifiable computation, DVMs can be trusted for high-stakes tasks like financial calculations, voting systems, or sensitive data processing.
2. **Fostering Trust in a Trustless System**: Paradoxically, by removing the need for blind trust, we can build a more trusting ecosystem. Users can confidently use services from unknown providers.
3. **Pushing the Boundaries of Decentralization**: We're moving beyond simple data storage and transfer, into a world where complex, provable computation can be decentralized.
4. **A Cypherpunk Dream Realized**: This combination of censorship-resistant services, micropayments, and cryptographic proofs embodies so many of the ideals we've been striving towards for decades.
## The Road Ahead
This idea is still in its early stages, but the potential is enormous. The goal was to build a proof of concept, showing that we could build a future where verifiable computation becomes the norm rather than the exception.
Imagine a world where you can tap into a global network of computational power, pay only for what you use, and have mathematical certainty that every result is correct. That's the world verifiable computation is helping to build.
For those of us who believe in the power of cryptography to reshape society, ideas like this are a beacon of hope. They show that our dreams of censorship-resistant, privacy-preserving, and mathematically verifiable systems aren't just pipe dreams – they're becoming reality.
If you're as excited about this vision as I am, I encourage you to dive deeper. Check out the Askeladd project idea, experiment with Nostr DVMs, and join the conversation about how we can build a more open, verifiable, and empowering digital future.
The revolution isn't just coming. It's here, it's provable, and it's unstoppable.
My Nostr public key: `npub1hr6v96g0phtxwys4x0tm3khawuuykz6s28uzwtj5j0zc7lunu99snw2e29`
![Screenshot 2024-08-01 at 13.53.45](https://hackmd.io/_uploads/SkAvwlYYC.png)
![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/dimahledba)
## Resources
- [Askeladd Github Repository](https://github.com/AbdelStark/askeladd)
- [Askeladd Live Demo](https://askeladd.org)
- [NIP-90 - Data Vending Machine](https://nips.nostr.com/90)