Client software for running an oracle on the kava blockchain. Currently tested against kava-testnet-8000.
- NodeJS - tested against version 10.x+
Choose a key that you will use for the oracle. Make sure you have saved the mnemonic for that key and that the key has enough funds to pay transaction fees. Use discord to communicate with a team member to get your key included in a governance proposal to become an oracle.
Setup a kava blockchain node with a REST endpoint. See here for instructions.
Install the oracle software:
# Standalone Server Setup
.env file in
kava-tools/scripts (see example) :
systemd file to run the oracle process. An example with user
ubuntu is as follows (note that the
nodejs process is at
/usr/bin/nodejs, this may be different depending on how you install node ):
Run the oracle process
To view the logs of the oracle process:
# Chainlink Node Setup
To run the oracle from a Chainlink node, you need to configure an external adapter for interacting with kava. Instructions can be found at chainlink-adapter-kava
# How it works
At the specified crontab frequency, the oracle client will query the Binance v3 API for price information about that asset. If Binance is down, it will fallback to CoinGecko. If the price meets the threshold for posting (default is 0.5% change from the previous posted price), is will submit a
postprice transaction to the blockchain along with a time when that price should be considered expired. At the end of each block, the median price of all oracles is selected as the asset's current price.