Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

0xProject/0x-staking-pool-registry

Repository files navigation

0x Staking Pool Registry

A collection of metadata about 0x staking pools.

Addition to this repository is not a requirement to use the 0x Protocol. It's intended to make it easier for potential ZRX stakers to discover additional information about staking pools.

Usage

Option A. Clone this repo and import staking_pools.json and pool_metadata.json into your own project or
Option B. Get the latest version by fetching it directly from this repo

$ curl -i -H "Accept: application/json" https://api.github.com/repos/0xProject/0x-staking-pool-registry/contents/staking_pools.json?client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}

$ curl -i -H "Accept: application/json" https://api.github.com/repos/0xProject/0x-staking-pool-registry/contents/pool_metadata.json?client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}

To get metadata for a particular chain and pool ID (if it exists), you can do the following in Javascript. The example below grabs metadata for pool ID "1" on chain 42 (Kovan).

metadata = require('./pool_metadata.json');
pools = require('./staking_pools.json');

data = metadata[pools[42][1]];

Submission Process

  1. Clone this repository. Create a new branch called 'newpool/add_<your_pool_name>'.
  2. Add your logo image in a web-safe format (GIF, JPEG, or PNG) to the logos folder.
  3. Install yarn and run yarn install
  4. Generate a UUID for your relayer by running yarn generate:uuid.
  5. Add an entry to staking_pools.json for each of your pools under the correct Chain ID. The outermost keys are Chain IDs, and the correct format for nested entries is "": uuid.
  6. Add an entry to pool_metadata.json that complies with the metadata JSON schema in schemas.ts
  7. Run yarn test to verify that your entries pass schema validation.
  8. Push your branch to the remote repo and open a PR.
  9. Add a transaction hash to the PR description verifying your ownership of the operator address. The transaction sender should be your operator address and the data field should have a hex-encoded message of the following format: Pool <Pool ID> belongs to <Github username>. MyEtherWallet has an interface to do so.

A sample submission:

In staking_pools.json, add a mapping of your on-chain pool IDs to your generated UUID. The outermost numbers are chain IDs (1-mainnet ethereum, 3-Ropsten, etc.). In this example, "149d3c10-d7a4-49e4-90f2-527fd4f727f1" is pool 1 on all chains.

{
    "1": {
        "1": "149d3c10-d7a4-49e4-90f2-527fd4f727f1"
    },
    "3": {
        "1": "149d3c10-d7a4-49e4-90f2-527fd4f727f1"
    },
    "4": {
        "1": "149d3c10-d7a4-49e4-90f2-527fd4f727f1"
    },
    "42": {
        "1": "149d3c10-d7a4-49e4-90f2-527fd4f727f1"
    },
    "1337": {
        "1": "149d3c10-d7a4-49e4-90f2-527fd4f727f1"
    }
}

In pool_metadata.json, add your generated UUID and metadata about your pool:

"149d3c10-d7a4-49e4-90f2-527fd4f727f1": {
    "name": "Test Pool",
    "bio": "All your stake are belong to us",
    "verified": true,
    "website_url": "http://0x.org",
    "logo_img": "0x.png",
    "location": "San Francisco, CA",
}

About

A collection of metadata about staking pools on 0x - https://0x.org/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published