ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 49 forks source link

Price Sanity Prompt #945

Open kilrau opened 5 years ago

kilrau commented 5 years ago

Enhancement of https://github.com/ExchangeUnion/xud/issues/163 (https://github.com/ExchangeUnion/xud/pull/921):

we want to introduce a price sanity check within xucli to throw a prompt along the lines The price you entered is more than 10% above the best market price. Are you sure you want to place this order? [y/N]. Prompt won't come up for an empty order book.

https://github.com/ExchangeUnion/xud-ui should implement this separately at the same time.

kilrau commented 4 years ago

Thanks for the feedback to bump prio of this one. Updated the description. Wdyt? @michael1011

michael1011 commented 4 years ago

I agree with the concept. In my opinion it should be implemented in xucli and other applications building on XUD and not XUD itself since the definition of sane is subjective and consumers of the XUD API, like arby, probably have own sanity checks in place already and should know better than XUD anyways.

10% might be a little conservative when considering the current liquidity in the network but that is just a constant which can easily be changed once the actual logic is in place.