New Exchange Rate Mechanism


We propose to replace the existing proposal-based ICP/XDR conversion rate mechanism with an exchange rate canister that makes use of the forthcoming HTTP call feature.
The new mechanism not only improves decentralization but also provides a more general service, offering current exchange rates for arbitrary cryptocurrency and fiat currency pairs.



Key people involved

David Ribeiro Alves, Ryan Croote, Yotam Harchol, Thomas Locher


Since the price of cycles is pegged to the IMF SDR and cycles are obtained by burning ICP, the NNS has to know the current ICP/XDR rate at all times.

The current mechanism uses “conversion rate providers”, which periodically fetch pricing information from market data providers and exchanges and then create NNS proposals to update the conversion rate.

While it is a fairly safe mechanism, it has several shortcomings:

  • Everybody could generate such proposals in theory but there is little incentive to do so. As a result, the whole mechanism is controlled by DFINITY, which means it is not a (fully) decentralized mechanism.
  • The NNS needs to deal with a large number of conversion rate proposals daily. As the market sets the conversion rate, there shouldn’t be a need to further vote on it.
  • DFINITY needs to make sure that the conversion rate providers are always running and be ready to step in whenever there are issues.

We propose to replace this mechanism with an entirely different mechanism based on the HTTP call feature.
The main component of the new mechanism is an exchange rate canister that queries market data providers and exchanges, using HTTP calls, in order to reply to exchange rate request from other canisters.
For example, the cycle minting canister will periodically request the ICP/XDR conversion rate from the exchange rate canister.

We believe that being able to reliably retrieve exchange rates will also benefit a range of other services developed by the community.

Next Steps

The first step is to get feedback and input from the community here in the forum.
There will be a community conversation about this topic, tentatively scheduled for August 18, 2022.
After the community conversation, a motion proposal will be issued. If the proposal is accepted, development will start soon thereafter.


This is a perfect first use case of the new HTTP request feature!

Which API are you calling to get the pricing data though? Will this be made public?

We will likely use historical candlestick data, aggregated over a one-minute interval, in order to ensure deterministic responses.
This type of information can be obtained from most exchanges.

And yes, the whole exchange rate canister will be open-sourced!


Perfect use of the HTTPS feature. Will the update rate be the same as the current exchange rate canister?

A requested exchange rate will be fetched on demand, so there is no fixed update rate.

The ICP/XDR rate will probably be an exception because we know that the cycle minting canister will request it periodically. There is no decision yet on the update rate but we could certainly update it more frequently than once every ten minutes as it is done now.

1 Like

team, come and join community conversation on August 18, 2022: Live Sessions | Internet Computer Home

1 Like