Giter VIP home page Giter VIP logo

berzanorg / nacho Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 0.0 988 KB

Nacho is a zk rollup where you can bridge and swap tokens.

Home Page: https://nacho.berzan.org/

License: MIT License

Dockerfile 0.12% Rust 67.92% TypeScript 29.50% JavaScript 0.62% CSS 0.04% HTML 0.07% Svelte 1.18% Shell 0.55%
blockchain blockchain-client database layer-2 mina mina-protocol o1js rollup rust smart-contracts

nacho's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nacho's Issues

impl: Witness Database

Implement Witness Database inside witness-database crate using the reference below.

It is going to be used by the client.

The witness database stores the hashes of each data stored in the state database inside an on disk Merkle tree.
It also makes it possible to represent the entire state as a fixed size Merkle root.
It is optimized for high performance and low disk usage.

impl: Nacho-Mina Bridge

Implement a bridge between Mina and Nacho.

Update the smart contract and add the required logic to the client.

To deposit tokens from Mina to Nacho, a user has to send tokens to the smart contract of Nacho and send the proof of that transaction to the client of Nacho. The client keeps track of Mina's state and checks the correctness of the transaction and mints the equivalent amount of tokens on Nacho for the user.

To withdraw tokens from Nacho to Mina, a user has to burn tokens on Nacho and send the proof of that burn to the smart contract. The smart contract allows the user to receive the equivalent amount of tokens on Mina.

impl: provable `Burn` data structure for Bridge

Implement a provable data structure called Burn for the bridge.

The Burn data structure should store the witness database index of itself, the token identifier of the token burned and the token amount that is burned.

impl: field elements and Poseidon hash

Implement an easy to use interface for field elements and Poseidon hash inside common crate.

Field elements and Poseidon hash are going to be used across all the crates of this project.

impl: Smart Contract and Prover

Implement a prover and a smart contract.

The prover is going to be a ZkProgram that doesn't have a logic yet, but noOperation and mergeProofs methods.

The smart contract is going to be a SmartContract that stores the Merkle root of the entire rollup's state, and has a method called updateState that updates the on-chain Merkle root by verifying proofs.

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.