makerdao / ilk-registry

A publicly-modifiable registry of ilks in the Dai Stablecoin System.
GNU Affero General Public License v3.0
22 stars 18 forks source link

Refactor to use core contracts rather than storage #9

Closed brianmcmichael closed 4 years ago

brianmcmichael commented 4 years ago

This PR was inspired by a conversation with @gbalabasquer , however I'm not sure that this implementation is more efficient than the existing one.

brianmcmichael commented 4 years ago

This solution is probably going to be more expensive than just calling directly from contract storage.

An intermediary solution would be to keep the original design, but add a new public function that anyone can call to reset the flip/pip/gem etc. from the core contracts. That way when, say, the flips are updated, anyone can call a function to perform an update in the registry. This would effectively invalidate the file function for the affected variables.