Aztec Network
Apr 26th, 2021
## min read

Layer Cake: A guide to Layer 2s

Navigate the complexities of layer 2 solutions with Aztec's comprehensive guide, demystifying blockchain technology layers.

Share
Written by
Zac Williamson
Edited by

Hello!

I’m Zac, the CEO of Aztec. We’re the inventors of the Plonk universal ZK-SNARK and zk.money, the world’s first private rollup and one of the new layer 2 protocols that have recently been deployed to Ethereum.

The layer 2 landscape is becoming a truly fascinating place to explore as multiple teams have been converting vision into reality and deploying their tech to the Ethereum mainnet.

It’s also a bit of a minefield to navigate if you’re not plugged into the ecosystem and can work your way through the jargon.

Unfortunately, most people in a position to explain layer 2s have skin in the game and have some biases towards certain technologies (i.e. the ones their protocol uses!).

So what makes me different? Absolutely nothing! But at least I’ll tell you that upfront instead of pretending to be impartial, eh?

Still, I’ll do my best to give you a balanced overview. The world of blockchain-based cryptography/scaling is a small one and the teams that are pushing the boundaries all deserve respect for what they do. So I guess we should get into it!

What is a layer 2 and why are they important?

The transaction throughput of Eth 1.0 is limited which has led to extremely high transaction costs.The main cost of Eth transactions come from:

  • Cost of storage changes
  • Cost of transaction data
  • Cost of computation

Layer 2s delegate one or more of the above to a secondary network running on top of Ethereum.There are traditionally two categories of layer 2’s each with its own security requirements and trade-offs: optimistic rollups and zk rollups. Aztec is defining the third category, private rollups.

Optimistic Rollups

An optimistic rollup acts much like a miniature version of the Ethereum blockchain. It acts as its own network that hosts smart contracts and transactions.

Periodically, the optimistic rollup will broadcast transaction blocks to a layer 1 smart contract. The ‘blocks’ contains the complete transaction data of every transaction in the block, but nothing else. The layer 1 smart contract does not perform any computation or make any storage updates. This massively reduces the cost of publishing a block.

These rollups are ‘optimistic’ because they assume that every transaction is correct by default — they are not checked directly by a layer 1 smart contract.

Instead, if a user thinks a transaction is incorrect (e.g. double-spending), they can post a “fraud-proof”. The layer 1 smart contract can use the rollup’s published block data to validate the correctness of the alleged fraudulent transaction.

This is very expensive but only has to be done when bad behavior is suspected.

If bad behavior is discovered, the entity that published the optimistic rollup block (typically called a validator) loses some cryptocurrency they have staked.

Optimistic rollups rely on this economic consensus to ensure transactions are correct.

Withdrawal times from optimistic rollups are typically long (e.g. 1 week). This is because once a transaction has been published, one must wait to see if anybody alleges bad behavior and posts one of these fraud proofs (this is a bit like the awkward silence part in a wedding when the priest says “if anybody objects…”)

Waiting for fraud proofs drastically slows withdrawal times

The main cost of transactions on an optimistic rollup comes from the cost of publishing transaction data on-chain. This data availability problem is shared by all rollups, optimistic or otherwise. In order to prevent funds from being frozen, users need access to all of the rollup’s transaction data. Either it gets published onto layer 1, or extra trust assumptions are required (e.g. trust that some sidechain will make this data available).

At the time of writing, if the rollup does not publish its transaction data on-chain this implies that you are relying on a centralized service to not freeze your funds.

Pros:

  • Feature-rich. Can copy Eth 1.0 architecture and support smart contract
  • Easier to build and deploy vs zk-rollups

Cons:

  • Slow exit times. Need to wait ~1 week between tx execution and tx considered ‘safe’ due to the lack of a fraud-proof
  • Slow exit times can be mitigated with underwriters (entities that allow instant withdrawals by taking a small fee in lieu of risk…)

ZK Rollups

Computation and storage handled by a secondary network.

L2 broadcasts transaction data to mainnet along with a proof of correctness. A mathematical proof that the transactions are correct. i.e. the L2 transactions are rolled up into a single mega-transaction that is broadcast to a L1 smart contract.

The ‘zk’ in zk rollups stands for ‘zero knowledge’. However, zk rollups are not private — all transactions are public by default like optimistic rollups. The ‘zk’ comes from the fact that the proof of correctness is typically produced by a zero-knowledge proving system (e.g. a ZK-SNARK or a ZK-STARK).

The upside to this is that the cost of storage updates and computation is removed from Ethereum. There is no need to optimistically assume the transactions are correct, if the proof is valid you can know that the transactions are correct.

This means that withdrawal times are much faster vs optimistic rollups and fewer trust assumptions are required.

The white elephant in the room is that zero-knowledge proofs add a massive computational overhead to a transaction.

Creating a zero-knowledge proof of a computation is approximately 1,000,000 times slower than running the computation directly! This is a rough estimation that will vary depending on the computation in question, but is accurate for the types of computations found in Solidity smart contracts.

ZK rollups handle this by delegating proof construction to third parties with a lot of computing resources, “rollup providers”. Users will be dependent on these third-party services to create transactions for them. Rollup providers can censor or front-run transactions, much like Ethereum miners. The more computing power required, the fewer rollup providers are likely to be available, so the censorship problem must be adequately handled by the protocol architecture.

This computation overhead presents problems when it comes to porting smart contracts to the L2. Full EVM compatibility is the goal, but this 1,000,000 factor slowdown must be handled. The EVM is extremely SNARK-unfriendly because of its 256-bit word size and native support for SHA3 and other SNARK-unfriendly hashing algorithms. Even delegating proof computation to a third party with significant computation resources is likely insufficient. One possible solution is etching zkSNARK prover algorithms directly into silicon via FPGAs or ASICs. Rollup providers will require this hardware to construct proofs.

ZK proof construction is much slower than running a normal program. Our Plonk and Plookup research has sped up SNARKs by over an order of magnitude, but ZK-rollups still have performance problems compared to optimistic rollups.

Typically, SNARK and STARK programming languages have to accommodate the inefficiencies of the underlying proving system. Typically these languages have difficulties implementing variable-length loops and dynamic memory access (think dynamic arrays and vectors). Our latest Plookup research mitigates some of these problems, but not all of them.

This means that the zk rollup may require developers to port their contracts into a custom language (e.g. Starkware’s Cairo).

For zk rollups that do not aim for full EVM compatibility, one upside is cheaper transactions. Without needing to conform to EVM semantics, it is possible to reduce the amount of data broadcast per basic transaction. The Hermes network is an example of such a rollup.

Pros:

  • Possibly cheaper transactions than optimistic rollups
  • No need for fraud proofs, very fast withdrawal times

Cons:

  • Slower feature velocity than optimistic rollups
  • Dependent on third-party proof constructors with custom hardware
  • May require custom programming languages with limited features

Private Rollups

Aztec launched its private rollup on mainnet in March 2021. You can wrap your Eth in a privacy shield and make private transactions using our online privacy wallet zk.money.

Private rollups use similar tech to zk rollups but are a very different beast. The private rollup is architected to provide strong privacy guarantees to every user of the L2. Users hold their funds anonymously. When performing transactions, the sender and recipient are anonymous and the value being transferred is encrypted.

We use a state-of-the-art zero-knowledge proving system, Plonk, to do this. We invented Plonk in 2019 and it is rapidly becoming an industry-standard amongst teams using zero-knowledge proofs and building on blockchains.

Enabling privacy by design requires a radically different rollup architecture to a zk-rollup. We went with a privacy-first approach because we know that it is very difficult to retrofit programmable privacy onto a public L2 without damaging the user experience or requiring a drastic protocol re-architecture.

Current Ethereum-based privacy solutions are mixers. They can be used to anonymize a user’s holdings but little else. Our full vision for a private layer 2 encompasses much more:

  • Fully programmable private smart contracts. Private currencies can have advanced transaction logic
  • Private ownership of NFTs
  • NFTs with properties that are hidden to all but the owner
  • Anti-money-laundering and know-your-client checks can be programmed directly into private tokens/dApps (e.g. KYC tokens — you can trade with trusted counterparties without knowing their identity)
  • Private DeFi! This is a huge topic that deserves its own article (coming soon…)

This is only possible by architecting the protocol to put privacy first. The transaction and state models for the protocol must be designed to be compatible with privacy.

Pros

  • Transactions are private. User’s financial activity cannot be analyzed by third parties
  • Rollup providers cannot censor or front-run individual transactions. For the rollup provider, every tx looks like a list of random numbers
  • No need for fraud proofs, very fast withdrawal times
  • Users can unilaterally withdraw without assistance from a third party to perform computation

Cons

  • More expensive than public L2s (but cheaper than main-net), until data availability solutions/Eth 2.0 come online
  • Users must construct private transaction zk proofs locally. No delegating to a 3rd party. The zk-proving system must be lightning fast to achieve this
  • Slower feature velocity than a zk rollup or optimistic rollup due to client-side proof construction. Programmability can be achieved, but full EVM compatibility is a while off
  • The state model is different. The value must be represented in bitcoin-style UTXO ‘notes’ and not via Ethereum’s account model. This can be abstracted away at the application layer.

Sorting the signal from the noise

The L2 landscape is competitive and there is an enormous pressure to launch and gain users before one's competitors.

This can lead to corners being cut and additional trust assumptions being added, that are obscured from users.The biggest issue right now is that of data availability.

If the L2 does not publish its transaction data on-chain, the L2 controllers can freeze user’s funds.

Every team working on L2s is striving to push the boundaries of what is possible with today’s technology. While admirable, this makes it easy to hide protocol flaws in technical jargon.

If you’re thinking about using a layer 2, they should be able to adequately address the following questions:

  • How is the L2 approaching data availability? If their tx cost is <20x of a regular Eth transfer they might not be broadcasting everything on-chain
  • Can a user unilaterally withdraw from the L2 using only the information published on Ethereum?
  • Is there a public technical description of the protocol that third parties can validate?

In addition, for zk rollups and private rollups one should ask the following:

  • Is the on-chain data provably correct? Is all of it being fed into the rollup circuit as public inputs?
  • Is the L2 dependent on centralized compute clusters to create rollups? If so, what is their plan to prevent censorship and front-running? When fully decentralized, how many rollup providers will there likely be?
  • Are the proof construction algorithms publicly viewable and auditable?

The shape of what’s to come

The next 12 months are going to be a profoundly exciting time in the Layer 2 space. The myriad of protocols hitting mainnet is the culmination of years of deep R&D and engineering work from across the industry.

For Aztec’s private rollup, our focus is on pulling programmable private smart contracts into the world. Our flagship Plonk programming language, Noir, is designed to compile high-level programs into heavily optimized ZKSNARK circuits, ones that are fast enough for proof construction to happen in the browser. This tech will be the keystone to our Aztec 3.0 rollup architecture, which will support user-defined circuits created with Noir.

By combining programmable privacy with scaling, we’re adding the last missing link required for truly mainstream adoption of web3 technology. At last, web3 will be able to compete on a level playing field against traditional web2 tech, with strong privacy guarantees as standard. We want to foster a rich ecosystem of private cryptocurrencies and NFTs that interact in a privacy-preserving manner both with DeFi protocols and more traditional financial services.

We’ve demonstrated with zk.money that this is not some wild future tech. We’ve already developed the key technologies required to build this ambitious project, now we’re going to knuckle down and execute on our vision.

Read more
Community
Community
4 Aug
xx min read

Dark Forest Aztec Game Goes Live

Dark Forest is a real-time strategy game played across a procedurally generated universe where most of the map is hidden. You cannot see rival players, their planets, or their fleets. You only know what you have explored. Everyone shares one universe, and nobody has the full picture.

In most onchain games, every position and every move is public, because the chain is public. Dark Forest used zero-knowledge proofs to break that assumption: players prove their moves are valid without revealing where those moves came from. The result is a game of hidden information running on a public network.

Dark Forest Aztec ports the original Dark Forest 0.6 to Aztec. It keeps the gameplay from the original and rebuilds the privacy layer on Aztec's programmable privacy.

A note before diving in: this is early, experimental software on Aztec Alpha V5. Treat it as an alpha and play accordingly.

The universe you cannot see

You start on a single home planet with almost the entire map dark. To find anything you mine the universe, running a client that explores coordinates and reveals what sits there: unclaimed planets, resources, and eventually the edges of other players' territory.

You are never handed a view of the board. You earn it one region at a time, and everyone else works under the same fog.

What is hidden on Aztec

Your home coordinates and your fleet movements are private state, expressed as first-class private notes on Aztec. Your location and where you send energy stay hidden, enforced in the contracts by zero-knowledge cryptography.

What sits onchain is a set of cryptographic commitments. Instead of storing every planet's full details in the open, the contracts store Poseidon2 hashes of entity state. When you make a move, your client supplies the full state, the contract checks it against the stored hash, applies the change under zero-knowledge constraints, and writes a new hash back. Full game state lives offchain and gets rebuilt from public logs by an indexer, which is what renders your map without exposing every player's position.

So you can prove you made a legal move from a planet you own without revealing where that planet is. Aztec applies the same principle to private payments and private contracts.

How you play

Four actions carry the game.

Explore. Your explorer sits in the bottom left. Set it running and it uncovers the map around you, surfacing planets, resources, and other players.

Send energy. Most planets produce energy. Click and drag from a planet you own toward a target to capture or weaken it.

Route silver. Asteroid fields produce silver. Move it to your planets and spend it on upgrades, or send it to a Spacetime Rip to convert it into score.

Hunt artifacts. Some planets hold artifacts. Your Gear ship discovers them. Once harvested, you deposit them on planets to boost stats.

Four stats drive most decisions.

Energy is the core resource. Planets generate it over time up to a capacity, and you spend it on everything: claiming planets, reinforcing your own, attacking rivals. Two details matter. Moves are taxed, so a flat percentage of a planet's total capacity burns every time you send energy, which discourages small frequent moves. And energy decays over distance, so send it too far and almost nothing arrives. A common rule of thumb is to let a planet fill to about 75%, then send it down to about 25%.

Defense reduces the damage incoming energy does when it lands. Higher-level planets often have lower defense, but they hold much more energy, so they still take more to capture. Defense matters most on front lines.

Range sets how far a planet can send energy. It governs how fast you expand and how efficiently you move energy inside your own empire, since shorter relative distances mean less decay. Good range also lets you strike deep into an opponent's territory.

Speed sets how quickly a move arrives. Usually secondary, though a fast strike can land before a rival reacts, and some playstyles reward capturing many nearby planets quickly.

Planets can also be upgraded with silver and enhanced with artifacts. Space types carry different multipliers, from mild Nebula to punishing Dead Space, so where a planet sits changes how it plays.

How scoring works

There is a scoreboard, and territory alone does not win it. This round scores two activities: discovering artifacts with your Gear ship, and withdrawing silver through Spacetime Rips.

Point values from the in-game help page:

  • Each unit of silver withdrawn: 1
  • Common artifact: 2,000
  • Rare: 10,000
  • Epic: 200,000
  • Legendary: 3,000,000
  • Mythic: 20,000,000

Silver accrues one point at a time. A single Mythic artifact is worth twenty million of them, so artifact hunting decides rounds and silver withdrawal sets your floor.

Silver has two competing uses. Spend it on upgrades and your planets get stronger, extending range and hardening defense. Withdraw it through a Spacetime Rip and it becomes scored points, but it is gone. Every unit is a choice between building the empire and banking points.

Upgrades tend to win early, since a stronger empire reaches more asteroid fields and finds more artifacts. Late in a round that calculation flips, because a planet you never use is worth less than points already scored.

Artifacts do both jobs at once. They score on discovery, and once deposited they boost a planet's stats, which makes the next expedition easier.

Why you explore

Nothing happens until you find something to act on. Your explorer turns dark space into planets you can capture, asteroid fields you can mine, and artifact-bearing planets you can raid. Sitting still means no new energy, no silver, no score.

Exploring also buys information. The map you have uncovered is an advantage nobody else holds. Knowing where high-level planets sit, which asteroid fields are unclaimed, and where space types shift lets you plan further ahead than someone still working through their starting region.

You find other players as a byproduct. There is no player list. You explore outward until your revealed region touches territory someone already owns: a planet in another player's colors, sitting where you were about to expand. Their home coordinates stay private, so you learn something narrow. Someone is here, roughly this direction, holding this much. You infer the rest, and you have no way of knowing whether they found you first.

What happens when you run into someone

You have three broad options.

Stay quiet and keep growing. Nothing forces you to engage. Keep exploring elsewhere, keep routing silver, keep upgrading. Your positions stay private, so silence costs you only time, which is what you want if they are stronger. The risk is that they are doing the same thing faster.

Fortify the border. If the contact sits somewhere you cannot lose, spend energy hardening the planets facing them. Defense is worth most where an attack will actually land. This keeps the option to fight without committing to one.

Attack. Send enough energy to overwhelm the target's defense and the planet becomes yours, along with its production and its position as a staging post. Higher-level planets are the prize and take proportionally more to crack.

Attacking costs more than energy. A move that lands tells your rival where you strike from, and that you are close enough to be worth answering. Retaliation can then come from directions you have not explored, launched from planets you cannot see.

Multiplayer in practice

Everyone plays one shared universe in real time. No turns, no lobbies. Energy regenerates whether you are watching or not, moves stay in flight while you sleep, and rivals expand while you are away from the screen.

Most strategy games let you watch a threat approach. Here you tend to see the consequences: a planet you owned this morning in someone else's colors, an incoming move you notice once it is already close.

That produces a particular kind of paranoia. You are trying to find everyone else while avoiding being found, and every expansion is a strategic bet that the space ahead is empty.

Information becomes tradeable, because it is scarce. Players compare notes, warn each other about aggressive neighbors, and agree who expands where, then break those agreements when the scoreboard makes it worth breaking.

Why it matters beyond the game

A fully onchain game where players cannot see each other's positions is hard to build, and building it well says something about the platform underneath.

Hidden state, private notes, and client-side proving are the same building blocks behind private applications across Aztec. Dark Forest is a way to watch them work.

Getting started

Dark Forest Aztec is playable now as an alpha. Expect a learning curve; the original was famous for it. DFArchon maintains onboarding material and a community for new players. Round One is live. The universe is dark, and everyone else is out there somewhere. Go find them, quietly.

Play Now

Follow the Builders

DFArchon on X

Source and docs

Aztec Network
Aztec Network
22 Jul
xx min read

How Gas Works on Aztec

Gas on Aztec

Gas on Aztec is known as Fee Juice and is used to pay for transaction costs. This is the same as $ETH on Ethereum. Some apps will handle transaction costs for you under the hood, but if you are using a browser extension wallet, you will not be able to send transactions without it. Fee Juice can be obtained by bridging the $AZTEC token on Ethereum to the Aztec Network L2. This means that under the hood, all activity that happens on Aztec is underpinned by the $AZTEC token bridged into the network. Some bridges like Shield (by human.tech) handle this for you, allowing you to allocate a portion of your bridged transaction to convert into Fee Juice and land in your wallet automatically.

Public vs Private Assets

Assets and transactions on the Aztec Network can be either public or private. If you bridge publicly, your tokens will arrive as public, traceable tokens visible to all. Privately bridging, on the other hand, will give you private assets that are visible only to you. These assets can then be sent privately to another user or wallet without ever revealing who you are, what tokens were sent, how many, or who the recipient is.

Public vs Private Gas

Like tokens on the Aztec Network, Fee Juice (gas) can also be public or private. The reason for this is that even if what you are sending is private, the gas you spend to execute that transaction could still be visible if you are using public Fee Juice, potentially revealing transaction patterns and activity. Private Fee Juice keeps your entire transaction footprint hidden. When you send a private transaction, you can use private Fee Juice, and when you send a public transaction, you can use public Fee Juice, which means your transaction costs are always aligned with the type of transaction you're making.

Fee Juice in Apps

Aztec has native fee abstraction, which means apps could let you pay for transactions in any token you want, or cover your fees entirely. Apps like Nyx may choose to cover part or all of a user's transaction costs, or allow you to pay in tokens that are convenient for you. This means you will most likely never see Fee Juice in an app; instead, you'll pay in whatever makes sense for what you're doing, on your terms. Similarly, you might never even see an Aztec wallet at all, because the app itself becomes your interface that you connect to using your MetaMask wallet.

Fee Juice in Browser Wallets

If you're using a browser extension like Azguard, you'll manage Fee Juice directly in your wallet alongside your private and public balances, converting between tokens as needed to cover transaction costs.

When you bridge tokens in, you'll need enough Fee Juice to cover the cost of your first transaction, then you'll need to monitor how much Fee Juice you have available to make transactions. Browser wallets will allow you to send either publicly or privately to other users and will default to using either public or private Fee Juice depending on the type of transaction. Both private Fee Juice and public Fee Juice will appear by default in your token list.

Wrapping up

How you handle Fee Juice depends on where you're transacting: apps can abstract it away entirely and let you pay in any token, while a browser wallet like Azguard puts it in your hands to manage across public and private balances. Match your gas to your transaction, keep private activity private down to the fee, and you move on your terms.

Aztec Network
Aztec Network
21 Jul
xx min read

Introducing Alpha V5

The Aztec Network today activated Alpha V5, a major protocol upgrade passed by token-holder governance and executed onchain. Alpha V5 reduces private-transaction proving times by more than 2x compared to the previous version, lowers the cost of a fully private transaction by roughly 50%, resolves the critical issues found in V4, and sees the first wave of apps go live. Users can now send private transactions and earn yield on Aave simply by connecting their Ethereum wallets on Nyx, bridge from Ethereum to Aztec using Shield or TRAIN, privately collect NFTs on RavenHouse, or play Dark Forest Aztec, a hidden-information strategy game in a universe that lives entirely onchain. 

"Alpha V5 continues Aztec's work at the frontier of client-side proving, with cryptographic breakthroughs that cut proving times by more than half this release," said Zac Williamson, Co-founder, Aztec Foundation. "We believe Aztec is now the fastest system in the world for proving a fully private transaction entirely on a user's own device, and every release moves the industry closer to private transactions at public transaction speeds."

As the only decentralized privacy L2, Aztec is the credibly neutral privacy layer for Ethereum. Aztec allows anyone to write smart contracts that include both private and public aspects – every private transaction is proven on the user's own device, so no operator, sequencer, or intermediary can see the data. The Alpha V5 proving improvements come from cryptographic advances that make this client-side proving faster than any prior release. The network remains in alpha, but with V5 it is ready for teams to begin building and deploying applications.

Performance - 2.5 second fully private transactions 

Making private transactions practical comes down to how quickly a proof can be generated on a user's own device, without offloading that work to a server that would learn what the user is doing. On Alpha V5, proving a private token transfer natively now takes approximately 2.5 seconds on a consumer laptop, down from 5.2 seconds on V4, and about 6.8 seconds in a browser, down from 12.5 seconds. Across every measured transaction flow, client-side proving times improved by approximately 2x compared with V4.

Bench machine: an M2 MacBook (12 cores, throttled to 8). "Native" runs Aztec's C++ proving binary; "WASM" runs the same prover in a browser engine (Node on V8).

Alpha V5 lowers ECDSA signature-verification cost by approximately 2x, speeds up Poseidon2 hashing by approximately 3x, and reduces the protocol circuit gate count by approximately 50% (gate count is the number of individual operations a proving circuit must perform, and it is the main driver of how long a proof takes to generate). Each of these lowers the amount of work a device performs to prove a transaction, and the reduction in gate count in particular compounds across every proof the network generates.

Apps - send, receive, and earn privately on Ethereum

Alpha V5 launches the first wave of apps on a network where privacy is built into the protocol rather than managed by an operator. On other networks that claim privacy, transactions still pass through an operator or node that reads them in plaintext, or depend on a viewing key that a third party holds, so users rely on someone else to protect their data and to decide when it gets disclosed. On Aztec, every private transaction is proven on the user's own device, so the app, the sequencer, and any operator never need to see the underlying data. Nyx is one of these apps, allowing users to privately send transactions and privately earn yield on Aave. 

"On Ethereum, everything you do is public. That's why we built Nyx: a private account governed by your Ethereum wallet", said Nikhil, Co-founder of Nyx. "Now you can send, receive and earn in private. Nyx was the first app live on the Aztec Alpha, and we're excited to expand participation to more users with the added stability of Alpha V5."

Other apps on Alpha V5 include Azguard and Nethermind (wallets), Shield, TRAIN, and RavenHouse (bridges), and the Aztecscan block explorers. Also launching is Dark Forest Aztec, a game where users explore a universe, control planets, manage planetary energy, expand territory, and launch attacks through strategic play with private state and hidden actions.

Dark Forest Aztec private universe-building gameplay

Lower costs, higher security 

Transaction fees on Aztec come from two main sources: the cost of proving a transaction and the cost of verifying the rollup proof on Ethereum. Alpha V5 reduces both. It lowers the network's proving-cost parameter by 50%, and it reduces the L1 gas required to verify a rollup proof by approximately 40%. Because rollup proofs are verified on Ethereum and that cost is shared across all transactions in a batch, the L1 reduction lowers fees for every user, while the lower proving-cost parameter reduces the per-transaction proving fee directly. Together, these bring the average cost of a fully private token transfer to under a $0.05 transaction cost.

Alpha V5 also hardens the network on several fronts. It resolves critical vulnerabilities found in Alpha V4 along with additional bugs discovered since launch. Aztec's bug bounty program on Cantina also drew more than 234 security researchers to participate. The network remains in alpha, and further bugs may surface as usage grows, but each release has closed the issues found in the last and strengthened the protocol against new ones. With the critical V4 issues resolved and these safeguards in place, Alpha V5 is stable enough for teams to begin building and deploying applications.

Availability

Alpha V5 is live now, view the Alpha V5 landing page for a full list of features, performance updates, and live apps to explore. 

About Aztec

Aztec is the only decentralized, privacy-first Layer 2 on Ethereum. Developers write private and public logic in the same smart contract, and private functions are executed and proven on the user's own device, so no operator sees the underlying data. The protocol is upgraded through onchain governance, and the network settles to Ethereum. For more information, visit aztec.network.

Aztec Network
Aztec Network
30 Jun
xx min read

Inside an Aztec Transaction

On Ethereum today, each transaction reveals everything publicly. The token you moved, the size, the timing, the wallet it came from, every action you take. Given the limitations of this type of transparent network, the industry is now focusing on bringing privacy onchain as a top priority. The response to this has mostly been to enable private transactions that shield transfers in various ways. But when we look at how privacy works on Web2, it’s clear that users and developers need granular privacy controls: the ability to decide what is public or private and who is able to see different types of data.

Aztec was built so that one transaction can carry two halves. A private half that runs on your own device and never leaves it, and a public half that the network runs in the open. Apps can choose which aspects are private or public, and users can choose what they want to reveal and when.

This article will follow an example transaction on Aztec: a vote in an onchain election built on Aztec, where who you are and which candidate you chose stay private, while the running tally for each candidate stays public for anyone to verify.

Public and private in one move

Picture the vote you cast in our example as two aspects that seamlessly weave together. In the first step, you act in private: an app records your vote on your device and hands the network a proof that the vote is valid without revealing it. In the second, the network acts in public: it checks that proof, then adds one to the chosen candidate's public tally. It is one transaction: one part stays with you, one part goes to the network. Both parts end up recorded onchain, in two separate state trees, one private and one public. The walkthrough below follows how these two aspects work together and what this means for how your transaction lands onchain. 

It starts on your device

You open the voting app and connect an Aztec wallet. That first step looks like any onchain app. The difference is inside the wallet. An Aztec wallet carries a private execution environment, the PXE, pronounced "pixie", which runs on your phone or in your browser. The PXE is where the private half of your transaction executes, and where the proof of that work gets made, on your hardware, under your exclusive control.

Every account on Aztec is a smart contract rather than a bare key. That design, account abstraction, allows a wallet to authorize a transaction however its owner chooses without writing an identity onto the network for everyone to read. The wallet is the front door, and on Aztec you can decide if the door is open or closed, who you share your information with. 

The private half runs on your device

The voting app is a smart contract with two kinds of functions. The private functions run first, and they run inside your PXE. Your identity and the candidate you picked are the private inputs, and they stay on your device.

The only thing to leave your device is a proof confirming the legitimacy of your vote. Aztec's client-side proving system, Chonk, takes the private execution and produces a zero-knowledge proof: a compact cryptographic receipt that your vote followed the rules, that you are eligible, and have not voted before, while revealing nothing about who you are or who you voted for. Think of it as a sealed ballot the network can confirm is valid without opening it. The network learns only that a legitimate vote happened. It does not learn how you voted, or even which account voted. 

This is the part that used to be too slow to be practical. Generating a proof on a phone was the bottleneck every privacy app hit. Aztec’s Chonk is purpose-built for fast proving on low-memory devices, both natively and in the browser, so the private half runs on the device in your hand instead of on someone else's server.

The public half runs in the open

Some elements of a vote should be public. The tally is shared infrastructure, the number everyone relies on to trust the result. Thanks to programmable privacy on Aztec, the app marks that part public. Public functions live on the network and run in the open, the way functions do on Ethereum.

On Aztec, private and public logic live in the same contract, and the developer decides which is which, function by function and variable by variable. Programmable privacy is a dimmer, not a switch. The voting app turns it up on the individual ballot and turns it down on the running tally. That boundary is a design decision written into the contract, and it is the thing no transparent chain and no fixed-privacy chain can offer.

The network checks the proof and runs the public part

Your vote leaves your device as a bundle: the zero-knowledge proof of the private half, plus the call to the public function that updates the count. It goes to Aztec's sequencers, a decentralized set of thousands of independent operators, with more than 3,500 of them running the network today.

The sequencers do two jobs at once. They verify the proof of your private vote, confirming it is valid and eligible without seeing the choice behind it, and they run the public function that adds one to the chosen candidate and updates the public tally. Your ballot stays sealed. The count goes up by one for everyone to see. The same proof guarantees you cannot vote twice, even though no one learns which ballot is yours.

Two state trees, both onchain

Aztec has two main state trees, and both live onchain. One holds private state, the other holds public state, so the full record of what happened sits on the network rather than on any one person's laptop. The two trees store each record in two different ways depending on if it needs to be private or public. 

The private tree uses a UTXO model, the same note-based design used by Zcash. In this model, state is written as commitments: each entry is a sealed record that a valid vote was cast, with the voter and the choice kept private. Just like with Zcash or Bitcoin, you do not edit a private entry in place. You write a new one, and the design stops the same vote from being cast twice (old state is nullified). The vote stays private, and the record of a legitimate vote happening is onchain for the network to check.

The public tree uses an account-based model, the same shape Ethereum uses: values that update in place, readable by anyone. This is where each candidate's tally lives.

One transaction wrote information to both trees. The private tree recorded that you voted, sealed. The public tree recorded the new totals, in the open. Everything is onchain. The difference between the two trees is how much each one reveals.

Every private app on Aztec writes into that same private tree. A vote, a payment, and a payroll run all land in one shared record of activity, so each user's privacy grows stronger as the network grows, instead of splitting into a separate pool for every app.

A block is proposed, and Ethereum records it

Aztec is an L2 on Ethereum, so everything settles to Ethereum L1. A sequencer on Aztec gathers transactions into a proposed block. Other sequencers validate it before it goes to Ethereum's pending chain. At that point the block sits on Ethereum, ordered and recorded, waiting for its proof. The network has agreed on what happened and the proposed block is just waiting a final proof. 

Anyone can prove it

Proving a block is its own job, and on Aztec, it belongs to no one in particular. A decentralized, permissionless set of provers competes to take a full epoch, a 32-block stretch of the chain, and compresses it into a single zero-knowledge proof of the entire epoch. Anyone with the hardware can run a prover and bid for the work. There is no privileged operator, no committee you have to trust, no outside network holding a key.

That openness is the whole point of a privacy layer. A system that protects your data but routes it through one trusted server has only moved the exposure rather than removed it. Aztec keeps proving permissionless and your private inputs on your device, thereby avoiding any exposure.

The economics land in the voter's favor too. As an L2 network, Aztec spreads the cost of that one L1 proof across thousands of transactions in the rollup, so a vote costs pennies, not the millions of gas a private proof would cost verified alone on Ethereum.

Settled on Ethereum, verifiable by anyone

A prover then posts the epoch proof to Ethereum's proven chain, and the Aztec state is final. Ethereum verifies one proof and inherits the correctness of everything inside it. Aztec extends Ethereum and settles to Ethereum, so your hybrid transaction carries Ethereum's security without carrying Ethereum's enforced transparency.

Anyone can now verify that the result is valid and that every counted vote was legitimate. No one can see how any individual voted. The tally is on the shared ledger where it belongs, and your ballot stayed yours the whole way through.

What this unlocks

For the voter, their ballot was never a broadcast. The candidate you chose stayed yours, with no record tying your wallet to a name for anyone to read later, and you can still check that your vote was counted and the result is honest. You took part without your choice becoming data for systems built to act on it.

For a founder, the election app in this walkthrough is easy to implement without needing to build extensive custom code. Secret ballots with a public, verifiable count, in one contract, is a product category that opens up only because the boundary is programmable. You can build governance, elections, and polls where people vote without fear and the result still proves itself. And of course you can build anything that requires both public and private state to work seamlessly together. 

For an infrastructure provider, the same machinery serves clients who need a result they can stand behind without exposing the people who produced it. Selective disclosure lets a client prove exactly what a counterparty needs to see, the count and the integrity of the process, and protect everything else, on their own terms. That is a guarantee a transparent chain cannot make.

A real vote needs two things at once: a secret ballot and a count anyone can check. A transparent chain makes you give up the first to get the second. On Aztec, you get both. The tally settled on Ethereum for anyone to verify, and how you voted stayed yours. The infrastructure is in place, what will you create with it? 

->Review the Aztec Basics

->Head to the docs and start building today