KCC Oracle

Overview

A blockchain oracle is a bridge between the blockchain and the real world. These oracles allow real-world data to enter the blockchain. This data could be anything from price information to weather reports. Oracles can also be bi-directional and "send" data out to the real world. With the sharp rise of various DeFi applications, a stable and reliable decentralized oracle service is key to premium DeFi projects. Hence, the arrival of KCC Oracle addresses the need for KCC-based smart contracts to access external data. Please read through them carefully and understand the underlying risks before using Oracle.

Reliability

Data Sources

KCC Oracle sources price data from multiple centralized exchanges (CEXs) and from the decentralized finance (DeFi) applications and aggregates the data using a weighted formula.

Data Signing

KCC Oracle has two roles: transmitter and signer. The signer signs data, and the transmitter is responsible for transmitting the signed data up the chain. It is intended to make data tamper-proof and to improve the security and reliability of different roles addresses.

Data Publishing

Publishing data to the blockchain happens through multi-nodes. Multi-nodes also ensure that those smart contracts that already store some data are secure and audited. Multi-node architecture can also adjust the frequency of data publishing based on the situation. For example, it can help you get accurate data during high price volatility.

Data Monitoring

The data on the KCC Oracle is kept up to date by an independent monitoring service that works 24 hours a day, seven days a week. It fetches prices from different data sources and compares them to published blockchain data. And the KCC Oracle support team will intervene if a significant deviation is detected.

API Reference

Oracle Aggregator periodically publishes valuable data to the Oracle network. The aggregator stores the aggregated data on a chain so that consumers can retrieve and use it in the same transaction. We recommend retrieving data sources through AggregatorV3Interface and proxy addresses.

Functions

Name
Descripition

decimals

The number of decimals

description

The description of trading pairs

getRoundData

Get data from a specific round

latestRoundData

Get data from the latest round

version

Get the version of the aggregator

decimals

Get the number of decimals of the response

function decimals() external view returns (uint8);

Return values

  • RETURN: The number of decimals

description

Get the description of the aggregator

function description() external view returns (string memory);

Return values

  • RETURN: The description of trading pairs

getRoundData

Get the round data details for a given round ID

function getRoundData(uint80 _roundId)
  external
  view
  returns (
    uint80 roundId,
    int256 answer,
    uint256 startedAt,
    uint256 updatedAt,
    uint80 answeredInRound
  );

Parameters

  • _roundId: The round ID

Return values

  • roundId: The round ID

  • answer: The answer for this round

  • startedAt: Timestamp of when the round started

  • updatedAt: Timestamp of when the round was updated

  • answeredInRound: The round ID in which the answer was computed

latestRoundData

Get the price from the latest round

function latestRoundData() external view
    returns (
        uint80 roundId,
        int256 answer,
        uint256 startedAt,
        uint256 updatedAt,
        uint80 answeredInRound
    );

Return values

  • roundId: The round ID

  • answer: The price

  • startedAt: Timestamp of when the round started

  • updatedAt: Timestamp of when the round was updated

  • answeredInRound: The round ID of the round in which the answer was computed

version

Get the version of the aggregator

function version() external view returns (uint256);

Return values

  • RETURN: The version of the aggregator

Contract Address

KCC Mainnet Feed addresses

Pair (Base/Quote)
Decimals
Deviation
Heartbeat
Data Feed Contract (Proxy Address)

BTC/USD

8

0.2%

2m

0xFAce3f85602A8dc013217b61a97a9AFE7B2F276F

ETH/USD

8

0.2%

2m

0x72E10386eBE0E3175f62BF3Edfc9A64aC3c5918a

KCS/USD

8

0.2%

20m

0xAFC9c849b1a784955908d91EE43A3203fBC1f950

SKCS/USD

8

0.2%

20m

0xdB4b34b3Fc38D828DFE5D9D34CcF0f5f15c09684

USDT/USD

8

0.1%

30m

0x001c1a168ba2a36D01a99542740C375c51615161

USDC/USD

8

0.1%

30m

0x1A165db46d431804B0082eb5BEbc307ffb97e31b

KCC Testnet Feed addresses

Pair (Base/Quote)
Decimals
Deviation
Heartbeat
Data Feed Contract (Proxy Address)

BTC/USD

8

0.2%

2m

0xBb3423a913a9a69aD7Dba09B62abdFDE4643BAe4

ETH/USD

8

0.2%

2m

0x22337a9a305E081c0C801dd7B7b8eCF4966660bB

KCS/USD

8

0.2%

20m

0xae3DB39196012a7bF6D38737192F260cdFE1E7Ec

SKCS/USD

8

0.2%

20m

0xAAf1A426D4b5D57c55E67f6eCc2918c698D94359

USDT/USD

8

0.1%

30m

0x2bE470B8BD3CF5655dcC666CDe37E3E4D6cf3168

USDC/USD

8

0.1%

30m

0x91b66dAd926FaC824da9390D1aF6f68db391A5c0

Last updated