跳至主要内容
本页面使用机器翻译自英语,可能包含错误或不清楚的语言。如需最准确的信息,请参阅英文原文。由于更新频繁,部分内容可能与英文原文有出入。请加入我们在 Crowdin 上的努力,帮助我们改进本页面的翻译。 (Crowdin translation page, Contributing guide)

RedStone

Overview

RedStone is a modular oracle network that delivers price feeds to smart contracts. On Kaia, RedStone exposes Push feeds that store prices on-chain so dApps can read them with a familiar Chainlink-compatible AggregatorV3Interface.

RedStone Push periodically updates on-chain prices based on configurable deviation and heartbeat conditions. Learn more in the RedStone Push documentation and browse live Kaia feeds in the Push Feeds UI.

Using RedStone on Kaia

Each Push feed is deployed as a price-feed contract that implements Chainlink’s Aggregator interface. You can call latestRoundData() to read the latest price.


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
contract RedStoneConsumer {
AggregatorV3Interface public immutable priceFeed;
constructor(address feedAddress) {
priceFeed = AggregatorV3Interface(feedAddress);
}
function getLatestPrice()
external
view
returns (int256 price, uint256 updatedAt)
{
(, price, , updatedAt, ) = priceFeed.latestRoundData();
}
}

Pass the feed address for the asset you need (see tables below). Always validate updatedAt and round data against your protocol’s freshness requirements.

Feeds on Kaia

Mainnet (Chain ID 8217)

FeedAddressDeviation / Heartbeat
BTC0x6AEE1334b4053B0148907649D447557560CC81260.5% / 6h
ETH0xb728dbB1D8504fD521db0e87bdDdF33466bCabAD0.5% / 6h
USDT0xE08bcb1407E8496d434eFe4ecf2a20E27068a14A0.5% / 6h
KAIA0xa2F3430ac9cfc37aEF88449DADf36af676211A640.1% / 12h
earnUSDT0x6334c5EAE8CD1E2aD2fe32989775C92e7F729e710.1% / 12h
stKAIA0x6b860bE3CCc3b69C912ff2f7975Ea0d1194928a70.1% / 12h

Kairos Testnet (Chain ID 1001)

FeedAddressDeviation / Heartbeat
USDT0x13d3B27c7C100621CB3B714deAb858Ee06d41db10.5% / 6h

Feed availability and parameters can change. Confirm the latest addresses and update conditions in the Push Feeds UI.

Resources

让这个页面变得更好