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
- Host: GitHub
- URL: https://github.com/tangle-network/masp-protocol
- Owner: tangle-network
- License: mit
- Created: 2023-05-17T21:11:25.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-09T11:04:55.000Z (over 1 year ago)
- Last Synced: 2025-06-09T21:16:49.924Z (11 months ago)
- Topics: cryptography, privacy, zero-knowledge
- Language: Solidity
- Homepage: https://docs.webb.tools/docs/protocols/masp/overview/
- Size: 1.14 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.Apache-2.0
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Webb's Solidity Multi Asset Shielded Pool Protocol
[](https://github.com/webb-tools/masp-protocol/actions) [](https://www.apache.org/licenses/LICENSE-2.0) [](https://twitter.com/webbprotocol) [](https://t.me/webbprotocol) [](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.