dfinity / exchange-rate-canister

The exchange rate canister (XRC) makes use of the HTTP requests feature to provide exchange rates as a service to the IC.
Apache License 2.0
37 stars 10 forks source link

Require a minimum number of sources for privileged canisters when serving from the cache #179

Closed THLO closed 1 year ago

THLO commented 1 year ago

There is a risk that an attacker might try to get an exchange rate based on the rates of a small number of exchanges into the cache by timing the request carefully. The CMC might then be served this rate.

This PR changes adds the restriction that cached rates may only be served to all privileged canisters if they are based on a specific minimum number of collected rates.