Smart contracts list
These contracts and library together form a modular, on-chain ecosystem enabling the creation, governance, monetization, and lifecycle management of datasets, models, agents, and services.
Contract Name : Agent contract
Description : The Agent contract represents a digital asset that can earn income through usage (e.g., model inference requests, data queries). It integrates with a Subnet and IAsset interface, storing relevant metadata, pricing details, and references to associated datasets and parent models. The contract is designed to receive incoming payments, set and update its price, toggle public accessibility, and implement a fee distribution mechanism among various stakeholders (such as data contributors, model owners, and the agent itself).
Use Cases:
On-Chain Asset Representation: Representing and monetizing computational agents, machine learning models, or services.
Fee Collection and Distribution: Receiving payments for services and distributing them among different parties based on predefined percentages.
Flexible Monetization Strategies: Adjusting asset pricing and toggling public or restricted access to the agent’s functionalities.
Contract Name : AgentFactory
Description : AgentFactory streamlines the deployment of Agent contracts by providing a straightforward interface for creating new agents or forking existing ones. When a new Agent is deployed or forked, corresponding events are emitted to aid in external indexing and monitoring.
Use Cases :
Mass Deployment: Quickly spinning up multiple agent instances without manual redeployment steps.
Agent Lifecycle Management: Easily forking existing agents for experimentation, versioning, or customization.
Contract Name : Dataset
Description : The Dataset contract represents a data resource within the ecosystem. It leverages OpenZeppelin’s AccessControl to restrict certain operations—such as setting public visibility or updating the price—to authorized roles. It can also manage fee distribution from dataset usage. By linking to a Subnet, the contract enables integration into a broader network of governance, access, and staking.
Use Cases :
Data Resource Management: Storing URIs, controlling data access, and pricing for datasets.
Fee and Access Control: Ensuring only authorized owners can set fees and toggle public access.
On-Chain Dataset Monetization: Defining the price for dataset usage and orchestrating fee distribution among contributors.
Contract Name : DatasetFactory
Description : DatasetFactory provides a mechanism to create new Dataset instances efficiently. Emitting events upon dataset creation allows external systems to track newly introduced data resources.
Use Cases :
Scalable Data Onboarding: Quickly registering multiple datasets to the platform.
Integration with Indexers and Front-Ends: Emitted events help external tools keep track of all newly registered datasets.
Contract Name : Service
Description : The Service contract is a generalized framework for deployable services—such as models or agents—that require a deployment fee and operate for a limited lifetime. This ensures that services are not deployed indefinitely without cost and can be removed once their usefulness expires.
Use Cases :
Pay-to-Deploy Services: Enforcing an economic barrier to entry ensures only meaningful services are deployed.
Lifecycle Management: Defining a fixed lifetime encourages dynamic updates, avoiding service stagnation.
Contract Name : Settlement
Description : The Settlement contract manages receipts of financial transactions. A BatchReceipt can contain multiple individual Receipt entries along with a cryptographic proof (worker’s signature) to ensure authenticity and integrity. Submitting these batch receipts creates a transparent and tamper-resistant on-chain record of transactions.
Use Cases :
Auditable Payment Records: Storing immutable proofs of payment and ensuring transparent transaction logs.
Accounting and Reconciliation: Supporting off-chain/third-party auditing tools to verify payment integrity and correctness.
Contract Name : Subnet
Description : Subnet is a governance and management layer for a decentralized community. It uses AccessControl to handle operator and contributor roles, allowing operators to add, remove, suspend, or resume members. The contract supports different governance types—invite-only, permissionless, and permissioned—tailoring how new members join. It also lays the groundwork for staking mechanisms to activate or maintain membership.
Use Cases :
Decentralized Governance: Defining how communities grow, manage membership, and resolve disputes.
Flexible Membership Models: Accommodating invite-only or application-based membership processes.
Stake-Based Participation: Encouraging alignment of interests via staking tokens to maintain active status.
Contract Name : SubnetRegistry
Description : The SubnetRegistry contract serves as a directory for registered Subnets. It enables the creation of new Subnets and plans to incorporate life cycle operations like suspending or resuming a Subnet. By offering a centralized point of reference, it simplifies the management and indexing of multiple Subnets in the ecosystem.
Use Cases :
Centralized Governance Indexing: Providing a single entry point to discover and track all active Subnets.
Lifecycle Controls: Temporarily suspending or resuming Subnets in response to governance actions or security concerns.
Contract Name : TestUSD
Description : The TestUSD contract is a mock token, primarily for testing and development scenarios. Although no token logic is implemented here, it can serve as a template or placeholder asset for integration testing, ensuring that models, agents, and datasets interact correctly with on-chain assets.
Use Cases :
Integration Testing: Simulating token-based operations (such as payments or staking) in a controlled environment.
Development Sandbox: Experimenting with asset-related functionalities before deploying a production-grade token contract.
Contracts coming in Phase 2 (in progress)
Contract Name : JobManager will allow creating and managing jobs related to model fine-tuning, model deployment, and agent deployment. It can also update job progress, serving as a central coordination point for complex workflows.
Use Cases :
Workflow Coordination: Creating separate tasks and jobs such as training models, deploying agents, or updating model versions.
Progress Tracking: Ensuring transparency and status visibility for each job type.
Contract Name : Model contract represents a machine learning model. It stores metadata (such as repository name and version), references datasets it depends on, and can have parent models. It includes functions for setting prices, controlling public access, deploying/undeploying the model, and distributing fees to stakeholders.
Use Cases :
Model Commercialization: Monetizing and enforcing access control on ML models.
Version Control and Lineage Tracking: Keeping track of model improvements, updates, and parent-child relationships between models.
Deployment Management: Handling model deployment and undeployment on-chain, ensuring trustless operation and fee distribution.
Contract Name : ModelFactory will provide a simplified process for creating new Model instances. It emits events when new models are registered, helping external services track the growth of the model catalog.
Use Cases :
Rapid Model Initialization: Quickly registering multiple models for various use cases without manually deploying each one.
Ecosystem Growth Monitoring: Events facilitate indexing and management of a large model ecosystem.
===============================================================
Note :
There is also a library named "KiteTypes" that defines standardized data structures for use across the ecosystem.
DatasetUsage describes the economic and percentage-based relationships between a model/agent and the datasets it consumes.
FeeDistribution structures allow contracts to define how fees and revenues are split among various stakeholders.
Use Cases:
Shared Data Models: Ensuring consistent types for usage, fees, and percentages across multiple contracts.
Revenue-Sharing Logic: Standardizing fee distribution logic to reduce code duplication and improve reliability throughout the ecosystem.
Last updated