Home

Awesome

<p align="center"><img src="https://i.imgur.com/BaalNC8.jpg" width="280px"/></p> <p align="center"> AZTEC is an efficient zero-knowledge privacy protocol. The protocol powers real world financial applications on Ethereum mainnet today. A complete explanation of AZTEC can be found in our <a href="https://github.com/AztecProtocol/AZTEC/blob/master/AZTEC.pdf">white paper</a>.</p> <p align="center"> <a href="https://circleci.com/gh/AztecProtocol/AZTEC"> <img src="https://circleci.com/gh/AztecProtocol/AZTEC.svg?style=svg&circle-token=bb8aa4415af9d373eab3ee130a284e0c4874f65c" alt="CircleCI"/> </a> <a href="https://coveralls.io/github/AztecProtocol/AZTEC?branch=master"> <img src="https://coveralls.io/repos/github/AztecProtocol/AZTEC/badge.svg?branch=master" alt="Coverage Status"/> </a> <a href="https://lernajs.io/"> <img src="https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg" alt="Lerna"/> </a> <a href="https://t.me/aztecprotocol"> <img src="https://img.shields.io/badge/chat-telegram-0088CC.svg?style=flat" alt="Twitter"/> </a> <a href="https://www.gnu.org/licenses/lgpl-3.0"> <img src="https://img.shields.io/badge/License-LGPL%20v3-008033.svg" alt="License: LGPL v3"> </a> </p>

Warning :rotating_light:

This is a proof of concept. The trusted setup was generated by our team internally. We will be releasing more information about the production trusted setup generation in the near future. Use at own risk.

Packages :package:

AZTEC is maintained as a monorepo with multiple sub packages. Please find a comprehensive list below.

JavaScript Packages

PackageVersionDescription
aztec.jsnpmAn aggregate package combining many smaller utility packages for interacting with the AZTEC Protocol
@aztec/contract-artifactsnpmAZTEC smart contract compiled artifacts
@aztec/contract-addressesnpmA tiny utility library for getting known deployed contract addresses for a particular network
@aztec/dev-utilsnpmDev utils to be shared across AZTEC projects and packages

Solidity Packages

PackageVersionDescription
@aztec/protocolnpmAZTEC solidity smart contracts & tests

Private Packages

PackageDescription
@aztec/huffDSL for low-level Ethereum smart contract programming
@aztec/weierstrudelEfficient elliptic curve arithmetic for smart contracts

Usage :hammer_and_pick:

To fiddle with cryptography engine and create your own AZTEC notes:

$ npm install aztec.js --save

Other goodies:

$ npm install @aztec/contract-artifacts
$ npm install @aztec/contract-addresses
$ npm install @aztec/dev-utils

To see a demo, head to the protocol package:

$ cd packages/protocol

Make sure you use your own private keys instead of the defaults in demo/accounts.json. Then:

$ npm install
$ truffle migrate --network rinkeby
$ npm run demo:rinkeby

For more information, check out our documentation.

Contributing :raising_hand_woman:

Requirements

Pre Requisites

$ npm install lerna@^3.10.6 --global
$ npm install truffle@^5.0.0 --global

Build

To install the node modules in all packages:

$ npm run bootstrap

To build all packages:

$ lerna run build

To build a specific package:

$ lerna run build --scope aztec.js

Clean

To clean all packages:

$ lerna run clean

To clean a specific package:

$ lerna run clean --scope aztec.js

Lint

To lint all packages:

$ lerna run lint

To lint a specific package:

$ lerna run lint --scope aztec.js

Test

To run all tests:

$ lerna run test

To run tests in a specific package:

$ lerna run test --scope aztec.js

FAQ :question:

What is the AZTEC Protocol?

The protocol enables transactions of value, where the values of the transaction are encrypted. The AZTEC protocol smart contract validator, AZTEC.sol, validates a unique zero-knowledge proof that determines the legitimacy of a transaction via a combination of homomorphic encryption and range proofs.

What is encrypted 'value'?

Instead of balances, the protocol uses AZTEC notes. A note encrypts a number that represents a value (for example a number of ERC-20 tokens). Each note has an owner, defined via an Ethereum address. In order to spend a note the owner must provide a valid ECDSA signature attesting to this.

What does this enable?

Confidential representations of ERC20-tokens

The AZTEC protocol can enable confidential transactions for any generic digital asset on Ethereum, including existing assets. For our proof of concept implementation of the AZTEC protocol, we attached an AZTEC token to MakerDAO's DAI token. This smart contract can be used to convert DAI from its public ERC-20 form into a confidential AZTEC note form.

Fully confidential digital assets

The AZTEC protocol can be utilized as a stand-alone confidential token, with value transfers described entirely through AZTEC join-split transactions

How much gas do these transactions cost?

The gas costs scale with the number of input and output notes in a join-split transaction. For a fully confidential transfer, with 2 input notes and 2 output notes, the gas cost is approximately 900,000 gas. Planned EIP improvements will reduce the cost of these transactions dramatically, to approximately 200,000 - 300,000 gas.

Where can I see this in action?

The AZTEC protocol is live today on the Ethereum main-net. Our proof of concept contract converts DAI into AZTEC note form and is live on the Ethereum main-net. Here is an example AZTEC join-split transaction.

Range proofs you say? How does that work?

Read the AZTEC paper here. The unique AZTEC commitment function enables the efficient construction and verification of range proofs. The protocol requires a trusted setup protocol, that generates a dataset that is required to construct AZTEC zero-knowledge proofs

The Trusted Setup

Our proof of concept uses a trusted setup generated by our team internally. Whilst we would like to think you can trust us implicitly, we have developed a method of performing the trusted setup via multiparty computation. Each participant generates a piece of toxic waste that must be destroyed. Only one participant must destroy their toxic waste for the protocol to be secure and the trusted setup process can scale indefinitely. We will be releasing our full specification for the trusted setup protocol shortly.

Are AZTEC transactions anonymous as well as confidential?

The AZTEC protocol supports a stealth address protocol that can be used to obfuscate the link between a note 'owner' and any on-chain identity.

This sounds interesting! How can I get involved?

Anybody wishing to become early members of the AZTEC network please get in touch at hello@aztecprotocol.com