The miner’s perspectives

When a client sends a request, the system forwards it to a specific service provider. Assuming the service provider is designed to handle many requests simultaneously, there may be times when the number of incoming requests exceeds its processing capacity. In such instances, requests are queued. The service provider would then prioritize these requests based on the number of tokens each client has staked. We consider that using a weighted round-robin (WRR) scheduling to ensure more predictable and fair access, while still respecting the proportional stake.

Let's say at a specific time, a miner is receiving requests from several clients. Each client sends a certain number of requests. The weight of each client in the queue is calculated based on the tokens they have staked, compared to the client with the least staked tokens.

Once the miner is at full capacity, it sets its status to "busy," signaling that it can't take more requests. The miner processes the requests in rounds. In each round, one request per client is handled. This continues until all requests are processed, after which the miner's status is reset to "ready."

After a request is processed, the service provider sends a message confirming the completion. The client can then review the service quality and submit a rating, which is recorded in a global ledger. Ratings can be Good, Fair, or Bad. These ratings are used to calculate the miner's reputation using a logistic function, which ensures a smooth and bounded reputation score.

Regarding rewards for miners, they are paid not only for the computational work but also for the quality of their services. The reward amount is determined by their contribution, reputation, service logs, and the volume of work. The calculation involves the number of requests processed and the importance of the services provided. Different services have different weights based on their complexity and computational needs. The community decides these weights for new services.

In summary, the system queues and prioritizes client requests based on tokens staked. Miners process requests in rounds and are rewarded based on both the volume and quality of their services. Clients rate the services, influencing the miner's reputation and rewards.

Last updated