An open API service indexing awesome lists of open source software.

https://github.com/tangle-network/masp-protocol

Multi-asset shielded pool extending protocol-solidity contract system
https://github.com/tangle-network/masp-protocol

cryptography privacy zero-knowledge

Last synced: 3 months ago
JSON representation

Multi-asset shielded pool extending protocol-solidity contract system

Awesome Lists containing this project

README

          


![Webb Logo](./.github/assets/webb_banner_light.png#gh-light-mode-only)
![Webb Logo](./.github/assets/webb_banner_dark.png#gh-dark-mode-only)



Webb's Solidity Multi Asset Shielded Pool Protocol

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/webb-tools/masp-protocol/check.yml?branch=main&style=flat-square)](https://github.com/webb-tools/masp-protocol/actions) [![License Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0) [![Twitter](https://img.shields.io/twitter/follow/webbprotocol.svg?style=flat-square&label=Twitter&color=1DA1F2)](https://twitter.com/webbprotocol) [![Telegram](https://img.shields.io/badge/Telegram-gray?logo=telegram)](https://t.me/webbprotocol) [![Discord](https://img.shields.io/discord/833784453251596298.svg?style=flat-square&label=Discord&logo=discord)](https://discord.gg/cv8EfJu3Tn)

Table of Contents

Table of Contents

Getting Started

The `masp-protocol` contains a `protocol-solidity` protocol extension for multi-asset shielded pools. Multi-asset shielded pools (MASP) are pools that shield multiple asset types under one pool system. This protocol currently supports both ERC20 fungible assets as well as non-fungible (NFT) assets. This protocol is built on top of the core `protocol-solidity` contracts by adding new functionality.

Other features of this MASP protocol are
- Shielded atomic swaps (SAS) between ERC20 and NFT assets.
- Delegatable proof generation for outsourcing heavy computation.
- Liquidity incentives for anonymity set growth.
- Viewing keys for compliance.
- Rollup functionality for batched deposits.
- (Coming soon) Fuzzy message detection over encrypted records.

For additional documentation on the MASP protocol, please refer to the [Webb MASP docs](https://docs.webb.tools/docs/protocols/masp/overview/).

For additional information on the base `protocol-solidity`, please refer to the [Webb protocol-solidity implementation docs](https://webb-tools.github.io/protocol-solidity/) and the official [Webb docs site](http://docs.webb.tools/). Have feedback on how to improve protocol-solidity? Or have a specific question to ask? Checkout the [Anchor System Feedback Discussion](https://github.com/webb-tools/feedback/discussions/categories/anchor-protocol).

Installation & Compile 💻

### Install Build Dependencies:

- [Installing circom](https://docs.circom.io/getting-started/installation/#installing-circom)

- [Installing snarkjs](https://docs.circom.io/getting-started/installation/#installing-snarkjs)

### Install Project Dependencies:

```
yarn install
```

Update submodules:

```
git submodule update --init --recursive
```

Populate fixtures from the submodules:

```
yarn fetch:fixtures
```

To compile contracts and build typescript interfaces

```
yarn build
```

To run test suite:

```
yarn test
```

To fix the formatting, please run:

```
yarn format
```

**Note:** If you push new fixtures to remote storage

You can use `dvc` tool and run following commands:
```
cd solidity-fixtures
dvc add solidity-fixtures
dvc push --remote s3-read-write
```

## Troubleshooting

[1] You may get following error while building on macBook if `gnu-sed` is not installed. Install it and add to your path as discussed [here](https://stackoverflow.com/questions/43696304/how-do-i-fix-sed-illegal-option-r-in-macos-sierra-android-build).
```bash
sed: 1: "packages/masp-anchor-co ...": extra characters at the end of p command
sed: 1: "packages/masp-anchor-co ...": extra characters at the end of p command
error Command failed with exit code 1.
```

Contributing

If you have a contribution in mind, please check out our [Contribution Guide](./.github/CONTRIBUTING.md) for information on how to do so. We are excited for your first contribution!

License

Licensed under Apache 2.0 / MIT license.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the MIT OR Apache 2.0 license, shall be licensed as above, without any additional terms or conditions.