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:
| Component | Purpose |
|---|---|
| PaidModel | Simple pay-per-prediction monetization |
| TokenizedModel | Model + bonding curve token + dividends |
| ModelExchange | Order book trading for model tokens |
| ModelIndex | Index fund holding a basket of model tokens |
| CompetitionHub | Kaggle-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
| Factor | PaidModel | TokenizedModel |
|---|---|---|
| Complexity | Low | High |
| Revenue model | Direct to owner | Shared with holders |
| Liquidity | N/A | Bonding curve + exchange |
| Community | Users only | Investors + users |
| Price discovery | Owner-set | Market-driven |
| Composability | Low | High (index funds, DeFi) |
Competition to Marketplace Flywheel
The model economy on PandaChain creates a virtuous flywheel:
- Compete -- Data scientists enter Kaggle-style competitions on the CompetitionHub, training models on real datasets with prize pools
- Deploy -- Winning models are deployed as PaidModel or TokenizedModel contracts, making them available for inference
- Monetize -- Users pay for predictions, generating revenue for model creators and token holders
- Trade -- Model tokens are traded on the ModelExchange, creating a liquid market for AI assets
- Index -- Top models are bundled into ModelIndex funds, allowing diversified exposure to the AI economy
- 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
- Train a model using the ML Contracts guide
- Choose between PaidModel (simple) or TokenizedModel (community-owned)
- Deploy using the Paid Inference or Tokenized Models guide
- Register on the ModelRegistry for discoverability
- Monitor usage and revenue via the explorer dashboard
For Investors
- Browse the Model Exchange at
/app/modelsto find high-performing tokenized models - Buy tokens via bonding curves to invest in promising AI
- Earn dividends from inference fees proportional to your holdings
- Trade on the order book for price appreciation
- Diversify with ModelIndex funds
For Developers
- Integrate model predictions into your dApps using the SDK
- Compose model tokens with other DeFi primitives (lending, options, etc.)
- Build custom interfaces using the RPC wrappers
- Create new model types by extending the base patterns
See the SDK Reference for complete API documentation.