**BitMix - Seamless Cross-Chain Privacy**
Live 🟢
|
View Demo 🎬
|
Screenshots 📸
- About The Project
- Problem Statement
- Solution
- How It Works
- Use Cases
- Built With
- Installation
- Usage
- Screenshots
BitMix is a decentralized platform designed to enable secure and private cross-chain swaps between EVM and Non-EVM networks. Unlike traditional exchanges, BitMix prioritizes privacy using advanced zero-knowledge cryptographic mechanisms and ensures transaction security through locking mechanisms. With BitMix, users can experience reliable, private, and decentralized asset swaps.
Cross-chain swaps between EVM and Non-EVM ecosystems lack privacy, efficiency, and security. This exposes users to significant risks such as identity leaks and transaction failures. Existing solutions, such as THORSwap and RAILGUN, do not comprehensively address these challenges.
BitMix provides a decentralized service enabling seamless and private swaps between EVM and Non-EVM chains. Key features include:
- Privacy: Zero-knowledge cryptography ensures user anonymity.
- Security: Advanced locking mechanisms protect funds.
- Decentralization: Trustless architecture facilitates reliable swaps.
-
Swap Initiation
- Alice requests a private swap using
Pub(A)
. - Locks 1 WBTC for 48 hours through a Signed SACP transaction.
- Alice requests a private swap using
-
Monitor & Listen
- Bob creates a random
Priv(B)
and constructs a script address usingPub(A)
andPriv(B)
. - Submits a funding transaction to the script address.
- Bob creates a random
-
Citrea's Verification
- Verifies outputs match the expected
scriptPubKey
. - Confirms transaction inclusion in the Bitcoin block.
- Checks encryption proof using ECIES.
- Verifies outputs match the expected
-
Completion
- BitMix decrypts Alice's message and constructs a script address using
Priv(A)
+Pub(B)
. - Finalizes the BTC transaction and releases WBTC.
- BitMix decrypts Alice's message and constructs a script address using
- Private Cryptocurrency Swaps: Ideal for traders seeking anonymity.
- Secure Wallet Transfers: Enables safe transfers between custodial and non-custodial wallets.
- DeFi Integration: Facilitates seamless interaction between DeFi protocols and Bitcoin.
To set up the project, follow these steps:
- Clone the repository:
git clone https://github.com/your-repo/BitMix.git
- Install dependencies:
yarn
There are four main ways to run this project: build a program, execute a program, generate a core proof, and generate an EVM-compatible proof.
To build the program, run the following command:
cd program
cargo prove build
To run the program without generating a proof:
cd script
cargo run --release -- --execute
This will execute the program and display the output.
To generate a core proof for your program:
cd script
cargo run --release -- --prove
Warning
You will need at least 128GB RAM to generate a Groth16 or PLONK proof.
To generate a proof that is small enough to be verified on-chain and verifiable by the EVM:
cd script
cargo run --release --bin evm -- --system groth16
this will generate a Groth16 proof. If you want to generate a PLONK proof, run the following command:
cargo run --release --bin evm -- --system plonk
These commands will also generate fixtures that can be used to test the verification of SP1 zkVM proofs inside Solidity.
To retrieve your programVKey
for your on-chain contract, run the following command:
cargo prove vkey --program fibonacci-program
We highly recommend using the Succinct prover network for any non-trivial programs or benchmarking purposes. For more information, see the setup guide.
To get started, copy the example environment file:
cp .env.example .env
Then, set the SP1_PROVER
environment variable to network
and set the SP1_PRIVATE_KEY
environment variable to your whitelisted private key.
For example, to generate an EVM-compatible proof using the prover network, run the following command:
SP1_PROVER=network SP1_PRIVATE_KEY=... cargo run --release --bin evm
- Login: Access the platform with your Ethereum wallet.
- Define Traits: Customize your preferences and choose traits for ideal matches.
- Match & Swap: Use the zero-knowledge-based algorithm for secure and private transactions.
Built with ❤️ by Team Crema | ETHIndia 2024