# Electron vs Nebra Comparison

August 8, 2024

Utsav Jain

This blog compares the Electron and Nebra zk aggregation protocols in various aspects.

#### Gas Costs

Gas costs for aggregation protocols has two major components, Aggregation Cost and Verification Access Cost. Aggregation Cost is the cost to get your proof aggregated as part of the aggregated batch proof and Verification Access Cost is the cost to verify whether a zk proof corresponding to a set of public inputs were verified as part of the aggregated proof.

Electron's UPA (User Proof Aggregation) verification access is categorized into two types:

**Latest Verification Access**: This applies when a user needs to verify the most recently submitted proof. It's optimized for quick access to the latest aggregated data.**Historical Verification Access**: This is used when a user needs to verify any previously submitted proof, excluding the most recent one. It allows access to older aggregated proofs in the system's history.

Heres a quick summary on costs for both protocols:

Aggregation Cost per Proof

Verification Access Cost per Proof

Electron

(354,241)/N+6200

**Latest**

7,300

**Old**

21,500

Nebra

(350,000)/N+7000

**Latest**

25,000

**Old**

25,000

#### Supported Proving Schemes

These are the specific types of zero-knowledge proofs that users can submit to the system for aggregation. The aggregation layer is designed to understand, verify, and bundle proofs generated using these supported schemes.

SnarkJS Groth16

Gnark Groth16

Halo2-KZG

Electron

✅

✅

✅

Nebra

✅

✅

❌

#### Submission Interval

The Submission Interval represents the maximum time span from the moment an individual proof is submitted to the aggregation layer until it is verified on Ethereum and becomes ready for Verification Access. This interval encompasses the entire processing cycle for a proof, from its initial submission to its final verification and availability.

Submission interval

Electron

**~30 mins**

Nebra

~60 mins

#### Batch Size

Batch Size refers to the number of individual proofs that are combined into a single, aggregated proof during one processing cycle. It also directly influences the gas cost per proof, as larger batches generally reduce the per-proof cost.

Increasing the batch size often results in longer latency due to two main factors:

**Proof Generation Time:**Larger batches require more computational resources to generate the aggregated proof, which increases processing time.**Proof Collection Period:**The system must wait for a sufficient number of individual proofs to arrive before initiating the aggregation process. Larger batch sizes mean longer waiting periods to accumulate the required number of proofs.

*As of now Electron UPA batch size is kept small to keep the Proof Collection Period low, due to low volume of proofs submitted. Given enough volume Electron UPA can easily scale up to 50 proof batch size maintaining the same latency.*

Below are the current batch size for live versions of both protocols:

Submission interval

Electron

**20**

Nebra

30