makerdao / univ2-lp-oracle

GNU Affero General Public License v3.0
23 stars 13 forks source link

CVF-43: Remove change() function #26

Closed brianmcmichael closed 3 years ago

brianmcmichael commented 3 years ago

Addresses AVDK CVF-43

Remove the ability to change() the src. Also makes the src immutable for gas savings.

Changing the src contract does not re-normalize the normalizerX variables, so it's possible to get into a situation where the src token decimals don't match expected values, and there's no extra validation.

Simplest solution here is to remove src modifier and make calls to it more efficient by making it immutable. If the src needs to be changed the oracle can be re-deployed.