Keydonix / liquid-long

The Unlicense
8 stars 1 forks source link

Return larger range for getEstimatedCostsInEth #70

Closed epheph closed 5 years ago

epheph commented 5 years ago

If the "low" estimate is very low, the high estimate is only double that, leaving a situation where you have a low of 0.001 and a high of 0.002. Make the max some other value if 2*low ends up being too small. I recommend:

max(
  2*low,
  _wethBought * .05
)

Allow purchase price of eth to be 5% over feed price.