f(t₀)one value, the time it was read, and a signature
The hourly funding rate of the SOL perpetual on HyperCore, as a fraction of position value.
Read every minute from HyperCore's asset contexts (asset index 5). Positive means longs pay shorts. Published when it changes by more than a tenth or once an hour.
Sources
Rights
Read from HyperCore state through Hyperliquid’s public info API. It is the public state of a blockchain, which no publisher licenses; the same numbers are on chain for anyone to read.
Looking for your wallet
import { IsometryFeeds } from "@isometry-feeds/sdk";
import { privateKeyToAccount } from "viem/accounts";
const feeds = new IsometryFeeds({
gatewayUrl: "https://isometry.me/feeds",
registry: "0x4D8fe5d10462E01eB971B82BDD41A37e0Fe8Ea1f", // checked on chain before every payment
account: privateKeyToAccount(process.env.BUYER_KEY as `0x${string}`),
maxSpendUsdc: 1_000_000n, // 1 USDC at most for the life of this process
});
const report = await feeds.read("isometry/sol-funding-rate-hypercore");
console.log(report.text(), report.observedAt);
// report.encoded and report.signature go straight to a contract built on FeedConsumer// SPDX-License-Identifier: MIT
pragma solidity 0.8.38;
import {FeedConsumer} from "./FeedConsumer.sol";
import {IFeedVerifier} from "./FeedTypes.sol";
/// Keeps the newest "SOL perpetual funding rate, HyperCore" it is handed. Anyone may submit a report: it proves itself.
contract SolFundingRateHypercoreReader is FeedConsumer {
bytes32 public constant FEED_ID = 0x252be5eb1c3ec29e3f03d2d9bda21c050d2b0692b840b2deb83069110175d7b8;
int256 public latest; // scaled by 10^10
constructor(IFeedVerifier verifier) FeedConsumer(verifier) {}
function submit(bytes calldata encoded, bytes calldata signature) external returns (int256 value) {
// each report is accepted once, and only if it was observed after the last one
value = _readOnce(
FEED_ID,
encoded,
signature,
Policy({maxAgeSec: 7200, allowedKinds: KIND_MANAGED, minValue: type(int256).min, maxValue: type(int256).max})
);
latest = value;
}
}