Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 0_about_aligned.md #658

Merged
merged 10 commits into from
Jul 23, 2024
7 changes: 4 additions & 3 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@

* [About Aligned](introduction/0_about_aligned.md)
* [Getting started](introduction/1_getting_started.md)
* [Key Terms](introduction/2_key_terms.md)
* [Example - ZKquiz](introduction/2_zkquiz.md)
* [Use cases](introduction/3_use_cases.md)
* [FAQ](introduction/4_faq.md)

## Architecture

* [Supported Verifiers](architecture/0_supported_verifiers.md)
* [Aggregation mode](architecture/2_aggregation_mode.md)
* [Key Terms](architecture/0b_key_terms.md)
* [Fast mode](architecture/1_fast_mode.md)
* [Batcher](./architecture/components/1_batcher.md)
* [Payment Service Contract](./architecture/components/2_payment_service_contract.md)
* [Service Manager Contract](./architecture/components/3_service_manager_contract.md)
* [Operator](./architecture/components/4_operator.md)
* [Aggregator](./architecture/components/5_aggregator.md)
* [Explorer](./architecture/components/6_explorer.md)
* [Aggregation mode](architecture/2_aggregation_mode.md)

## Guides

* [Submitting proofs](guides/0_submitting_proofs.md)
* [SDK](guides/1_SDK.md)
* [Integrating Aligned into your Application](guides/2_integrating_aligned_into_your_application.md)
* [SDK](guides/1_SDK.md)
* [Generating proofs for Aligned](guides/3_generating_proofs.md)
* [Contract Addresses](guides/4_contract_addresses.md)
* [Generating & submitting proofs of Rust code with ZKRust](guides/0_5_using_zkrust.md)
Expand Down
File renamed without changes.
28 changes: 28 additions & 0 deletions docs/introduction/0_about_aligned.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ Aligned is a decentralized network that verifies zero-knowledge/validity proofs

Our mission is to accelerate Ethereum's roadmap and the adoption of verifiable computation by enabling fast and economical verification of ZK and validity proofs.

## What real value does Aligned bring to the table?

Blockchains are verifiable computers. We live in a chaotic world where there will be a huge demand for computation that does not need to be trusted. Current blockchain models are inefficient: each node must re-execute each transaction/operation, making the weakest devices the bottleneck. Besides, adding more hardware does not make the system faster (contrary to what happens in Web2), just more reliable. Alternative L1s to Ethereum make trade-offs, accepting bigger hardware or changing the consensus to be faster but with fewer guarantees. In other words, we reduce costs at the expense of lower security guarantees. Zero-knowledge/validity proofs (ZK) provide a new framework where we do not have to make such compromises. The basic premise is that a party can generate a very short proof of a computation, and the nodes can quickly verify that proof instead of re-executing the computation. The computation can be quite large, comprising many different transactions. This enables the delegation of execution off-chain with the same guarantees, leading to increased throughput and lower operational costs. This led to the rollup-centric roadmap of Ethereum, featuring multiple L2s, but at the expense of fragmented liquidity and complex user experience. Many of these problems could be solved by ZK bridges, but they remain expensive, and the go-to-market time is high.

Still, nodes have to verify those proofs, which can be quite expensive since this is done on-chain: current proof systems can cost between 10 and several hundred dollars (which is strongly dependent on network congestion).

In addition, ZK lets us build other verifiable applications where users do not have to trust the party performing the computation, with impact in areas such as artificial intelligence (AI), the Internet of Things (IoT), and fighting misinformation. This is not clear to most people since proving technologies were not mature enough and verification costs were high.

## What limits the development of more complex applications on top of blockchains?

The main limitation for building complex applications on top of blockchains has been that the computation can run only a few milliseconds on chain and even then this can be very expensive. You can't have millions of daily active users using Ethereum or any blockchain at the same time.

ZK solves this but due to slow and complex-to-use proving, and expensive verification, progress has been limited. In the case of proving, before the development of general-purpose zero-knowledge virtual machines (zkvms), users had to express their computation as arithmetic circuits, making the developer experience something like coding in assembler, error-prone, and complex. Moreover, proof systems depended on trusted setups, adding additional trust guarantees, the need to carry out special ceremonies to initialize parameters, and delaying go-to-market times. Besides, having high verification costs (on the order of 10's to 100's of dollars per proof) meant that only those projects with a lot of capital could afford to build such applications.

## Why didn't anybody do it before?

To build Aligned, we needed several pieces in place. First, we needed EigenLayer, which allows building services and applications on top of Ethereum without competing for blockspace. In our case, we could bootstrap the economic security for a decentralized network of verifiers, avoiding the limitations of running proof verification on-chain. Second, proving technology had to improve. We currently have general-purpose zkvms (which means we can code in Rust and other high-level languages and prove it), proof systems are faster, and several improvements and developments are on the way. This makes writing applications easier (providing a higher demand for proof verification), and enables faster and simpler proof recursion (for proof compression).

## How much can Aligned reduce costs?

Aligned operates using two operation modes: fast and aggregation. The cost reduction depends on throughput, proof system, and mode used. For the least expensive systems, such as Groth16, this can amount to nearly 90%, while STARKs can be nearly 99%. Moreover, Aligned allows the verification of proofs that cannot be currently verified in Ethereum due to cost or size, such as Kimchi or Binius. The verification cost in Aligned is independent of the proof system, giving the choice of the proof system back to developers.

## How does Aligned compare to other solutions?

Aligned has created a new category in crypto: ZK verification layer. It is the only solution for now offering fast and aggregation modes while being linked to Ethereum via EigenLayer. The fast mode provides very high throughput (over two orders of magnitude more than Ethereum), low latency, and lower costs than the aggregation mode. The security is provided by restaking, and this mode is well suited for applications with tight limits on latency and costs. The aggregation mode works using the slower proof recursion strategy, also used in rollups to compress proofs. Another key feature is that Aligned is stateless, simplifying the process greatly.

Other solutions focus on building a separate L1 for proof verification (which sets them apart from Ethereum and requires bootstrapping the economic security, which can be lower and subject to volatility, as opposed to that provided by restaking) or focus on the aggregation of proofs from a few proof systems. This last approach adds latency, higher operational costs, and constrains the developer's choice of the proof system.

## Why are we building Aligned?

In recent months, we have witnessed the development and enhancement of general proving virtual machines such as Risc0, Valida, Jolt, and SP1. These innovations allow users to write ordinary code in languages like Rust or C and generate proofs demonstrating the integrity of computations. This evolution is poised to transform application development, provided we have verification networks with high throughput and low cost. This is the core vision of Aligned and the reason we are building it: the future belongs to provable applications.
Expand Down
42 changes: 42 additions & 0 deletions docs/introduction/2_zkquiz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# ZK Quiz

## Requirements

1. [Rust](https://www.rust-lang.org/tools/install)
2. [Foundry](https://getfoundry.sh)

## Usage

### 1 - Create Keystore

You can use cast to create a local keystore.
If you already have one you can skip this step.

```bash
cast wallet new-mnemonic
```

Then you can import your created keystore using:

```bash
cast wallet import --interactive <path_to_keystore.json>
```

Then you need to obtain some funds to pay for gas and proof verification.
You can do this by using this [faucet](https://cloud.google.com/application/web3/faucet/ethereum/holesky)

### 2 - Answer Quiz

To answer quiz questions run:

```bash
make answer_quiz KEYSTORE_PATH=<path_to_keystore.json>
```

This will:

1. Ask quiz questions
2. Generate ZK proof
3. Pay & submit proof to aligned for verification
4. Wait for proof to be verified in aligned
5. Claim NFT if proof is verified
8 changes: 4 additions & 4 deletions docs/introduction/3_use_cases.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Use cases

- Soft finality for Rollups and Appchains.
- Fast bridging.
- Soft finality for Rollups and Appchains: Aligned provides fast verification of ZK proofs, which can be used to provide soft finality for rollups or other applications.
- Fast bridging: building ZK bridges require checking a succinct proof to show that current state of a chain is correct and then users need to show that their account state is correct. Many ZK protocols use hash functions such as Poseidon or Rescue Prime, which do not have precompiles on Ethereum, making both the verification of the chain's state and account expensive. With Aligned, you can show your account state using another ZK proof, and all proofs can be verified cheaply and with low latency in Aligned.
glpecile marked this conversation as resolved.
Show resolved Hide resolved
- New settlement layers (use Aligned + EigenDA) for Rollups and Intent based systems.
- P2P protocols based on SNARKs such as payment systems and social networks.
- Alternative L1s interoperable with Ethereum.
- Verifiable Machine Learning.
- Alternative L1s interoperable with Ethereum: similar to fast bridging.
- Verifiable Machine Learning (ML): with general-purpose zkvms we can prove code written in Rust, solving part of the problem of using ML. However, most zkvms use STARK-based proof systems, which leads to high on-chain costs or expensive wrapping. With Aligned, you can directly verify your proof from the zkvm for much less than Ethereum.
glpecile marked this conversation as resolved.
Show resolved Hide resolved
- Cheap verification and interoperability for Identity Protocols.
- ZK Oracles.
- New credential protocols such as zkTLS based systems.
Expand Down