Overview

Our vector database enables AI-powered search and similarity matching for marketplace assets while maintaining decentralization through SUI blockchain and Walrus storage. Key features include:
  • Token incentives for vector data contributions
  • Decentralized storage with Byzantine fault tolerance
  • Built-in marketplace integration
  • Verifiable search results

Key Benefits

For AI Developers

  • • Build token-incentivized AI apps
  • • Access verified vector datasets
  • • Pay only for storage used
  • • Verifiable search results

For Data Contributors

  • • Earn tokens for vector data
  • • Track usage and revenue
  • • Automated reward distribution
  • • Built-in data marketplace

Architecture

Getting Started

Quick Start

from kyne.vector import VectorDB
from kyne.wallet import KyneWallet

# Initialize with wallet for rewards
db = VectorDB(
    wallet=KyneWallet.from_private_key("0x..."),
    config={
        "reward_share": 0.1,  # Share for data contributors
        "min_stake": 100      # Min SUI tokens to contribute
    }
)

# Create collection with token incentives
collection = await db.create_collection(
    name="embeddings",
    dimension=768,
    rewards_config={
        "base_reward": 10,     # SUI per contribution
        "usage_share": 0.05    # 5% of usage fees
    }
)

# Add vectors and earn tokens
result = await collection.add(
    vectors=embeddings,
    metadata=metadata,
    stake_amount=100  # Stake SUI tokens
)
print(f"Earned rewards: {result.rewards} SUI")

Vector Management

Adding Vectors

  1. Prepare Data
    # Stake tokens and add vectors
    await collection.add_vectors(
        vectors=embeddings,
        stake_amount=1000,    # SUI tokens
        metadata={
            "source": "training_data_v1",
            "quality_score": 0.95
        }
    )
    
  2. Configure Storage
    # Set storage parameters
    await collection.configure_storage(
        min_nodes=7,     # 2f+1 for fault tolerance
        epochs=12,       # Storage duration
        redundancy=2     # Red Stuff encoding level
    )
    
  3. Monitor Rewards
    # Track earnings
    stats = await collection.get_contributor_stats()
    print(f"Total rewards: {stats.total_rewards}")
    print(f"Active stake: {stats.staked_amount}")
    

Search Operations

Basic Search

# Search with token payment
results = await collection.search(
    vector=query,
    top_k=10,
    payment_amount=1  # SUI per query
)

Batch Operations

# Bulk search with rewards
async for batch in collection.batch_search(
    vectors=queries,
    reward_config={
        "per_query": 0.1,  # SUI tokens
        "bulk_bonus": 0.2  # 20% bonus
    }
):
    process_results(batch)

Token Economics

Reward System

Contribution Rewards

# Configure rewards
await collection.set_rewards({
    "base_rate": 10,      # SUI per vector
    "quality_bonus": 0.2,  # 20% for high quality
    "stake_bonus": 0.1    # 10% for staking
})

Usage Fees

# Set usage pricing
await collection.set_usage_fees({
    "query_fee": 1,       # SUI per query
    "bulk_discount": 0.2, # 20% for bulk
    "min_stake": 100     # Required stake
})

Staking Mechanics

# Configure staking parameters
await collection.configure_staking({
    "min_stake": 1000,     # Minimum SUI tokens
    "lock_period": 30,     # Epochs
    "reward_share": 0.7,   # 70% to stakers
    "slashing_rate": 0.1   # 10% for violations
})

# Monitor staking returns
stake_info = await collection.get_stake_info()
print(f"APY: {stake_info.apy}%")
print(f"Total staked: {stake_info.total_staked}")

Security & Performance

Data Protection

Performance Optimization

  1. Query Optimization
    • Efficient vector indexing
    • Parallel search operations
    • Result caching
    • Load balancing
  2. Storage Efficiency
    • Red Stuff encoding
    • Optimal chunk sizes
    • Proof verification
    • Node health monitoring
  3. Economic Efficiency
    • Dynamic pricing
    • Reward optimization
    • Stake management
    • Fee distribution

Next Up

Kyne enables developers to build powerful desktop applications while providing comprehensive guides for getting started.