Skip to content

dan-aztec/aztec-lwe-auction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aztec x FHE Auction

What is this?

Aztec is a privacy first fully programmable permission-less execution environment. Each user of Aztec owns their own state; it is encrypted.

Aztec gets it programmability by leveraging Zero Knowledge Proofs, this allows users to make claims about encrypted state, however to make claims about other user's encrypted state is another matter. This is where we can leverage Fully Homomorphic Encryption ( FHE ).

This repo contains the Aztec Contracts required to create a fully private auction. There is an auction.test.ts file that contains the

This project was created by in the DevConnect co-working space in Istanbul and is not in anyway shape or form ready for production use.

Caveats

  • A real world implementation of would have the FHE Oracle part as its own service, for demo purposes we are just using a cli.
  • There would also be a distributed key gen process to create the FHE keys, we just generate them here ( there are many unanswered questions ).
  • In this implementation our encryption and decryption blowup constants are terrible and are NOT secure in any way shape or form ( this is a proof of concept ).

Blueprint

├── contracts                   // Noir contracts
│   ├── fhe_auction
│   │   ├── Nargo.toml
│   │   ├── src
│   │   │   ├── encrypted_bid.nr
│   │   │   └── main.nr
├── src                         // Test
│   ├── auction.test.ts
│   └── types
│       └── Auction.ts
├── package.json
├── tsconfig.json
└── yarn.lock

Development

Setup Installation instructions for external tooling can be found below in the "First time" sections.

You will need to install the FHE auction client ( it is just called in a subprocess by the tests ).

run cargo install --path . in from this repo https://github.com/Maddiaa0/fhe-auction

yarn

Building

yarn build

Testing

In one terminal run anvil:

anvil

In another run the aztec sandbox

yarn start:sandbox

Then finally;

yarn test

First time with Noir?

See the official Noir installation instructions.

Then, install the Noir toolchain installer (noirup) with:

curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash

Now that you've installed the noirup binary,

So, simply execute:

noirup

🎉 Noir is installed! 🎉

First time with the Aztec Sandbox?

You'll need to install the aztec-cli!

See the official installation instructions if you get stuck, but its super easy!

npm i -g @aztec/aztec-sandbox @aztec/aztec-cli

This should do the trick!

🎉 Aztec-cli and sandbox is installed! 🎉

You can run the anvil in docker by following the instructions linked above; however i often prefer running it locally.

First time with Anvil?

See the official Foundry installation instructions.

Then, install the foundry toolchain installer (foundryup) with:

curl -L https://foundry.paradigm.xyz | bash

Now that you've installed the foundryup binary, anytime you need to get the latest forge or cast binaries, you can run foundryup.

So, simply execute:

foundryup

🎉 Foundry is installed! 🎉

Acknowledgements

Disclaimer

These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published