# Management Node

Management Nodes include two modules: the Workload Module and the Reward Module. A single node can host one or both of these modules simultaneously.

The Workload Module is responsible for managing tasks within the zkAgent Network. When an agent submits an AI task, the Workload Module publishes this task on a public Bounty Board visible to all Worker Nodes.

If one or more Worker Nodes are interested in taking on the task, they submit applications to the Workload Module through their Mining Modules. The Mining Module uses Long Short-Term Memory (LSTM) neural networks to evaluate its own hardware configuration (performance) and task completion history to determine whether to bid for a task.

LSTM is a type of recurrent neural network (RNN) designed to handle sequential data and learn long-term dependencies. It is particularly effective at analyzing time-series data, such as the historical performance of Worker Nodes. By leveraging LSTM, the Mining Module can make data-driven decisions about its capability to handle specific tasks, ensuring optimized bidding behavior.

Upon receiving these applications, the Workload Module evaluates them based on predefined criteria such as the Worker Nodes' capabilities, availability, and performance history.

The task evaluation process is fundamentally a crowdsourcing mechanism designed to assess the performance, integrity, and activity level of Worker Nodes within the network, ultimately aiming to reduce task failure rates.

Crowdsourcing is a collaborative approach where tasks or problems are distributed to a large group of individuals or entities, leveraging their collective resources, expertise, and input. In the context of the zkAgent Network, the crowdsourcing model allows for the distributed assessment and delegation of tasks, improving efficiency and reducing risks through decentralized decision-making.

The Workload Module combines LSTM and Graph Convolutional Networks (GCN) to evaluate task applications. LSTM is employed to address the time-series nature of data, such as the historical performance and activity patterns of Worker Nodes. Since Worker Nodes form a competitive network where the relationships and interactions between nodes significantly impact decision-making, GCN excels at capturing these relational dynamics by processing graph-structured data, enabling the Workload Module to make informed and holistic judgments about which nodes are best suited for a task. By integrating advanced AI models like LSTM and GCN with a crowdsourced evaluation framework, the zkAgent Network ensures robust task allocation and execution, fostering a high level of efficiency, trust, and reliability.

After completing the evaluation, the Workload Module assigns the task to one or more Worker Nodes whose Mining Modules have been approved for the job. These selected Worker Nodes then proceed to execute and complete the task, ensuring efficient and decentralized task management across the network.

Once the Workload Module approves a task request from a Mining Module, the Worker Node is expected to make every effort to complete the task. Failing to do so would result in a significant reduction in the Mining Module’s integrity score, which could severely impact its ability to secure future tasks. This mechanism reinforces accountability and incentivizes reliable performance across the network.

The entire process of task allocation and completion is recorded on-chain by the Workload Module, aligning with the concept of Real World Assets (RWA) since these tasks involve physical execution. RWA refers to the tokenization and on-chain representation of physical or real-world assets, bridging the gap between blockchain and tangible resources. In this case, the physical tasks executed by Worker Nodes act as real-world assets. By recording the task lifecycle (including allocation, execution, and completion) on-chain, the network ensures transparency, accountability, and verifiable proof of work. This process not only validates the contributions of Worker Nodes but also creates a digital audit trail for physical actions, aligning with the core principles of RWA.

Once an AI task is completed, the Reward Module determines the reward for the task and distributes it through a smart contract. The reward system for Worker Nodes in the zkAgent Network, specifically their Mining Modules, is designed to encourage participation, efficient resource utilization, and long-term commitment. Rewards are structured into three categories:

1. Farming Rewards (a.k.a. Standby Rewards): Worker Nodes earn Farming Rewards for maintaining their availability in the network, even when their resources are not actively utilized for tasks. This ensures the network always has sufficient standby capacity to handle sudden on-demand workloads, contributing to its reliability and scalability.
2. Mining Rewards for Usage: When Worker Nodes’ computational resources are actively engaged, they receive Mining Rewards based on the volume and complexity of the tasks they complete. These earnings are dynamically calculated, considering factors such as task difficulty, resource requirements, and duration. This ensures fair compensation for active contributions while aligning node incentives with the network’s operational needs.
3. Mining Rewards for Milestone Bonus: To promote consistent performance, Worker Nodes are eligible for Milestone Bonuses when they reach predefined operational achievements. These milestones may include completing a set number of lease hours or successfully fulfilling a high volume of tasks. These bonus rewards serve to further incentivize Worker Nodes to support the network’s stability and efficiency over time.

By combining Farming Rewards for standby availability with dynamic Mining Rewards for active contributions, the reward system ensures that Worker Nodes are consistently motivated to remain operational and perform efficiently, supporting the scalability and reliability of the zkAgent network.

The entire above process, from task allocation, execution, to pricing, constitutes a Proof-of-Physical-Work (PoPW) mechanism. PoPW is a consensus model designed to validate and reward real-world physical work performed by participants in a decentralized network. Unlike traditional Proof-of-Work (PoW), which focuses on computational tasks, PoPW emphasizes physical tasks and their tangible outcomes. In the context of the zkAgent Network:

1. Task Allocation: The Workload Module assigns physical tasks to Worker Nodes based on evaluations of their capabilities and integrity.
2. Task Execution: Worker Nodes perform the physical work, such as processing AI workloads or fulfilling infrastructure tasks.
3. Task Validation: The successful completion of the task is verified and recorded on-chain, creating an immutable proof of the physical work done.
4. Reward Distribution: Based on the validated proof, the Reward Module calculates and disburses the reward.

This workflow showcases the synergy between RWA and PoPW. By treating physical tasks as tokenized assets (RWA) and validating their completion through PoPW, the network ensures a seamless integration of real-world contributions with blockchain-based consensus and rewards. This approach not only enhances trust and transparency but also creates an economic model where tangible work is rewarded fairly and efficiently.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zkagent.gitbook.io/whitepaper/zkagent/zkagent-network/management-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
