# Litepaper

Summary

The Litepaper introduces a decentralized AI model service solution designed to overcome the limitations of centralized AI service providers. It introduces the concept of AI shard on the TOP AI Network, which provides a platform where model providers and users can interact securely and freely. The AI shard tackles issues like censorship, lack of model diversity, data privacy concerns, and high computational costs.

Key features of the AI shard:

* Censorship-resistant models and computing power
* Data privacy protection with technologies like Zero-Knowledge Proofs
* Permanent data ownership through blockchain and decentralized storage
* A transparent and traceable system with permanent records

The ecosystem has three main participants: AI application developers, model providers, and computing nodes.

Developers pay for model services, and model providers pay computing nodes for their services. The system uses token mining rewards to incentivize model providers and computing nodes based on their contributions.

The AI shard aims to make AI models and computing power more accessible, promoting innovation and efficiency in AI applications.


# Objective

> Models are the best carriers of knowledge, making them a must-have for all.

The AI model technology that emerged in 2023 has fundamentally transformed the way people learn and utilize knowledge, making models efficient vehicles for various types of knowledge and skills dissemination.

Beyond generative models like Chat-GPT, there is significant value in specialized small-scale models tailored to specific domains. These models carry specific expertise, requiring less computational resources and exhibiting lower probabilities of generative hallucinations compared to generative models, thereby serving specific demographics with precision. Moreover, for individuals, this represents a novel way to share and propagate knowledge, addressing broader demands.

For enterprises, modelizing accumulated business and customer data facilitates effortless data mining and deeper analyses. By leveraging the conclusions and recommendations provided by models, businesses can enhance product and service offerings to external clients and optimize internal management decision-making processes, significantly improving operational efficiency.

TOP AI aims to enable every individual to easily own and manage their own models, facilitating the application of knowledge. We are establishing a secure, transparent, and cost-effective model service marketplace, ensuring fair benefits for all participants within the network, thereby maximizing the flow of knowledge and the value of models.


# Problem

Currently, both model training and inference are provided by centralized service providers. However, their services have the following issues:

* **Inability to use models freely:**
  * Models provided by centralized service providers face licensing and censorship restrictions. The models' ability to answer questions is limited, leading to diminished user experience.
* **Lack of free circulation of models:**
  * Centralized model hosting providers impose various reviews on the models they host, restricting normal model providers from offering their models freely.
* **Lack of model diversity:**
  * Centralized service providers often create models to address general problems, while real user needs are diverse and require more customized models from different providers.
* **Data privacy concerns:**
  * When centralized providers obtain training data, there are risks of data loss or unauthorized misuse. This high-quality data is often the core asset of enterprises or individuals and must be safeguarded.
  * When engineers fine-tune models on centralized platforms, the fine-tuned models are often shared with other users for cost and profit maximization. Private data can easily be leaked through specially constructed prompts, which is unacceptable.
* **High computational costs:**
  * Small to medium-sized users often cannot afford expensive GPU equipment necessary for large-scale AI training. Current cloud services do not significantly reduce these costs.


# Solution

To address the aforementioned issues, we propose a decentralized model service solution. This approach enables model providers to circumvent centralized censorship, ensuring the freedom and diversity of model publishing and usage. By introducing decentralized idle computing power and leveraging token-based economic incentives, we can reduce the actual cost for users.

We will implement this concept by adding a new AI shard on TOP AI chain. Utilizing sharding will significantly lower our blockchain development costs, allowing us to focus on developing various deep learning frameworks, decentralized computing resource management, and model management functionalities required by the shard. We will use advanced zero-knowledge proof technology to protect models in untrusted environments, preventing attacks and tampering, and ensuring comprehensive data security and privacy through multi-layered security measures.

Ultimately, anyone can participate as a model provider and freely offer their models. The involvement of computing nodes not only reduces computing costs but also ensures the censorship resistance of the models.

<figure><img src="https://1425439363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB81qT4drxRUg36aBggqS%2Fuploads%2FqZXPKAhptc6wddRvDYx7%2FAI%E8%8A%82%E7%82%B9%E6%A8%A1%E5%9D%97%E5%9B%BE.png?alt=media&amp;token=d5760fb2-25b2-4dca-abe1-e902753d7829" alt=""><figcaption></figcaption></figure>

### AI Shard on TOP AI

The AI shard of TOP AI will inherit the sharding technology of TOP AI Network and operate in parallel with the other four main shards and one EVM shard. Within the three-layer network architecture, it will also support high-speed, high-volume, and low-cost transactions.

TOP AI Network already has a token incentive mechanism that effectively supervises and promotes the work of nodes within the network. In the AI shard, we will need to enhance the nodes with computing power capabilities to expand their model functionalities, enabling them to meet high-level privacy protection scenarios, and supporting tamper-proof and leakage prevention for input data and output results.

Additionally, we will focus on the following core technical solutions to achieve the necessary functions for the AI shard, enhancing the system's security, scalability, and reliability.

* **Freely Providing Censorship-Resistant Models**: Through decentralized architecture, censorship-resistant computing power, and censorship-resistant models, we ensure that model developers and users are free from control or interference by any single entity, allowing them to freely provide and use models.
  * **Model Censorship Resistance**: Model providers can publish models freely, and AI application developers can use them without censorship, ensuring model security and accessibility.
  * **Computing Power Censorship Resistance**: Providing censorship-resistant computing resources through a decentralized computing power network ensures the privacy, security, and non-interference of model training and operation.
* **Data Privacy Protection and Trustworthy Results**: Utilizing technologies such as Zero-Knowledge Proofs (ZKPs) and Homomorphic Encryption to ensure data privacy during transmission and processing, as well as the correctness and trustworthiness of model execution results. Fine-tuned models can be independently deployed and used, protecting the privacy of the fine-tuned details.
* **Permanent Data Sovereignty**: Through blockchain technology and decentralized storage, users and developers can fully control and own their data, ensuring its long-term accessibility and security, avoiding data monopolies by centralized platforms and data loss due to platform shutdowns.
* **Unlimited Model Supply**: A decentralized platform that requires no authorization, allowing anyone to participate as a model provider to meet various needs.
* **Transparency**: Utilizing the immutability and public transparency of blockchain to record model relevant operations and transactions, ensuring the system's transparency and traceability, and preventing fraud and misconduct.

### Participants

<figure><img src="https://1425439363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB81qT4drxRUg36aBggqS%2Fuploads%2FjX1XI9BZaaUrrokrqHHp%2FAIShard%E7%BB%93%E6%9E%84.png?alt=media&amp;token=3591fa97-bf99-43f2-bc1e-86662978d6ec" alt=""><figcaption></figcaption></figure>

Based on the aforementioned solutions and concepts, there are three main participants within the TOP AI shard: AI application developers, model providers, and computing nodes.

1. **AI Application Developers**: These are the users of the models, who can call upon any model published on TOP AI.
2. **Model Providers**: These are the creators of the models, who can freely publish their models on TOP AI for external use.&#x20;
3. **Computing Nodes**: These are miners providing high-performance computing power, enabling AI models to run and produce the expected data results.

### How it works

Model providers submit their trained models to AI shard. The models are then automatically distributed to various computing nodes for functionalities reviews and result consensus. AI application developers send requests to the AI shard to invoke these models. After scheduling, the requests are submitted to the appropriate computing nodes for execution, and the final results are returned to the AI application developers.

<figure><img src="https://1425439363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB81qT4drxRUg36aBggqS%2Fuploads%2FSiA7BmWvlr3vHgJE5ufJ%2FAIShard%E6%B5%81%E7%A8%8B-crop.png?alt=media&amp;token=d7ce1b57-e03c-4210-b5a9-b880b7432225" alt=""><figcaption></figcaption></figure>

In AI shard, the participation process for each role is meticulously designed to ensure efficiency, security, and transparency throughout the system. The specific working principles are as follows:

1. **Model Upload by Model Providers**:
   * Model providers first upload their models to AI shard on TOP AI Network. This step is fundamental to integrating the models into the system.
   * Once uploaded, the models undergo rigorous review and verification by the computing nodes on AI shard to ensure the integrity and security of the models, preventing malicious models from harming the system.
2. **Task Scheduling and Resource Allocation**:
   * After a model is verified, the AI shard receives task requests from AI application developers.
   * These tasks are then scheduled to the most suitable computing nodes based on algorithm matching and resource availability to ensure efficient execution in a trusted execution environment.
3. **Execution and Result Storage**:
   * The computing nodes execute the requested tasks by invoking the corresponding models and verifying the results.
   * Once verification is successful, the relevant verification information is recorded on AI shard. This step ensures the transparency and traceability of the results, providing a guarantee for system reliability.
4. **Results Returned to AI Application Developers**:
   * Finally, the AI application developers receive the computation results they requested. These results can be used for further analysis, operations, or decision-making.


# Business Logic

In a decentralized manner, although there are more participants providing models and computing services, we maintain a relatively simple payment structure. AI application developers pay model providers for model services. Model providers pay computing nodes for computing services. Additionally, these real business activities drive the prosperity of AI shard, so the AI shard will also provide token mining incentives to the two core participants: model providers and computing nodes.

### Model and Computing Service Fees

AI application developers pay model service fees directly to model providers without considering the complex pricing logic of the underlying computing power. Model providers pay computing nodes for the computing services necessary for the deployment and operation of their models.

Model service fees are freely priced by model providers. The service fees for computing nodes are determined by the platform based on objective parameters such as device type, runtime duration, and computing power rental market rates.

This creates a relatively fair business structure:

* AI application developers only need to focus on their model service fees.
* Computing nodes only need to focus on their computing service fees.
* Model providers set the pricing for their model services. Higher quality models can command higher prices, and those models attract more users, driving up the revenues of model providers.

### **AI Shard Mining Incentives**

As one of the shards of on TOP, AI shard shares mining rewards with the other shards. Due to the different nature of its business, the AI shard has a dedicated token incentive mechanism inside, which includes:

* Online Duration Mining Rewards: This represents a relatively stable income, determined by the basic status of the network, and reflects the economic base income provided by computing nodes maintaining the network. Model providers do not participate in this distribution.
* Task Mining Rewards: These are positively correlated with the actual AI task volume and are additional rewards allocated by the network upon the completion of AI tasks. Since the volume of real external business can vary, task mining rewards represent the token economy expansion brought by the network handling real business and are shared by both model providers and computing nodes.
* Model Launch Rewards: Model providers receive a one-time model upload reward upon the successful launch of a model. The condition for success is that the model must pass a trial run by the computing nodes.

### Summary

Therefore, for computing nodes, the total revenue within the AI shard consists of three parts:

{% hint style="info" %}
Online Duration Mining Reward + Task Mining Reward + Computing Service Fees
{% endhint %}

For model providers, the total revenue within the AI shard is:

{% hint style="info" %}
Task Mining Reward + Model Launch Reward + Model Service Fees - Computing Service Fees
{% endhint %}


# Economic Distribution on TOP AI

The TOP token was issued by the Telos Foundation when the TOP mainnet was launched and has been running smoothly for over three years. The Telos Foundation represents the interests of the TOP AI Network and, with the support of the AI Lab, has jointly driven TOP's development towards AI by adding an AI shard to support real, high-frequency application services.

After the addition of the new shard, the annual Token mining mechanism at the top level of the beacon chain remains unchanged:

{% hint style="info" %}
Total reward in the Nth year = Max (remaining reserved reward at the beginning of the Nth year\*8%, 2%\*20 billion)
{% endhint %}

The distribution of the mining reward pool remains largely unchanged with 20% allocated as staking rewards, 76% as miner workload rewards, and 4% as on-chain governance committee rewards.

The original shards continue to handle the underlying transfer and transaction consensus functions. The AI shard receives a proportion of the mining reward pool, with a share of 76% \* R, while the original shards receive 76% \* (1 - R).

To support the business expansion of the new shard, Telos Foundation will provide additional funding to the AI shard, gradually decreasing from the first year until the end of the third year. Computing nodes in AI shard will receive significantly higher rewards compared to nodes in the original shards.

> Assuming R = 80%

| Year of AI Shard Launch | Estimated Annual Total Mining for TOP | Estimated Mining for AI Shard | Foundation Subsidy |
| ----------------------- | ------------------------------------- | ----------------------------- | ------------------ |
| 1                       | 473,440,000                           | 287,851,520                   | To be determined   |
| 2                       | 435,560,000                           | 264,820,480                   | To be determined   |
| 3                       | 400,720,000                           | 243,637,760                   | To be determined   |


