ShadowPool: Privacy Layer for Bitcoin Transactions on Stacks L2#1
Open
semi-collab wants to merge 4 commits into
Open
ShadowPool: Privacy Layer for Bitcoin Transactions on Stacks L2#1semi-collab wants to merge 4 commits into
semi-collab wants to merge 4 commits into
Conversation
- Define SIP-010 trait for fungible token interactions - Add error codes for various contract operations - Set constants for Merkle tree height and zero value - Initialize data variables for current root and next index - Define data maps for deposits, nullifiers, and Merkle tree - Implement helper functions for hash combination, hash validation, and Merkle tree node management This commit introduces the foundational elements of the ShadowPool contract, providing a privacy layer for Bitcoin transactions on Stacks L2.
- Implement `update-parent-at-level` for updating Merkle tree nodes - Add `verify-proof-level` and `verify-merkle-proof` for proof verification - Enhance `deposit` function to include Merkle tree updates and token transfer These changes introduce essential functions for maintaining and verifying the Merkle tree structure, as well as handling deposits securely.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces ShadowPool, a privacy-preserving smart contract that enables confidential Bitcoin transactions on the Stacks L2 network using zero-knowledge proofs and Merkle trees.
Key Features
Implementation Details
Core Contract Structure
Merkle Tree Operations
Transaction Functions
Testing & Security
Documentation
Changes Overview
Testing Instructions
Checklist
🚀 Next Steps
📋 Additional Notes
This implementation focuses on security and privacy while maintaining compatibility with the Stacks ecosystem. The contract has been designed with scalability in mind, supporting a large number of deposits while ensuring transaction privacy.