Confidential Data Exchange 🔒
A decentralized platform for secure AI model and dataset trading with confidential computation capabilities.
Overview
The "Confidential Data Exchange" platform addresses the critical need for privacy-preserving data sharing and computation in the AI/ML ecosystem. Built on Oasis Sapphire's confidential EVM and integrated with Ocean Protocol, this platform enables:
Key Features
-
🔐 Confidential Data Sharing
- Secure trading of AI models and datasets
- End-to-end encryption for sensitive data
- Access control through blockchain-based authentication
-
🎨 NFT-Based Asset Tokenization
- Tokenize AI models and datasets as NFTs
- Transparent ownership verification
- Maintain confidentiality of underlying assets
-
⚡ Compute-to-Data
- Perform computations on encrypted data
- Ocean Protocol integration for secure data access
- ROFL-powered off-chain computation
Technology Stack
-
Blockchain
- Oasis Sapphire (Confidential EVM)
- Ocean Protocol
- ROFL Framework
-
Frontend
- Next.js
- TypeScript
- TailwindCSS
- shadcn/ui
-
Smart Contracts
- Solidity
- Hardhat
- OpenZeppelin
Getting Started
Prerequisites
# Required
Node.js >= 18
npm >= 9
Installation
- Clone the repository
git clone https://github.com/arhansuba/confidential-data-exchange.git
cd confidential-data-exchange
- Install dependencies
# Install root dependencies
npm install
# Install frontend dependencies
cd frontend
npm install
- Set up environment variables
# Root directory
cp .env.example .env
# Frontend directory
cd frontend
cp .env.example .env.local
Development
- Compile contracts
npx hardhat compile
- Run tests
npx hardhat test
- Start frontend development server
cd frontend
npm run dev
Deployment
- Deploy contracts
# Deploy to Sapphire testnet
npx hardhat run scripts/deploy.ts --network sapphire_testnet
# Verify contracts
npx hardhat verify --network sapphire_testnet <CONTRACT_ADDRESS>
- Deploy frontend
cd frontend
npm run build
npm run start
Architecture
Smart Contracts
ConfidentialAIModel.sol: Manages AI model listings and access controlNFTMarketplace.sol: Handles NFT tokenization and tradingROFLIntegration.sol: Off-chain computation coordinationOceanProtocol.sol: Ocean Protocol integration for compute-to-data
Frontend Components
Marketplace.tsx: Main trading interfaceModelCard.tsx: AI model display componentComputeJob.tsx: Computation managementDatasetPublisher.tsx: Dataset publishing interface
Security
- End-to-end encryption for all sensitive data
- TEE verification for compute jobs
- Access control through smart contracts
- Regular security audits
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Description
Languages
Python
97.3%
TypeScript
1.5%
Cython
0.7%
C
0.3%