MassBit Gitbook
Main component in Massbit network

Massbit Core

Massbit Core (MC) is the orchestrator of the entire Massbit network. It works along with other components to onboard new Gateways and Nodes onto Massbit network, and make sure traffic is routed by Gateways and Nodes effectively. When Providers need to operate Nodes or Gateways in Massbit network, they need to obtain a set of instructions created by the MC from the Portal for their servers. By executing the instructions in the form of Bash shell script, the server will negotiate with MC and Verification Service if it is qualified to participate in MassBit routing network. Once a Gateway is successfully verified in Massbit network, MC provides a list of dAPI entrypoints and Nodes in the same zone the Gateway need to server request and forward traffic respectively.
As Massbit Route network grow globally and blockchain traffic needs to be directed optimally, MC constantly updates Gateways with a set of traffic routing and handling instruction to adopt a change within Massbit network. For example, when some nodes in a zone go offline, new nodes are added or Consumers adjust the request rate for dAPI entrypoint, MC generates a new set of configuration for all of the Gateway in the zone.

Gateway Manager

Gateway Manager the DNS component of Massbit network based on the opensource project gdnsd. It runs as an authoritative DNS system of Massbit network, and can be seen as a directory for all Community Gateways and Nodes around the world.
When a dApp query blockchain API through a Massbit dAPI entry-point, it needs to lookup the IP address for the dAPI entry-point through their configured recursive DNS servers. If the recursive DNS servers do not have the entry for the dAPI entry-point, they will perform authoritative lookup to Gateway Manager. With geographic IP capability, Gateway Manager resolve the DNS lookup with the IP of the Gateway closest to the requesting dApp based on the source IP in request Header.
A dAPI entry-point URL has the following format:
https://[API ID][API key]
wss://[API ID][API key]
The host portion in the dAPI URL is a dynamic DNS entry in Gateway Manager. The resolved IP in the authoritative response by Gateway Manager will vary depend on the source IP in the request Header.

Session Manager

When a dAPI entrypoint is created by Consumer, a dynamic DNS entry is created by Gateway Manager and resolved to the nearest Gateway IP based on the source IP in the request header. Once traffic reaches a Gateway, in order to accept the API request from Consumers, it needs to obtain a dAPI session key from Session Manager. The session key is only valid for a certain amount of time and will be renewed for the dAPI entrypoint if needed.
In addition, Session Manager also controls the usage of the dAPI entry-point. Consumers need to deposit MBR token for the dAPI entrypoint in advanced to pay for the cost of dAPI usage. Depends on the amount of MBR deposit, Consumers will receive a corresponding quota for dAPI usage. Session Manager will inform if a dAPI entrypoint is out of quota and Gateways will block incoming request until more MBR token is funded for the dAPI.
Session Manager also prevents malicious actors from bypassing dAPI payments and sending blockchain requests directly to Gateway public IP. Without a valid session key and a dAPI entrypoint, Gateways will reject the requests destined to their public IP. This will maintain the security of the network and form a building block for Massbit Route tokenomic.


Massbit Route is constructed to be a reliable global blockchain distribution network, which distributes content to users anywhere around the globe with low latency and response time. For that reason, user-operated nodes and gateways need to meet certain performance criteria to remain routing traffic in Massbit network and earn rewards.
Fisherman can be seen as a monitor service that periodically keeps track of Nodes and Gateway traffic routing performance. Data returned by Nodes and Gateways always need to be consistent with blockchain datasources to maintain data integrity and prevent malicious actors to perform man-in-the-middle attacks.
If any Nodes or Gateways experience a technical issue such as network connectivity, or high latency, Fisherman can also detect and eliminate those malfunctioned components and offload traffic to other healthy nodes. More specifically, gateways that are reported by Fisherman is removed from the Gateway Manager's directory, and will no longer be able to serve dAPI blockchain requests. When a Node is eliminated due to a technical issue, Massbit Core notifies all of the Gateways in the same zone to stop forwarding blockchain requests to that node.
When Nodes or Gateways are reported by Fisherman, they are no longer part of Massbit network and are not eligible for staking reward.
This service plays an important role in Massbit network redundancy and high-availability.


Stats collects telemetry from all verified Gateways and Nodes in Massbit network. The service provides different metric data to allow the Portal to visualize Nodes and Gateway performance with charts. In addition, it calculates and keeps track of the available quota for each dAPI based on the amount of MBT token deposit.

Node Verification Service

Massbit Route becomes a faster and more reliable BDN when the number of Community Nodes and Gateway increase. Nodes and gateways need to meet certain requirement in order to be part of Massbit global nework.
When a Node request to join Massbit network, Verification Service check if the Node is able to forward request to its blockchain datasource and return result matching with the blockchain datasource such as block data, block hash and runtime version. If all checks passed the validation process, the node become a part of Massbit network, and ready to receive traffic from Gateways in the same zone.
In each zone, a minimum of 1 Node is required in order for a Gateway to be verified. Without any Node or blockchain datasource, it is unnecessary to run a Gateway in that zone because it introduces some routing overhead, and traffic will eventually be routed to a nearest zone.
When a Gateway needs to join Massbit network, Verification Service will validate if the Gateway has obtained a list of Node in its zone from Massbit Core and whether it can proxy traffic to the Nodes properly. If blockchain data returned by Gateway is correct and match with data from the Node and blockchain datasource in that zone, the Gateway is verified and its public IP is updated in Gateway Manager directory.

Massbit Route blockchain

Building on Substrate framework, Massbit chain is a source of truth for token-related activities in Massbit network. Massbit Consumers need to pay fees in MBT token in exchange for global dAPI service. In return, Providers earns rewards from Consumers' fee for handling blockchain API requests and maintaining the stability of the network. Through Massbit chain, anyone can verify Providers' and Consumers' activities.
Staking/Un-staking amount on each Node/Gateway
Reward calculated after each Era from Consumer fees
Reward claim history
Node/Gateway State reported by Fisherman
Node verified duration eligible for staking reward
Provider Wallet and transactions
dAPI deposit fee
dAPI remaining quota based on past usage on deposit fee
Consumer wallet and transactions
Staking/Un-staking amount on delegated Node/Gateway
Block reward for validator


Portal is the user-interface of Massbit Route that allows user to user to perform the following activities:
  • Create/stake/unregister Nodes and Gateways
  • Obtain installation script for Nodes and Gateways
  • Claim reward for Nodes and Gateways
  • Visualize traffic of Nodes, Gateway and dAPI entry-point
  • Create dAPI entry-point and view quota
  • Deposit fee for dAPI

Community Gateway

Gateways are entry-points to Massbit network, which receive blockchain API requests from dApps. It keeps a list of verified Nodes in the same zone, and forward requests to those nodes. It also stores static content of blockchain requests to reduce the response time for identical requests that come in later

Community Node

Community Nodes receive requests from upstream Community Gateway and forward them to the attached blockchain datasource. In addition, it works with Massbit Fisherman to make sure the datasource is available and synchronized with peers before it can receive new blockchain API requests from Gateways.