Model Marketplace

The Model Economy on PandaChain

PandaChain is the first blockchain with native machine learning built into the smart contract runtime. This creates a unique opportunity: an on-chain economy around ML models where models are deployed, monetized, traded, and composed as financial assets.

The model marketplace is built from several interconnected contracts:

ComponentPurpose
PaidModelSimple pay-per-prediction monetization
TokenizedModelModel + bonding curve token + dividends
ModelExchangeOrder book trading for model tokens
ModelIndexIndex fund holding a basket of model tokens
CompetitionHubKaggle-style competitions that discover top models

Paid Inference vs Tokenized Models

PandaChain offers two approaches to monetizing ML models. Choose based on your use case:

Paid Inference (PaidModel)

Best for: Utility models where users just want predictions.

  • Deploy model, set a price per call
  • Users pay and get predictions
  • Revenue goes directly to the owner
  • Simple, no token overhead
  • Owner retains full control (retrain, update price, withdraw)

Example use cases:

  • Fraud detection API
  • Price prediction oracle
  • Spam filtering service
  • Credit scoring

Tokenized Models (TokenizedModel)

Best for: Models that benefit from community ownership and investment.

  • Model is wrapped in a PRC-20 token
  • Bonding curve provides automatic liquidity
  • Inference fees are distributed as dividends to all holders
  • Tokens can be traded on the ModelExchange
  • Creates speculation and investment opportunities

Example use cases:

  • High-accuracy models with broad demand
  • Community-funded model development
  • Model portfolios and index funds
  • Speculative AI asset trading

Decision Guide

FactorPaidModelTokenizedModel
ComplexityLowHigh
Revenue modelDirect to ownerShared with holders
LiquidityN/ABonding curve + exchange
CommunityUsers onlyInvestors + users
Price discoveryOwner-setMarket-driven
ComposabilityLowHigh (index funds, DeFi)

Competition to Marketplace Flywheel

The model economy on PandaChain creates a virtuous flywheel:

  1. Compete -- Data scientists enter Kaggle-style competitions on the CompetitionHub, training models on real datasets with prize pools
  2. Deploy -- Winning models are deployed as PaidModel or TokenizedModel contracts, making them available for inference
  3. Monetize -- Users pay for predictions, generating revenue for model creators and token holders
  4. Trade -- Model tokens are traded on the ModelExchange, creating a liquid market for AI assets
  5. Index -- Top models are bundled into ModelIndex funds, allowing diversified exposure to the AI economy
  6. Repeat -- Revenue and trading activity attracts more data scientists to compete, improving model quality
Competitions --> Trained Models --> Deployed Contracts
     ^                                      |
     |                                      v
     |                              Paid Inference
     |                                      |
     |                                      v
Prize Pools <-- Trading Revenue <-- Model Tokens

Model Registry

All deployed models (both PaidModel and TokenizedModel) can register with the on-chain ModelRegistry contract, which provides:

  • Discovery -- Browse all registered models by category, accuracy, and revenue
  • Metadata -- Name, description, category, accuracy, pricing info
  • Stats -- Total calls, revenue, unique users, token supply
  • Verification -- Models can be verified by the community (upvotes, audits)
from panda import contract, constructor, call, query, event


@contract
class ModelRegistry:
    """Central registry for all deployed ML models."""

    class State:
        models: dict = {}       # address -> metadata
        categories: dict = {}   # category -> [addresses]

    @call
    def register(self, ctx, model_address: str, name: str, category: str, model_type: str):
        """Register a model. model_type is 'paid' or 'tokenized'."""
        self.state.models[model_address] = {
            "name": name,
            "category": category,
            "model_type": model_type,
            "registered_by": ctx.sender,
            "registered_at_block": ctx.block_number,
        }
        if category not in self.state.categories:
            self.state.categories[category] = []
        self.state.categories[category].append(model_address)
        self.emit(event.ModelRegistered(address=model_address, name=name))

    @query
    def get_model(self, address: str) -> dict:
        return self.state.models.get(address, {})

    @query
    def get_by_category(self, category: str) -> list:
        addresses = self.state.categories.get(category, [])
        return [{"address": a, **self.state.models[a]} for a in addresses if a in self.state.models]

    @query
    def get_all(self) -> list:
        return [{"address": a, **meta} for a, meta in self.state.models.items()]

Getting Started

For Data Scientists

  1. Train a model using the ML Contracts guide
  2. Choose between PaidModel (simple) or TokenizedModel (community-owned)
  3. Deploy using the Paid Inference or Tokenized Models guide
  4. Register on the ModelRegistry for discoverability
  5. Monitor usage and revenue via the explorer dashboard

For Investors

  1. Browse the Model Exchange at /app/models to find high-performing tokenized models
  2. Buy tokens via bonding curves to invest in promising AI
  3. Earn dividends from inference fees proportional to your holdings
  4. Trade on the order book for price appreciation
  5. Diversify with ModelIndex funds

For Developers

  1. Integrate model predictions into your dApps using the SDK
  2. Compose model tokens with other DeFi primitives (lending, options, etc.)
  3. Build custom interfaces using the RPC wrappers
  4. Create new model types by extending the base patterns

See the SDK Reference for complete API documentation.