🀝Pair

The Viper Network implements a session-based approach to regulate interactions between Requestors (clients) and Servicers. Sessions are created to establish a temporary pairing between a client and a specific set of servicers.

Session

In the Viper Network, sessions represent the dynamic relationship between clients and servicers. A session is established to facilitate the exchange of relay services between a Requestor (client) and a specific group of Servicers chosen based on the non-native chain and geo zone requested. During a session, the client sends relay requests to the assigned servicers, who process and fulfil those requests.

Sessions are designed to have a predefined duration, typically for a certain period of time. Once a session concludes, a new session is generated using a Rollover mechanism, leading to a fresh pairing of the client with a different set of servicers. This rotation of servicers ensures fair distribution of workload and prevents any single set of servicers from being continuously responsible for processing requests from a specific client.

In addition to the client-servicer relationship, sessions in the Viper Network also involve the selection of a fisherman. The role of the fisherman is to evaluate and measure the performance of the servicers during a session. By monitoring and collecting data on the quality of service provided by the servicers, the fisherman plays a vital role in maintaining the reliability and integrity of the network.

The selection of a fisherman within each session ensures that servicers are held accountable for their performance. The fisherman evaluates factors such as the reliability, availability, and latency of the relay services provided by the servicers. This evaluation contributes to the determination of rewards and penalties associated with the servicers' performance.

Session Generation

A session is made of 4 components:

  1. Key: A session key is like a code that is used to pick the right group of servicers for a session. To make sure this selection is fair and random, the network uses a session key, which is generated by combining different pieces of information: A unique seed by combining the hash from the latest block and the block height, the Requestors public key, and the non-native chain ID that's being requested. This combination is then processed through a function called a hash function, which creates the unique session key. This helps to make sure the servicer selection is fair and random for everyone.

  2. Header: The header defines the header for session information. The Header of a session is a structure that contains; the Requestor's public key, chain, geo zone, number of servicers requested and the Session block height.

  3. Servicers: Servicers play a crucial role in the Viper Network, as they are responsible for providing service to the clients, as well as maintaining and verifying the network's information. These servicers are selected through a sophisticated servicer selection process to ensure the integrity and reliability of the network. The selection is based on a combination of the servicer's performance score and their staked tokens.

    Servicers with a total performance score above 0.75 (out of 1) and a minimum staked token amount are eligible for multiplied weighted selection. The system calculates a weight for each eligible servicer, with higher weights assigned to those with better performance scores and higher staked token amounts. Servicers with at least the minimum stake and a score above 0.9 receive the highest weight of 1, while those with a score above 0.75 and double the minimum stake receive a weight of 2. Servicers with a score above 0.75 and triple or quadruple the minimum stake receive weights of 3 and 4, respectively. The rest of the servicers with the minimum stake and scores below 0.9 receive a weight equivalent to their score.

    Once the weights are calculated, the system employs a pseudorandom selection process to choose the required number of servicers for the current session. This selection is based on the weighted probabilities, ensuring that servicers with higher weights have a greater chance of being chosen. This approach creates a fair and transparent system that incentivizes high-performing and well-staked servicers to participate in the relay servicing while maintaining the overall decentralization and security of the Viper Network.

  1. Fisherman: The Viper Network introduces a role called "Fishermen" who play a crucial role in ensuring the Quality of Service (QoS) provided by servicers. Fishermen are pseudo-randomly selected entities that act as shadow clients within each session. During a session, Fishermen are responsible for sending sample relays from a relay pool to all the servicers participating in the session simultaneously. This allows them to observe and measure the latency, reliability and availability of each servicer. By collecting data on these metrics, Fishermen evaluate the performance of servicers and calculate their corresponding scores. The collected scores from Fishermen serve as an important basis for reward distribution among servicers after the session concludes. The scores reflect the quality and reliability of the servicers' performance throughout the session. Higher scores indicate better latency, availability, and overall QoS, resulting in increased rewards for the corresponding servicers. Additionally, it's worth noting that the assignment of Fishermen roles is determined by the governance module.

Last updated