Before data packets can be sent between HOPR nodes, nodes need to possess HOPR tokens (or tHOPR for testnets) and open payment channels with other nodes in the HoprChannels smart contract. By monitoring the opening, closing and updates of payment channels through events emitted from HoprChannels, the topology of the current HOPR network can be effectively mapped out.
The following events are relevant for visualizing the network topology:
Connection (including the direction of payment channels), stake (amount of HOPR tokens as channel balance), ticket redemption (number of tickets being redeemed per channel) and change in channel status can be visualized with on-chain events.
A full specification of all the events from HoprChannels smart contract is detailed in section "Smart Contract Overview"
With the latest channel balances, importance score can be calculated per channel. This score is used as an indicator for cover traffic nodes to prioritize the distribution of cover traffic. The importance score is calculated as a product of the stake of a node and the sum of the weights of all outgoing channels.
where is the node, is an outgoing channel of node , is the weight of the channel .
where is the balance of the channel between node and , and is the stake of the node .
The stake of a node can be denoted as below, which is the sum of the unreleased tokens of a node and the total of outgoing channels of
In the protocol, the importance score is implemented as the function
importance in the packages/cover-traffic-daemon/src/utils.ts
Deployed Channel contracts
HoprChannels smart contract of the previous public testnet - "Wildhorn v2" is deployed on Gnosis Chain at 0xF69C45B4246FD91F17AB9851987c7F100e0273cF.
HoprChannels smart contract of the last public testnet - "Matterhorn" is deployed on Gnosis Chain at 0xD2F008718EEdD7aF7E9a466F5D68bb77D03B8F7A.
For reference, HOPR xDAI Testnet - Wildhorn v2 Dashboard shows some statistics about this public testnet. The analysis is done with on-chain data of emitted events and transaction calls.