an important security enhance

Started by alt, December 09, 2015, 12:30:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sudo

Quote from: alt on December 09, 2015, 12:30:46 PM
now, don't know why, several witness publish feed price double
for CNY, the normal price is 0.025, but some witness publish 0.049.

this can be a very serious security problem.
if more witness give wrong price, we will get a final feed price at 0.049,
users can borrow CNY at price 0.049, the collatereal is not enough,  a black swan will happe.

I don't want to talk about why they give a wrong feed price, maybe it's a bug of feed script,
maybe an exchange return a wrong price

the more important thing is we should  avoid this happen even if the witness give a wrong feed price.
so I ask for a new limit at the borrow logic

currently when we borrow from the wallet, the collatereal's price is the feed price.
we should get it from min(feed price, highest bid price)

+5% +5%

alt

#1
now, don't know why, several witness publish feed price double
for CNY, the normal price is 0.025, but some witness publish 0.049.

this can be a very serious security problem.
if more witness give wrong price, we will get a final feed price at 0.049,
users can borrow CNY at price 0.049, the collatereal is not enough,  a black swan will happe.

I don't want to talk about why they give a wrong feed price, maybe it's a bug of feed script,
maybe an exchange return a wrong price

the more important thing is we should  avoid this happen even if the witness give a wrong feed price.
so I ask for a new limit at the borrow logic

currently when we borrow from the wallet, the collatereal's price is the feed price.
we should get it from min(feed price, highest bid price)