Git Product home page Git Product logo

aztec's Introduction

AZTEC is an efficient zero-knowledge privacy protocol and decentralised exchange. The protocol powers real world financial applications on Ethereum mainnet today. A complete explanation of AZTEC can be found in our white paper.

CircleCI Lerna Telegram License: LGPL v3


Warning ๐Ÿšจ

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 ๐Ÿ“ฆ

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

JavaScript Packages

Package Version Description
aztec.js npm An aggregate package combining many smaller utility packages for interacting with the AZTEC Protocol
@aztec/artifacts npm Aztec smart contract compiled artifacts
@aztec/contract-addresses npm A tiny utility library for getting known deployed contract addresses for a particular network.

Private Packages

Package Description
@aztec/contracts AZTEC Protocol solidity smart contracts & tests
@aztec/demo Demo of AZTEC written in javascript

Usage โš’๏ธ

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

$ npm install aztec.js --save

To integrate our deployed contracts' ABI and addresses:

$ npm install @aztec/artifacts @aztec/contract-addresses --save

To see a demo on the Rinkeby testnet:

git clone [email protected]:AztecProtocol/AZTEC.git
cd AZTEC/packages/demo

Now, make sure you use your own private keys instead of the defaults in accounts.json. Then:

npm install
npm run demo:rinkeby

For more information, check out our documentation.

Contributing ๐Ÿ™‹โ€โ™€๏ธ

Requirements

  • node ^4.0.0 and npm^2.14.2
  • solidity 0.4.24

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:

$ lerna exec -- npm install

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 :face_with_monocle:

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

Decentralized Confidential Exchanges

The AZTEC protocol and its decentralized exchange protocol extension (coming soon) can be used to trade AZTEC assets in complete confidentiality, without having to expose the values or prices of any trade.

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.

What is the future of the AZTEC protocol?

AZTEC will provide efficient and easy to use transaction privacy to the next generation of digital asset builders. We will be releasing the following information, open source technology and protocol upgrades over the coming months:

  1. Release the full AZTEC token standard, with associated API tools to construct confidential transactions
  2. Release our multiparty computation trusted setup protocol and register participants
  3. Release the formal specification for the AZTEC decentralized exchange and example smart contracts
  4. Release API tools to use the AZTEC decentralized exchange

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 [email protected]

aztec's People

Contributors

zac-williamson avatar paulrberg avatar thomas-waite avatar

Watchers

James Cloos avatar srihari kapu avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.