BandChain Phase 1: Successful Mainnet Upgrade and GuanYu Launch

Sorawit Suriyakarn
Band Protocol
Published in
6 min readOct 15, 2020


Band Protocol has successfully upgraded BandChain from Wenchang to GuanYu, completing Phase 1 which supports the permissionless creation of customizable data oracle scripts that can query public and permissionless data sources leveraging a decentralized network of 67+ validator nodes.

The upgrade brings the ability of all BandChain validators to fulfill data requests in return for a portion of the fee from our partners and developers that have integrated Band Protocol.

From the first GuanYu Testnet #1 to our test migration from Wenchang to the final GuanYu Testnet #3, the Band Protocol team alongside 68 BandChain validators has been working diligently to simulate the oracle network in the production environment through stress-tests, bug fixing, and maintaining a healthy network.

The post-upgrade focus of BandChain Guan Yu will be to continuously integrate with prominent layer-1 and layer-2 blockchain platforms, upgrade existing oracle scripts on the testnet into the production environment with decentralized finance applications, other smart contracts, and ensuring the oracle network operates in a stable manner.

Below we have included the steps for validators to join the GuanYu Mainnet followed by information on BandChain Phase 2 and next steps.

Step 1: Setting-up Server and Installing BandChain Guanyu

For this guide, we are assuming that you are running an Ubuntu 18.04 LTS machine that allows incoming connections on port 26656. We start by installing utility tools and Golang on the machine.

Next, you will need to clone and build BandChain. The canonical version for this GuanYu Mainnet is v1.2.6.

Step 2: Creating BandChain Account and Setup Config

Once installed, you can use bandcli to create a new BandChain wallet address and use bandd to initialize the chain. Please make sure to keep your mnemonic safe!

You can then download the official genesis file from the repository. You should also add the initial peer nodes to your Tendermint configuration file.

Step 3: Start Your Blockchain Daemon

With all configurations ready, you can start your blockchain node with a single command. In this tutorial, however, we will show you a simple way to set up systemd to run the node daemon with auto-restart.

  1. Create a config file, using the contents below, at /etc/systemd/system/bandd.service. You will need to edit the default ubuntu username to reflect your machine’s username. Note that you may need to use sudo as it lives in a protected folder.

2. Install the service and start the node.

While not required, it is recommended that you run your validator node behind your sentry nodes for DDOS mitigation. See this thread for some example setups. Your node will now start connecting to other nodes and syncing the blockchain state.

Step 4: ⚠️ Wait Until Your Chain is Fully Sync

You can tail the log output with journalctl -u bandd.service -f. If all goes well, you should see that the node daemon has started syncing. Now you should wait until your node has caught up with the most recent block.

... bandd: I[..] Executed block  ... module=state height=20000 ...
... bandd: I[..] Committed state ... module=state height=20000 ...
... bandd: I[..] Executed block ... module=state height=20001 ...
... bandd: I[..] Committed state ... module=state height=20001 ...

See the explorer for the height of the latest block. Syncing should take a while, depending on your internet connection. You should not proceed to the next step until your node caught up to the latest block.

⚠️ NOTE: You should not proceed to the next step until your node caught up to the latest block.

Step 5: Send Yourself BAND Token

With everything ready, you will need some BAND mainnet tokens to apply as a validator. You can use bandcli keys list command to show your address.

bandcli keys list
- name: ...
type: local
address: band1g3fd6rslryv498tjqmmjcnq5dlr0r6udm2rxjk
pubkey: ...
mnemonic: ""
threshold: 0
pubkeys: []

Step 6: Apply to Become Block Validator

Once you have some BANDs, you can apply to become a validator by sending MsgCreateValidator transaction.

bandcli tx staking create-validator \
--amount <your-amount-to-stake>uband \
--commission-max-change-rate 0.01 \
--commission-max-rate 0.2 \
--commission-rate 0.1 \
--from <your-wallet-name> \
--min-self-delegation 1 \
--moniker <your-moniker> \
--pubkey $(bandd tendermint show-validator) \
--chain-id band-guanyu-mainnet

Once the transaction is mined, you should see yourself on the validator page. Congratulations. You are now a working BandChain mainnet validator!

Step 7: Setting Up Yoda — The Oracle Daemon

For Phase 1, BandChain validators are also responsible for responding to oracle data requests. Whenever someone submits a request message to BandChain, the chain will autonomously choose a subset of active oracle validators to perform the data query.

The validators are chosen submit a report message to BandChain within a given timeframe as specified by a chain parameter (100 blocks in Guanyu mainnet). We provide a program called yoda to do this task for you. For more information on the data request process, please see here

Yoda uses an external executor to resolve requests to data sources. Currently, it supports AWS Lambda (through REST interface).

In future releases, yoda will support more executors and allow you to specify multiple executors to add redundancy. Please use the following link to setup lambda function:

You also need to set up yoda and activate oracle status. Here’s the documentation to get started:

That’s it! You can verify that your validator is now an oracle provider on the block explorer. Your yoda process must be responding to oracle requests assigned to your node. If the process misses a request, your oracle provider status will automatically get deactivated and you must send MsgActivate to activate again after a 10-minute waiting period and make sure that yoda is up.

BandChain Phase 2 Overview

The next upgrade to BandChain Phase 2 will expand built-in support for permissioned and paywall APIs from premium data providers as well as improving the composability between multiple oracle scripts.

We are already working with various premium data and API providers who will be able to collect fees automatically on-chain per call from decentralized applications.

The exciting facet of Phase 2 is that smart contracts and DApp developers will be able to reliably connect to most of the data available on the open internet in a trustless manner. This will strongly expand the data availability and use-cases accessible through blockchain technology.

Moving Forward

With the Band Protocol oracle network operating with 60+ validators at the time of writing, this marks a major step towards improving the decentralized application developer toolkit who will be able to bridge any external data source to smart contracts using Band oracles. Thank you to our validator cohort and 20+ integration partners who have made this possible — we look forward to working with more developers and innovative projects to come.

Stay tuned on our community and announcement channels as we showcase our support for premium data providers and integration partners as they upgrade their products that utilize Band Protocol oracles on the GuanYu Mainnet.

About Band Protocol
Band Protocol is a cross-chain data oracle platform that aggregates and connects real-world data and APIs to smart contracts. Blockchains are great at immutable storage and deterministic, verifiable computations — however, they cannot securely access data available outside the blockchain networks. Band Protocol enables smart contract applications such as DeFi, prediction markets, and games to be built on-chain without relying on the single point of failure of a centralized oracle. Band Protocol is backed by a strong network of stakeholders including Sequoia Capital, one of the top venture capital firms in the world, and the leading cryptocurrency exchange, Binance.
Website | Whitepaper | Telegram | Medium | Twitter | Reddit | Github



Sorawit Suriyakarn
Band Protocol

CTO at Band Protocol. SB & MEng in EECS from MIT.