A decentralized data marketplace built on the Sui blockchain, featuring encrypted data storage via Walrus, Seal encryption, and Nautilus TEE for secure data preview and trading.
Datex is a decentralized marketplace for buying and selling datasets on the Sui blockchain. The platform enables:
- Sellers: Upload and encrypt datasets using Seal Protocol, store on Walrus decentralized storage, and manage listings via Sui smart contracts
- Buyers: Preview partial data through Nautilus TEE (Trusted Execution Environment) before purchase, ensuring data quality verification without exposing the full dataset
Unlike traditional data marketplaces, Datex solves the "trust problem" by allowing buyers to verify dataset quality through secure preview in a TEE environment. The encrypted data is decrypted only within the Nautilus secure enclave, returning a limited preview without exposing the full dataset or decryption keys.
Create a trustless, secure, and transparent data marketplace where:
- Data providers can monetize their datasets with guaranteed payment
- Buyers can verify data quality before purchase through TEE-powered preview
- All transactions are transparent and verifiable on-chain
- Frontend: https://datex.vercel.app
- Network: Sui Testnet
| Contract | Address |
|---|---|
| Package ID | 0x3ee8141400c1f4accbe52f3be4291e8faf6051dfbaaea794e052a5bbe974884c |
| Registry ID | 0x6cf4a393c7543d9f7ccc97759bed957c88bd7c8790284a1fa6275f5aa3b51502 |
Explorer Links:
┌─────────────────────────────────────────────────────────────────────────────┐
│ DATEX ARCHITECTURE │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ SELLER │ │ BUYER │ │ BUYER │ │
│ │ (Upload) │ │ (Preview) │ │ (Purchase) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ NEXT.JS FRONTEND │ │
│ │ • Create Listing Form • Preview Modal • Purchase Flow │ │
│ │ • Wallet Integration • Dataset Browser • My Data Dashboard │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ WALRUS │ │ NAUTILUS │ │ SUI │ │
│ │ (Storage) │ │ (TEE) │ │ (Blockchain)│ │
│ │ │ │ │ │ │ │
│ │ • Blob Store│ │ • Secure │ │ • Listings │ │
│ │ • Content │ │ Enclave │ │ • Receipts │ │
│ │ Addressed │ │ • Preview │ │ • Payments │ │
│ └──────┬──────┘ │ Decrypt │ │ • Registry │ │
│ │ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ SEAL PROTOCOL │ │
│ │ • Threshold Encryption (2-of-N Key Servers) │ │
│ │ • Policy-Based Access Control │ │
│ │ • Decryption via TEE or Purchase Receipt │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Frontend:
- Next.js 16 (App Router)
- React 19
- TailwindCSS 4
- TypeScript
- GSAP (Animations)
Blockchain:
- Sui Network (Testnet/Mainnet)
- Move Smart Contracts
Storage & Encryption:
- Walrus - Decentralized blob storage
- Seal Protocol - Threshold encryption
- Nautilus TEE - Secure preview environment
Key Libraries:
@mysten/dapp-kit- Sui wallet integration@mysten/seal- Data encryption/decryption@mysten/walrus- Decentralized storage@mysten/enoki- Sponsored transactions@tanstack/react-query- Data fetching
- Upload files to Walrus decentralized storage
- Encrypt data using Seal encryption
- Set price in SUI tokens
- Add metadata (name, description, preview image)
- Support for multiple file types (images, CSV, ZIP archives)
- Filter by category (DeFi, Social Graph, Healthcare, Gaming)
- Sort by price, date, or relevance
- Search by keywords
- View verified sellers
- Connect Sui wallet
- Pay with SUI tokens
- Receive purchase receipt (on-chain proof)
- Decrypt and download data
Nautilus TEE enables buyers to preview encrypted data without exposing the full dataset or decryption keys.
┌─────────────────────────────────────────────────────────────────┐
│ NAUTILUS TEE PREVIEW FLOW │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. BUYER REQUEST │
│ ┌─────────┐ │
│ │ Buyer │ ──► Sends dataset_id + blob_id │
│ └─────────┘ + preview_bytes (e.g., 1024) │
│ │
│ 2. TEE PROCESSING (Secure Enclave) │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ NAUTILUS SERVER │ │
│ │ • Verify TEE attestation (PCR0, PCR1, PCR2) │ │
│ │ • Fetch encrypted blob from Walrus │ │
│ │ • Decrypt using Seal Protocol inside enclave │ │
│ │ • Extract only preview_bytes of data │ │
│ │ • Return signed preview response │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ 3. PREVIEW RESPONSE │
│ ┌─────────┐ │
│ │ Buyer │ ◄── Receives partial decrypted data │
│ └─────────┘ (e.g., first 1KB of CSV) │
│ │
│ ✓ Full data never leaves TEE │
│ ✓ Decryption keys never exposed │
│ ✓ Buyer can verify data quality before purchase │
│ │
└─────────────────────────────────────────────────────────────────┘
// Request preview via Nautilus TEE
POST /api/debug/nautilus
{
"dataset_id": "0x...",
"blob_id": "walrus_blob_id",
"preview_bytes": 1024,
"requester_address": "0x...",
"mime_type": "text/csv",
"file_name": "data.csv"
}
// Response
{
"response": {
"data": {
"preview_data": "base64_encoded_partial_data",
"dataset_id": "0x...",
"size": 1024
},
"signature": "tee_attestation_signature"
}
}- Client-side encryption before upload to Walrus
- Threshold encryption (2-of-N key servers)
- Policy-based access control via Move smart contract
1. User purchases dataset → PurchaseReceipt created on-chain
2. Build seal_approve transaction with receipt
3. Create session key for decryption
4. Seal client verifies receipt and decrypts
5. Download full decrypted content
- Decentralized blob storage for encrypted datasets
- Content-addressed data (blob_id)
- Supports multiple file types (CSV, images, ZIP archives)
- Integrated with Seal for encrypted storage
- Tracks all active listings
- Enables efficient querying
- Maintains listing state
get_all_listings()- Fetch all listing IDsis_registered()- Check listing existencelistings_count()- Total active listings
- Hardware-based isolation (AWS Nitro Enclaves)
- PCR attestation verification
- Data decrypted only within secure enclave
- Preview data signed by TEE
- Threshold encryption (requires 2-of-N key servers)
- Policy-based access control
- Session keys with TTL expiration
- On-chain verification of purchase receipts
- Only sellers can unlist their datasets
- Purchase receipts verify buyer access for full download
- Preview available to all (limited bytes only)
- Direct payment to seller on purchase
- No escrow required (instant settlement)
- On-chain transaction verification
struct DatasetListing has key, store {
id: UID,
seller: address,
price: u64,
blob_id: String, // Walrus blob ID
encrypted_object: String, // Seal encrypted data (hex)
name: String,
description: String,
preview_size: u64,
total_size: u64,
image_url: String,
is_active: bool,
mime_type: String,
file_name: String,
content_type: String,
file_count: u64,
}struct PurchaseReceipt has key, store {
id: UID,
dataset_id: ID,
buyer: address,
seller: address,
price: u64,
timestamp: u64,
}- Node.js 20+
- pnpm or bun (recommended)
- Sui Wallet (Sui Wallet, Suiet, or Ethos)
- Sui CLI (for contract deployment)
- Clone the repository:
git clone https://github.com/Vietnam-Sui-Builders/datex.git
cd datex- Install dependencies:
bun install
# or
pnpm install- Copy environment template:
cp .env.example .env- Configure environment variables:
NEXT_PUBLIC_SUI_NETWORK=testnet
NEXT_PUBLIC_PACKAGE_ID=0x3ee8141400c1f4accbe52f3be4291e8faf6051dfbaaea794e052a5bbe974884c
NEXT_PUBLIC_REGISTRY_ID=0x6cf4a393c7543d9f7ccc97759bed957c88bd7c8790284a1fa6275f5aa3b51502
NEXT_PUBLIC_ENOKI_API_KEY=your_enoki_api_keybun dev
# or
pnpm devOpen http://localhost:3000 in your browser.
sui client publish --gas-budget 100000000datex/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ │ ├── nautilus/ # Nautilus TEE integration
│ │ └── upload-image/ # Image upload handler
│ ├── marketplace/ # Marketplace pages
│ │ ├── create/ # Create listing page
│ │ ├── dataset/[id]/ # Dataset detail page
│ │ └── my-data/ # User's listings
│ └── page.tsx # Landing page
├── components/ # React components
│ ├── marketplace/ # Marketplace-specific components
│ ├── providers/ # Context providers
│ └── ui/ # Reusable UI components
├── config/ # Configuration files
├── constants/ # Constants and enums
├── contexts/ # React contexts
├── hooks/ # Custom React hooks
├── lib/ # Utility libraries
│ ├── marketplace.ts # Marketplace operations
│ ├── seal.ts # Seal encryption utilities
│ └── walrus-payment.ts # Walrus payment integration
├── types/ # TypeScript type definitions
├── datex-nautilus/ # 🔒 Nautilus TEE Server (Git Submodule)
└── data_marketplace.move # Move smart contract
The datex-nautilus directory is a Git submodule containing the Nautilus TEE (Trusted Execution Environment) server implementation for secure data preview and download.
- GitHub: TaskOpenSystem/datex-nautilus
Datex-Nautilus is built on the Nautilus framework for secure and verifiable off-chain computation on Sui. It provides:
- Reproducible Builds: AWS Nitro Enclave with verifiable PCR values
- Secure Preview: Decrypt and return partial data without exposing full dataset
- Purchase Verification: Verify on-chain purchase receipts before full download
- TEE Attestation: Hardware-based isolation with cryptographic proof
┌─────────────────────────────────────────────────────────────────┐
│ NAUTILUS TEE SERVER │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ AWS NITRO ENCLAVE │ │
│ │ │ │
│ │ • PCR Attestation (PCR0, PCR1, PCR2) │ │
│ │ • Ephemeral Key Generation │ │
│ │ • Seal Protocol Integration │ │
│ │ • Walrus Blob Fetching │ │
│ │ • Secure Decryption │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
│ Endpoints: │
│ • POST /preview - Preview partial decrypted data │
│ • POST /download - Full download (requires purchase proof) │
│ │
└─────────────────────────────────────────────────────────────────┘
# Clone with submodules
git clone --recurse-submodules https://github.com/Vietnam-Sui-Builders/datex.git
# Or initialize submodule after clone
git submodule update --init --recursiveSee datex-nautilus/README.md for detailed build and deployment instructions.
┌─────────────────────────────────────────────────────────────────┐
│ LISTING CREATION FLOW │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. Connect Wallet (Sui Wallet / Suiet / Ethos) │
│ │ │
│ ▼ │
│ 2. Upload File(s) ──► Encrypt with Seal Protocol │
│ │ │
│ ▼ │
│ 3. Store Encrypted Data ──► Walrus (get blob_id) │
│ │ │
│ ▼ │
│ 4. Fill Listing Form (name, description, price, preview image) │
│ │ │
│ ▼ │
│ 5. Submit Transaction ──► Create DatasetListing on Sui │
│ │ │
│ ▼ │
│ 6. Listing Indexed in DatasetRegistry │
│ │ │
│ ▼ │
│ 7. DatasetListed Event Emitted ✓ │
│ │
└─────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ PREVIEW FLOW (FREE) │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. Browse Marketplace ──► Select Dataset │
│ │ │
│ ▼ │
│ 2. Click "Preview" Button │
│ │ │
│ ▼ │
│ 3. Request Sent to Nautilus TEE Server │
│ • dataset_id, blob_id, preview_bytes │
│ │ │
│ ▼ │
│ 4. TEE Processing (Secure Enclave) │
│ • Fetch encrypted blob from Walrus │
│ • Decrypt inside TEE │
│ • Extract preview_bytes only │
│ │ │
│ ▼ │
│ 5. Preview Modal Shows Partial Data │
│ • Animated decryption visualization │
│ • First N bytes of actual data │
│ │ │
│ ▼ │
│ 6. Buyer Verifies Data Quality ✓ │
│ │
└─────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ PURCHASE FLOW │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. Click "Buy" on Dataset │
│ │ │
│ ▼ │
│ 2. Wallet Prompts for Payment (SUI) │
│ │ │
│ ▼ │
│ 3. Payment Transferred to Seller │
│ │ │
│ ▼ │
│ 4. PurchaseReceipt Created (on-chain proof) │
│ │ │
│ ▼ │
│ 5. DatasetPurchased Event Emitted │
│ │ │
│ ▼ │
│ 6. Download via Nautilus (with payment_tx_digest) │
│ • TEE verifies purchase on-chain │
│ • Full data decrypted and returned │
│ │ │
│ ▼ │
│ 7. Buyer Receives Full Decrypted Dataset ✓ │
│ │
└─────────────────────────────────────────────────────────────────┘
- Data Monetization: Researchers and data providers can sell datasets directly to buyers with guaranteed payment
- AI/ML Training Data: Purchase verified training datasets for machine learning models after previewing sample data
- Market Research: Access consumer behavior and market trend data with quality verification
- Healthcare Data: Secure exchange of anonymized medical datasets with TEE-protected preview
- Financial Data: DeFi analytics and on-chain data products with transparent pricing
- Mainnet deployment
- Enhanced preview options (more bytes, specific columns for CSV)
- Seller verification and reputation system
- Rating and review system for datasets
- Subscription-based access for data streams
- Data licensing options (commercial, research, etc.)
- Multi-chain support (other Move-based chains)
- DAO governance for marketplace fees
- Bulk purchase discounts
- Data update notifications for buyers
- Sui Documentation
- Walrus Documentation
- Seal Documentation
- Nautilus TEE Documentation
- Enoki Documentation
This project was built by:
![]() Huỳnh Long Phú 💬 Telegram |
![]() Nguyễn Tuấn Anh 💬 Telegram |
![]() Nguyễn Mạnh Việt Khôi 💬 Telegram |
![]() Trần Anh Tuấn 💬 Telegram |
![]() Đặng Hoàng Lâm 💬 Telegram |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is built for hackathon purposes. Please check with the repository owner for licensing details.
For bugs or feature requests, please open an issue on GitHub.
Built with ❤️ on Sui Blockchain




