Difference between revisions of "Exchange rate canister"
(The exchange rate canister provides exchange rate information to other canisters.) |
|||
Line 1: | Line 1: | ||
− | = | + | == Overview == |
− | |||
− | == | ||
The exchange rate canister (XRC) is a canister running on the [https://dashboard.internetcomputer.org/subnet/uzr34-akd3s-xrdag-3ql62-ocgoh-ld2ao-tamcv-54e7j-krwgb-2gm4z-oqe uzr34 system subnet] that provides exchange rates to requesting canisters. | The exchange rate canister (XRC) is a canister running on the [https://dashboard.internetcomputer.org/subnet/uzr34-akd3s-xrdag-3ql62-ocgoh-ld2ao-tamcv-54e7j-krwgb-2gm4z-oqe uzr34 system subnet] that provides exchange rates to requesting canisters. | ||
Line 10: | Line 8: | ||
The XRC constitutes an on-chain oracle for exchange rates, which is particularly useful for DeFi applications but can further add value to any application that requires exchange rate information. | The XRC constitutes an on-chain oracle for exchange rates, which is particularly useful for DeFi applications but can further add value to any application that requires exchange rate information. | ||
− | The cycle minting canister of the | + | The cycle minting canister of the [https://wiki.internetcomputer.org/wiki/NNS_Canisters|NNS] will make use of the XRC to obtain up-to-date ICP/XDR rates, which it requires for the conversion of ICP to cycles. |
Revision as of 10:36, 13 January 2023
Overview
The exchange rate canister (XRC) is a canister running on the uzr34 system subnet that provides exchange rates to requesting canisters. A request comprises a base asset, a quote asset, and an optional (UNIX epoch) timestamp. The base and quote asset can be any combination of cryptocurrency and fiat currency assets, for example, BTC/ICP, ICP/USD, or USD/EUR. The timestamp parameter makes it possible to request historic rates. If no timestamp is provided in the request, the rate for the current time is returned.
The XRC constitutes an on-chain oracle for exchange rates, which is particularly useful for DeFi applications but can further add value to any application that requires exchange rate information.
The cycle minting canister of the [1] will make use of the XRC to obtain up-to-date ICP/XDR rates, which it requires for the conversion of ICP to cycles.