ensdomains / ethregistrar

BSD 2-Clause "Simplified" License
94 stars 55 forks source link

Refactor price oracles and introduce a linear premium price oracle #53

Closed Arachnid closed 4 years ago

Arachnid commented 4 years ago

This new oracle type applies a premium to reregistration of recently expired domains that starts high and diminishes over time.

Arachnid commented 4 years ago

@makoto PTAL

Arachnid commented 4 years ago

@makoto @decanus PTAL

Arachnid commented 4 years ago

@makoto @decanus PTAL. I've fixed the timeUntilPremium function to work on wei as you'd expect it to instead of on attoUSD.

makoto commented 4 years ago

timeUntilPremium

makoto commented 4 years ago

I've fixed the timeUntilPremium function to work on wei as you'd expect it to instead of on attoUSD.

Actually, should people ask extimated time in wei when ETH is volatile (or should I show in USD in UI and convert to ETH when lookup the function)?

Arachnid commented 4 years ago

Actually, should people ask extimated time in wei when ETH is volatile (or should I show in USD in UI and convert to ETH when lookup the function)?

API-wise, we charge in wei and all other pricing functions return prices in wei, so I thought it made the most sense for this function's argument to also be in wei. Display-wise, we should definitely continue to show USD equivalents in the UI.

DeFiDude commented 4 years ago

Will the premium paid end up going to the ENS team? Or will a portion/all of it be given to the previous owner?

I'm sure the answer is somewhere in the code but I'm a GitHub/coding noob, sorry.