{"id":29625514,"url":"https://github.com/namada-net/masp","last_synced_at":"2025-07-21T06:37:14.011Z","repository":{"id":38841072,"uuid":"311750322","full_name":"namada-net/masp","owner":"namada-net","description":"The multi-asset shielded pool (MASP) provides a unified privacy set for all assets on Namada.","archived":false,"fork":false,"pushed_at":"2025-07-18T09:57:42.000Z","size":30153,"stargazers_count":91,"open_issues_count":5,"forks_count":26,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-07-18T13:47:03.809Z","etag":null,"topics":["blockchain","decentralization","masp","namada","privacy","zero-knowledge-proofs"],"latest_commit_sha":null,"homepage":"https://namada.net","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/namada-net.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-10T18:31:08.000Z","updated_at":"2025-07-16T18:46:22.000Z","dependencies_parsed_at":"2024-01-16T17:59:15.122Z","dependency_job_id":"20d2f8a4-90fe-4ff9-b7f9-e53477a68411","html_url":"https://github.com/namada-net/masp","commit_stats":null,"previous_names":["namada-net/masp","anoma/masp"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/namada-net/masp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namada-net%2Fmasp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namada-net%2Fmasp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namada-net%2Fmasp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namada-net%2Fmasp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/namada-net","download_url":"https://codeload.github.com/namada-net/masp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namada-net%2Fmasp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266253921,"owners_count":23900057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","decentralization","masp","namada","privacy","zero-knowledge-proofs"],"created_at":"2025-07-21T06:37:13.498Z","updated_at":"2025-07-21T06:37:13.990Z","avatar_url":"https://github.com/namada-net.png","language":"Rust","readme":"![MASP Logo](https://github.com/anoma/masp/blob/main/docs/logo.png)\n\n# MASP Rust crates\n\nThis repository contains a set of Rust crates for\nworking with the Multi Asset Shielded Pool extensions of the Sapling circuits from Zcash.\n\n## MASP Description\n\nUsing the original Sapling circuits for user defined assets, each asset or token type must have a separate shielded pool and asset type is transparent for all transactions. \n\nUsing the MASP circuits, MASP notes can have shielded type, multiple assets can share the same shielded pool, and the asset types in a transaction can be shielded (except where there is transparent balance change)\n\nThe MASP is based on proposed multi-asset extensions to the Zcash protocol:\n\n* https://github.com/zcash/zips/pull/269\n* https://github.com/zcash/zcash/issues/830\n* https://github.com/zcash/zcash/issues/2277#issuecomment-321106819 \n* https://github.com/str4d/librustzcash/tree/funweek-uda-demo\n\nThe MASP attempts to keep most of the security, feature, and performance properties of the original Sapling circuits.\n\n## Additional Components\n\nThis Rust repository, by itself, is not a complete implementation of the MASP, as it only includes circuits and some other functionality (transaction balancing, etc) while other functionality (notes, etc) is implemented elsewhere.\n\n## Repository Structure\n\nThe `masp_proofs` crate contains the modified Spend and Output circuits to support multiple assets.\n\nMuch of the code that supports the original Sapling circuits can be shared and reused with the MASP circuits. Therefore, certain code from `zcash_primitives` and `zcash_proofs` is placed in `masp_primitives` and `masp_proofs`. \n\nNew code related to asset types is included in `masp_primitives`. \n\nZcash code that is not relevant to the circuits (e.g. protocol, transaction, consensus, blockchain code) has been removed.\n\nThe `masp` crate contains the C language bindings for accessing the circuits.\n\nThe `docs` folder includes technical documentation about the circuit changes.\n\n## Asset Identifiers\n\nThe major difference between MASP and original Sapling is the use of asset identifiers to identify distinct asset types. An asset identifier is an internal 32 byte string that uniquely identifies each asset in the circuits. \n\nThe asset identifier is independent of a specific token standard. \n\nThere are certain requirements for deriving asset identifiers. The `AssetType` struct in `masp_primitives` (also via the C bindings) gives functions to derive asset identifiers.\n\n## Convert Circuit\n\nIn addition to the modified Spend and Output circuits, the MASP includes a Convert circuit that allows shielded conversions between distinct asset types according to a public list of conversion ratios. This is not a fully general exchange mechanism, but can be used to issue shielded rewards or incentives inside a pool. \n\nThe Convert circuit provides a mechanism where burning and minting of asset types can be enabled by adding Convert value commitments in transaction and ensuring the homomorphic sum of Spend, Output and Convert value commitments to be zero.\n\nThe Convert value commitment is constructed from AllowedConversion which was published earlier in AllowedConversion Tree. The AllowedConversion defines the allowed conversion assets. The AllowedConversion Tree is a merkle hash tree stored in the ledger.\n\n## Trusted Setup\n\nThe Zcash Sapling trusted setup parameters cannot be completely reused for the MASP. Parameter location and hashes must be added to `masp_proofs` following a suitable MPC ceremony.\n\n## New projects\n\nFor new projects relying on this library, the `redjubjub` dependency pulls `reddsa` which contains some hardcoded values (personalizations and basepoints). If you need different values consider forking `reddsa`, modifying it to your needs and patching it in the root manifest.\n\n## Security Warnings\n\nThese libraries are currently under development and have not been fully-reviewed.\n\n## Audits\n\nThe following audits have been done on the MASP protocol:\n\n* [Inference AG](https://github.com/anoma/namada/blob/main/audits/report-anoma-inference.pdf)\n* [Least Authority](https://leastauthority.com/static/publications/LeastAuthority_Tezos_Foundation_Multi_Asset_Shielded_Pool_Audit_Report.pdf)\n\nIn addition, the original Zcash Sapling protocol was audited without the MASP extensions:\n\n* [Kudelski Security](https://cybermashup.files.wordpress.com/2018/08/zcash-audit.pdf)\n* [Least Authority](https://leastauthority.com/static/publications/LeastAuthority-Zcash-Overwinter%2BSapling-Specification-Final-Audit-Report.pdf)\n* [NCC Group](https://research.nccgroup.com/wp-content/uploads/2020/07/NCC_Group_Zcash2018_Public_Report_2019-01-30_v1.3.pdf)\n\n## License\n\nAll code in this workspace is licensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamada-net%2Fmasp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamada-net%2Fmasp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamada-net%2Fmasp/lists"}