Skip to content

Coredevjay/Atomic-IP-Marketplace

 
 

Repository files navigation

Atomic IP Marketplace

CI

Soroban smart contracts for atomic IP swaps using USDC, IP registry, and ZK verification.

Overview

  • atomic_swap: Atomic swaps with USDC payments, pause functionality, buyer/seller indexing.
  • ip_registry: Register and query IP assets with TTL.
  • zk_verifier: Merkle tree ZK proof verification with TTL.

See contracts/ for sources and docs/architecture.md for sequence diagrams.

Getting Started

Prerequisites

  • Rust (stable, with wasm32-unknown-unknown target)
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    rustup target add wasm32-unknown-unknown
  • Stellar CLI — used to build, optimize, and deploy contracts
    cargo install --locked stellar-cli --features opt
  • Node.js v18+ and npm — required for the frontend
    # via nvm (recommended)
    nvm install 18

Clone and configure

git clone https://github.com/unixfundz/Atomic-IP-Marketplace.git
cd Atomic-IP-Marketplace
cp .env.example .env

.env.example walkthrough

Variable Description
STELLAR_NETWORK testnet or mainnet
STELLAR_RPC_URL Soroban RPC endpoint (default: testnet)
CONTRACT_ATOMIC_SWAP Deployed atomic_swap contract ID (filled after deploy)
CONTRACT_IP_REGISTRY Deployed ip_registry contract ID
CONTRACT_ZK_VERIFIER Deployed zk_verifier contract ID
VITE_* Frontend copies of the above for Vite
ATOMIC_SWAP_ADMIN Admin address for contract initialization
ATOMIC_SWAP_FEE_RECIPIENT Address that receives protocol fees
ATOMIC_SWAP_FEE_BPS Fee in basis points (e.g. 250 = 2.5%)
ATOMIC_SWAP_CANCEL_DELAY_SECS Seconds before a buyer can cancel (e.g. 3600)

Build contracts

# Build and optimize all contracts
./scripts/build.sh

# Build a single contract
./scripts/build.sh atomic_swap
# Available: ip_registry, atomic_swap, zk_verifier

Run tests

./scripts/test.sh

This runs cargo test --locked --workspace across all three contracts.

Local testnet setup

  1. Start a local Stellar network (requires Docker):
    stellar network start local
  2. Add a funded account:
    stellar keys generate deployer --network local
    stellar keys fund deployer --network local
  3. Set STELLAR_NETWORK=local and STELLAR_RPC_URL=http://localhost:8000/soroban/rpc in .env.
  4. Deploy:
    ./scripts/deploy_testnet.sh

Frontend

cd frontend
cp .env.example .env   # fill in VITE_CONTRACT_* after deploy
npm install
npm run dev

Build & Test

Build all contracts:

./scripts/build.sh

Run tests:

./scripts/test.sh

Deploy (Testnet)

./scripts/deploy_testnet.sh

Security

SECURITY.md

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.


Workspace using Soroban SDK v25.3.0

new

About

This project takes "Atomic IP" to a much deeper level by adding Zero-Knowledge verification to the sales process. You aren't just selling a file; you are providing "proof of quality" without "loss of secrecy."

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 46.2%
  • TypeScript 28.5%
  • CSS 13.9%
  • JavaScript 7.1%
  • Shell 2.8%
  • HTML 1.3%
  • Makefile 0.2%