makerdao / univ2-lp-oracle

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

Reset prices on oracle stop and tests of same #19

Closed brianmcmichael closed 3 years ago

brianmcmichael commented 3 years ago

On oracle stop, sets prices and has to zero.

Do we also want to set zzz = now?

NiklasKunkel commented 3 years ago

I don't think setting zzz is necessary imo. This gives us the freedom to do a stop/start/poke in a single batched tx. Alternatively I guess we could use step to set temporarily set hop to 0 and then change it back, but that seems much more convoluted. Can you think of a scenario where setting zzz on stop might be desirable?

brianmcmichael commented 3 years ago

So I was thinking that if zzz were zero then pass() would be true if it was reactivated within an hour. That may be unlikely.