Tech Overview & Resources

Reward system is fully auditable

Overview

Three systems make up the Arbitrum STIP rewards program: 1. Stats; 2. Points; and 3. Rewards.

tl;dr: stats => points => rewards

Stats Subgraph

Gains Network has published a subgraph to track stats & points from on-chain trading events. Both the data and code are public:

Arbitrum Subgraph: https://thegraph.com/hosted-service/subgraph/gainsnetwork-org/gtrade-stats-arbitrum

GitHub: https://github.com/GainsNetwork-org/gtrade-stats-subgraph/tree/main/packages/stats-subgraph

Graph Client

Gains Network has published a client library to NPM to both interact with raw stats & points, as well as access all rewards data. Rewards are not tracked on the subgraph and instead are computed in real-time through the use of client-side queries. Both the client library and code are public:

NPM Library: https://www.npmjs.com/package/@gainsnetwork/graph-client

GitHub: https://github.com/GainsNetwork-org/gtrade-stats-subgraph/tree/main/packages/graph-client

Claims Contract

Gains Network has deployed a contract for claiming $ARB rewards. The contract is verified on Arbiscan.

Contract: https://arbiscan.io/address/0x6ac331B603373D0006D72d3a3159B4C35e1006e8#code

The contract stores a Merkle root and IPFS CID per epoch. The root is used to distribute rewards, and the CID is for data transparency, allowing the community to verify the rewards data independently.

Weekly Job

Each week a job runs that:

1. Computes rewards using the graph-client

2. Generates a Merkle tree

3. Publishes tree to IPFS

4. Submits root & CID to contract

This job is not open source but its output can be fully verified.

Verification

Each module of the system can be independently verified.

  • Trading stats -- code & index can be compared against blockchain events independently

  • Trading points -- conversion from stats to points can be compared against blockchain events independently

  • Trading rewards -- graph-client allows anyone to compute rewards for any epoch at any time. This can be compared against the CID and Merkle root on-chain.

Last updated