開発者へ / 現実世界資産

現実世界資産

このレイヤーは価格のレイヤーです。33 のフィード、うち 19 が現実世界資産で、プロトコルの中で公開され、一回の呼び出しで読めます。このページは一覧の取り方で、次のページは価格の読み方です。

何が存在するか

平易な言葉のドキュメントは三つのレイヤーを説明します。このリポジトリにコードがあるのは そのうちちょうど一つで、このリファレンスが記述するのはそれです。

レイヤー状態
A price, published in the protocolbuilt, and documented here33 feeds written by block production into a registry predeploy, with one Chainlink-shaped adapter per feed
Exposure to a priced assetdesigned, not present in this repositorya margin system denominated by a feed, with crypto collateral and crypto settlement. There is no contract to call
A registry admitting third-party tokenised assets as collateraldesigned, not present in this repositorywith risk parameters and haircuts. Pickle would admit such a token, not issue one

つまり、価格があり、それを保持して提供するコントラクトがあります。証拠金エンジンも、担保の レジストリも、呼べるポジションのコントラクトもありません。それらが存在するようになったら、 意図としてではなく呼び出し可能な面としてここに記述されます。

資産ではなく価格

A feed is the PRICE of a real-world asset. It is not the asset.

The chain publishes a number describing what something trades at somewhere else. It issues no tokenised share, holds no underlying instrument, offers no redemption and keeps no custody. Exposure measured against one of these prices is a claim on a margin system, not on an issuer, and this reference does not call it a tokenised asset. Nothing about a feed confers a shareholder right, and there is nothing to redeem.

Name it accordingly in your own interface. A contract reading XAU/USD is reading the price of gold; it is not holding gold, and a user who reads otherwise has been told something untrue.

これはチェーンが何をするかについての記述であり、後から取り付けた免責文ではありません。 レジストリの中に発行体も、保管者も、準備も参照するものはありません。存在しないからです。Pickle は現実世界資産を発行せず、保有もしません。AAPL/USD という名前のフィードは、その株式がよその市場でいくらで取引されて いるかを述べる数値であり、このチェーンで公開されている、それだけのものです。

資産の一覧を得る

三つの方法があり、最初のものがほとんど常に正解です。ABI もアドレスも鍵も要りません。

経路呼び出し
Over JSON-RPCpickle_pricesno params. Answers the whole registry: every feed with its symbol, feedId, adapter, decimals, class, policy, latest answer and age. One call, no ABI, no address
From a contractfeedCount() then feeds(offset, limit)on the price registry. limit is capped at 256; an offset past the end returns an empty array rather than reverting, so a reader can page blindly
From the sourceoracle/catalog.jsonthe live feed set in the repository: what the oracle service prints and what l2-feeds-init (scripts/sync-feeds.sh) reconciles the registry to. The authority for what the chain should hold after a sync, not proof of what it holds now
The genesis inputoracle/catalog-genesis.jsonthe frozen copy the genesis allocation was generated from, and the authority for what the chain was born with. It is never edited on its own: a change to it is a genesis regeneration, a new chain
bash
# Every feed the chain carries, with its adapter, decimals, answer and age.
curl -s $RPC_URL \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"pickle_prices","params":[]}' \
  | jq '.result.feeds[] | {symbol, feedId, adapter, decimals, price, statusName, staleOnchain}'

# The count alone, when you only want to know whether the catalog changed.
curl -s $RPC_URL \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"pickle_prices","params":[]}' \
  | jq '.result.feeds | length'

$RPC_URL はネットワークパラメータにある エンドポイントです。応答は blockNumber、timestamp、そして レジストリが名指しする publisher と owner も運びます。今読んだ ものを書きえたのが誰かを知りたければ、それらを読んでください。

カタログは定数ではなくレジストリの状態です

下にあるジェネシスの集合は、チェーンが生まれたときのものです。フィードはあとから owner の 役割によって追加できるので、一覧をハードコードするクライアントはそれを見落とします。 レジストリをページングするか、pickle_prices を呼んで、その応答から 組み立ててください。

33 のフィード

資産クラス数
crypto14 feedsclass 1. ETH, BTC, SOL, XRP, DOGE, LINK, ADA, XLM, BCH, TRX, BNB, HYPE, ZEC, XMR - all quoted in USD
equity9 feedsclass 2. AAPL, MSFT, NVDA, AMZN, GOOGL, META, TSLA, SPY, JPM
commodity2 feedsclass 3. XAU/USD and XAG/USD - gold and silver
fx5 feedsclass 4. EUR/USD, GBP/USD, USD/JPY, USD/CHF, USD/CNH
index3 feedsclass 5. PYTHOIL/USD, BRENT/USD, NATGAS/USD - energy indices, which trade around the clock

33 のうち 19 が現実世界資産です。運用上 効いてくる区分は別のものです。13 のフィードがスポット取引所に裏打ちされ、20 が Pyth だけから来ます。後者は、現実世界の フィードのすべてに、取引所側の足を持たない唯一の暗号資産ペアである XMR/USD を 加えたものです。

シンボル分類ソース公開ポリシー市場
ETH/USD暗号資産5 取引所 + PytheveryBlock常時オープン
BTC/USD暗号資産5 取引所 + PytheveryBlock常時オープン
SOL/USD暗号資産5 取引所 + PytheveryBlock常時オープン
XRP/USD暗号資産5 取引所 + PytheveryBlock常時オープン
DOGE/USD暗号資産5 取引所 + PytheveryBlock常時オープン
LINK/USD暗号資産5 取引所 + PytheveryBlock常時オープン
ADA/USD暗号資産5 取引所 + Pyth10 bps / 60 s常時オープン
XLM/USD暗号資産5 取引所 + Pyth10 bps / 60 s常時オープン
BCH/USD暗号資産5 取引所 + Pyth10 bps / 60 s常時オープン
TRX/USD暗号資産5 取引所 + Pyth10 bps / 60 s常時オープン
BNB/USD暗号資産5 取引所 + PytheveryBlock常時オープン
HYPE/USD暗号資産5 取引所 + PytheveryBlock常時オープン
ZEC/USD暗号資産5 取引所 + Pyth10 bps / 60 s常時オープン
XMR/USD暗号資産Pyth のみ10 bps / 60 s常時オープン
AAPL/USD株式Pyth のみeveryBlockNYSE の取引時間
MSFT/USD株式Pyth のみ10 bps / 300 sNYSE の取引時間
NVDA/USD株式Pyth のみeveryBlockNYSE の取引時間
AMZN/USD株式Pyth のみeveryBlockNYSE の取引時間
GOOGL/USD株式Pyth のみ10 bps / 300 sNYSE の取引時間
META/USD株式Pyth のみeveryBlockNYSE の取引時間
TSLA/USD株式Pyth のみeveryBlockNYSE の取引時間
SPY/USD株式Pyth のみ10 bps / 300 sNYSE の取引時間
JPM/USD株式Pyth のみ10 bps / 300 sNYSE の取引時間
XAU/USD商品Pyth のみeveryBlock日中の休憩がある立会
XAG/USD商品Pyth のみ5 bps / 300 s日中の休憩がある立会
PYTHOIL/USD指数Pyth のみ10 bps / 300 s常時オープン
BRENT/USD指数Pyth のみ10 bps / 300 s常時オープン
NATGAS/USD指数Pyth のみ10 bps / 300 s常時オープン
EUR/USD外国為替Pyth のみ2 bps / 300 s外国為替の週
GBP/USD外国為替Pyth のみ2 bps / 300 s外国為替の週
USD/JPY外国為替Pyth のみ2 bps / 300 s外国為替の週
USD/CHF外国為替Pyth のみ2 bps / 300 s外国為替の週
USD/CNH外国為替Pyth のみ2 bps / 300 s日中の休憩がある立会
  • 5 取引所 + Pyth。 five spot venues, with a Pyth feed alongside as a cross-check and a stand-in
  • Pyth のみ。 Pyth only - no venue is listed for this feed, so an absent Pyth credential leaves it unpublished

市場の列について。常時オープンは open every day, all day、NYSE の取引時間は 09:30-16:00 New York, Monday to Friday, with the exchange holiday list、外国為替の週は continuous Monday to Friday afternoon New York, closed Saturday, reopening Sunday evening、日中の休憩がある立会は a nearly-continuous session with a daily break and a closed Saturday です。 スケジュールは市場の取引時間の主題であり、それを 扱うことは任意ではありません。

公開ポリシーは 33 ではなく五つ

ポリシーフィード
everyBlock, no step capETH/USD, BTC/USD, SOL/USD, XRP/USD, DOGE/USD, LINK/USD, BNB/USD, HYPE/USDwritten on every EVM block the publisher can fill. No deviation trigger, no heartbeat, no step cap - the whole crypto class carries a step cap of 0 whether or not it is on this policy. Ring capacity 16,384 for ETH/USD and BTC/USD, 1,024 for the other six
everyBlock, with step capAAPL/USD, NVDA/USD, AMZN/USD, META/USD, TSLA/USD, XAU/USDthe six real-world feeds moved onto everyBlock still carry their class's step cap (2,000 bps for the equities, 1,000 bps for gold), so a move wider than that is skipped unless the market status changed in the same update. Ring capacity 1,024
10 bps / 60 sthe other 6 crypto feedsrepublished on a 10 bps move or after 60 s, whichever is first. No step cap. Ring capacity 1,024
10 bps / 300 s, step 2,000 bpsthe 4 remaining equities and the 3 energy indicesa move wider than 20 % is skipped by the contract unless the market status changed in the same update
5 bps / 300 s, step 1,000 bpsXAG/USDthe metal moves less, so the trigger is tighter and the implausible-move cap is 10 %. XAU/USD kept the same trigger shape until it moved to everyBlock
2 bps / 300 s, step 500 bpsthe 5 FX pairsthe tightest trigger in the set, and a 5 % cap - an FX pair that moves further in one update is not moving, it is wrong

最も誤読されやすいのが、値動きの上限の行です。暗号資産のフィードではすべて 0、すなわち無効であり、現実世界のフィードではすべて有効です。したがって 一歩で上限を超えて動く現実世界の更新は、書き込まれるのではなくコントラクトによって飛ばされます。同じ更新で市場の状態が変わった場合を 除いてのことです。その例外が、週末の窓開けを着地させています。

フィードのレコードが運ぶもの

フィールドジェネシスの集合での値
symbolBASE/QUOTE^[A-Z0-9.]+/[A-Z]+$, at most 32 bytes, unique. The contract enforces the same shape
descriptionfree textthe Chainlink-style spaced form, "ETH / USD"; description() returns it and symbol() returns the canonical one
assetClasscrypto | equity | commodity | fx | indexstored as 1-5
decimals8every feed in the catalog. The field allows 0-18, so read it rather than assuming
capacityring length in rounds16,384 for ETH/USD and BTC/USD, 1,024 for every other feed - including the twelve other feeds now on everyBlock. Rounds older than this are overwritten
policypaused | everyBlock | deviationstored as 0, 1, 2. A paused feed is skipped rather than refused
deviationBps10, 5 or 2the move that triggers a republish. 0 on an everyBlock feed, which needs no trigger
heartbeatSecs60 or 300republish even without a move. 0 on an everyBlock feed
maxStepBps0, 500, 1,000 or 2,000the contract skips a move wider than this. 0 disables the check and is what every crypto feed carries; every real-world feed has it live. Bypassed whenever the status changed
minSources3 on an exchange-backed feed, 1 on a Pyth-only feedthe floor below which nothing is published
sources{ exchanges: {venue: productId}, pyth: id }the venue-native product id per venue, and the Pyth feed id without its 0x

同じフィールドがオンチェーンでのフィードの設定でもあるので、pickle_prices や feeds(offset, limit) から読めるのは、このレコードに最新のラウンドを加えた ものです。decimals は今日どのフィードでも 8 で、フィールド自体は 0 から 18 を 許します。仮定せずに読んでください。間違いの代償は、8 桁ずれた価格だからです。

フィード ID

フィードは、インデックスでもアドレスでもなく、シンボルのハッシュでキーが付きます。

solidity
bytes32 feedId = keccak256(bytes("ETH/USD"));

The canonical symbol, upper case, with a single slash - keccak256("ETH/USD"), not "ETH-USD" and not "eth/usd". The same 32 bytes key the contract's mappings, name the feed on the RPC, and appear as the indexed topic of every FeedUpdated log. You can compute it offline with any keccak-256 implementation; nothing has to be fetched to know it.

The node and the service both accept ETH/USD, ETH-USD, eth-usd or 0x<64 hex feed id and normalise before looking up, so a URL-safe spelling costs nothing.

アドレスを解決する

このリファレンスはコントラクトアドレスを印字しません

レジストリとフィードごとのアダプターは正規の事前配置であり、チェーンの一生を通じて ジェネシスで固定されています。リテラルを公開するのが最も悪いのは、まさにこの場合です。 コードのないアカウントへの EVM の CALL は成功します。 打ち間違えたアドレスは revert せず、何も返さず、価格ゼロとして読めてしまいます。だから このサイトは代わりに解決の仕組みを記述します。

The price registry and one adapter per feed are predeploys: their addresses are fixed at genesis and canonical for the life of the chain. That is precisely why this reference resolves them instead of printing them.

  • pickle_prices answers with the registry's address in core and each feed's adapter in feeds[].adapter, checksummed. That is the shortest path and it needs no ABI.
  • pickle_price(feed) carries that feed's adapter; pickle_ethUsdPrice carries the adapter, the registry and, under contract, the adapter again, which is what a Chainlink reader should be pointed at.
  • On chain, adapterOf(feedId) returns the deployed adapter and adapterAddress(feedId) recomputes it: the adapter is CREATE2 from the registry with salt = feedId, so its address is a pure function of the registry address and the symbol.
  • The first-party applications resolve every address they use at runtime rather than compiling one in - shared-ui/config.js merges the deployment's address files into config.addresses at load.
  • The explorer shows that address as an account, with its code and its activity, which is the human-readable cross-check that something is deployed there. It publishes no source and no ABI: the repository is not public yet, and the explorer verifies no contract.
bash
# The registry and one feed's adapter, resolved from the chain itself.
curl -s $RPC_URL \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"pickle_price","params":["ETH-USD"]}' \
  | jq '{adapter: .result.adapter, feedId: .result.feedId}'

# Then prove the address has code before you call it.
curl -s $RPC_URL \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getCode","params":["<adapter>","latest"]}'

Verify a resolved address with an eth_getCode before your first call. A CALL to an account with no code succeeds and returns nothing, so a wrong address does not revert - it reads as a price of zero.