Skip to content

tangle-network/masp-protocol

Repository files navigation

Webb's Solidity Multi Asset Shielded Pool Protocol

GitHub Workflow Status License Apache 2.0 Twitter Telegram Discord

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.

For additional information on the base protocol-solidity, please refer to the Webb protocol-solidity implementation docs and the official Webb docs site. Have feedback on how to improve protocol-solidity? Or have a specific question to ask? Checkout the Anchor System Feedback Discussion.

Installation & Compile 💻

Install Build Dependencies:

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.

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 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.