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.
Live Demo ยท Documentation ยท Report Bug
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:
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




