PRIV ProtocolPRIV Docs
Dataxchange

Listing Datasets

Learn how to list your data on the DataXchange marketplace.

Prerequisites

Before listing data:

  1. PRIV Plugin installed: With data collection enabled
  2. Wallet connected: To receive payments
  3. Sufficient data: At least 1,000 data points

Creating a Listing

Step 1: Prepare Your Data

Export your data from the PRIV plugin:

  1. Open the PRIV plugin
  2. Go to "My Data" > "Export"
  3. Select date range and categories
  4. Click "Prepare for Marketplace"

The plugin automatically:

  • Anonymizes wallet addresses
  • Applies k-anonymity (k=50 default)
  • Encrypts the dataset
  • Generates metadata

Step 2: Set Pricing

Choose your price based on:

FactorImpact
Data points50,000+ = premium
Time range30+ days = premium
Category demandDeFi/NFT = high demand
UniquenessRare protocols = premium

Suggested pricing:

Dataset SizeSuggested Price
1,000 - 10,000 points10-50 PRIV
10,000 - 50,000 points50-200 PRIV
50,000 - 100,000 points200-500 PRIV
100,000+ points500+ PRIV

Step 3: Add Metadata

Provide clear descriptions:

{
  "title": "DeFi Trading Activity - January 2024",
  "description": "Comprehensive swap and LP data from major DEXs on Base",
  "category": "defi_trading",
  "events": ["swap", "lp_add", "lp_remove", "stake"],
  "protocols": ["uniswap", "aerodrome", "balancer"],
  "chains": [8453],
  "timeRange": {
    "start": "2024-01-01",
    "end": "2024-01-31"
  },
  "dataPoints": 75000,
  "schema": {
    "fields": ["timestamp", "event", "tokens", "amounts", "user_hash"],
    "types": ["datetime", "string", "array", "array", "string"]
  }
}

Step 4: Review Sample

A sample is automatically generated for buyer preview:

{
  "sample": [
    {
      "timestamp": "2024-01-15T10:30:00Z",
      "event": "swap",
      "tokens": ["ETH", "USDC"],
      "amounts": ["1.5", "2500"],
      "user_hash": "anon_abc123"
    }
  ],
  "sampleSize": 10,
  "totalSize": 75000
}

Step 5: Submit Listing

  1. Review all details
  2. Sign the transaction
  3. Pay gas fee (~$0.05 on Base)
  4. Listing goes live immediately

Listing via API

For programmatic listing:

import { DataXchange } from '@priv/contracts'

async function createListing(data: Buffer, metadata: Metadata) {
  // 1. Encrypt data
  const { encryptedData, encryptionKey } = await encrypt(data)

  // 2. Upload to IPFS
  const dataHash = await ipfs.add(encryptedData)

  // 3. Store encryption key securely
  await secureStorage.set(dataHash, encryptionKey)

  // 4. Create on-chain listing
  const listingId = await dataXchange.createListing(
    dataHash,
    parseEther('100'),     // 100 PRIV
    metadata.dataPoints,
    calculateTimeRange(metadata),
    keccak256(metadata.category)
  )

  return listingId
}

Data Requirements

Required Fields

Every dataset must include:

FieldTypeDescription
timestampdatetimeEvent time (ISO 8601)
eventstringEvent type
user_hashstringAnonymized user ID

Additional fields increase value:

FieldTypeDescription
tokensarrayInvolved tokens
amountsarrayTransaction amounts
protocolstringdApp/protocol name
chain_idnumberBlockchain ID
tx_hash_prefixstringFirst 8 chars of tx hash

Prohibited Data

Never include:

  • Raw wallet addresses
  • Private keys or seed phrases
  • Passwords or auth tokens
  • Personal identifiable information (PII)
  • Exact transaction hashes

Anonymization

Automatic Anonymization

The PRIV plugin applies:

  1. Address Hashing

    0x742d35Cc6634C0532925a3b844Bc9e7595f01234
    → anon_a1b2c3d4e5f6...
  2. Timestamp Bucketing

    2024-01-15T10:32:47Z
    → 2024-01-15T10:30:00Z (5-min buckets)
  3. Amount Bucketing

    1.7823 ETH → 1-2 ETH range

K-Anonymity

Each record is indistinguishable from k-1 others:

Before k-anonymity:
User A: Swapped 1.5 ETH for USDC at 10:30

After k-anonymity (k=50):
Group of 50 users: Swapped 1-2 ETH for stablecoins between 10:00-11:00

Updating Listings

Change Price

await dataXchange.updateListing(listingId, newPrice, true)

Via plugin:

  1. Go to "My Listings"
  2. Click listing
  3. Update price
  4. Sign transaction

Pause Listing

Temporarily hide from marketplace:

await dataXchange.updateListing(listingId, currentPrice, false)

Remove Listing

Permanently delete:

await dataXchange.cancelListing(listingId)

Cancelled listings cannot be restored. Create a new listing if needed.

Best Practices

Pricing

  • Research similar listings for market rates
  • Start lower to build reputation
  • Increase prices as you gain reviews

Metadata

  • Write clear, specific descriptions
  • List all included events and protocols
  • Be honest about data limitations

Quality

  • Ensure high completeness (95%+)
  • Cover meaningful time ranges
  • Include diverse event types

Updates

  • Consider creating new listings for fresh data
  • Monitor your listings for questions
  • Respond to disputes promptly

Earnings

Tracking Earnings

View in plugin:

  1. Go to "DataXchange" > "My Earnings"
  2. See pending and withdrawn amounts
  3. Track sales by listing

Withdrawing

  1. Click "Withdraw"
  2. Enter amount (or "Max")
  3. Confirm transaction
  4. PRIV arrives in wallet

No minimum withdrawal. Instant settlement.

Taxes

DataXchange earnings may be taxable income. Export earnings data for tax reporting.

Next Steps