You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During testing of liquidation auction bidding (using clipper contract), I got several Clipper/too-expensive errors. According to the name of the variable and the comment, max argument of the take function is Maximum acceptable price (DAI / collateral) [ray], but later in the code it is checked to be smaller than the price:
To my understanding, maximum acceptable price argument suppose to prevent bidding on an auction that is too expensive, right? So, for example, if maximum acceptable price is 10 and auction price is 20, it should revert the transaction. But currently it's the opposite: it prevents the transactions which are cheaper then expected (which should be totally fine for the end user). Moreover it is even exclusive of the current auction price, so sending current price as maximum acceptable price will also revert the transaction. Or maybe I misunderstood the meaning of this argument?
The Solution
To change the validation to be:
require(price > max, "Clipper/too-expensive");
The text was updated successfully, but these errors were encountered:
During testing of liquidation auction bidding (using clipper contract), I got several
Clipper/too-expensive
errors. According to the name of the variable and the comment,max
argument of thetake
function isMaximum acceptable price (DAI / collateral) [ray]
, but later in the code it is checked to be smaller than the price:dss/src/clip.sol
Line 350 in eacdaa4
The Problem
To my understanding,
maximum acceptable price
argument suppose to prevent bidding on an auction that is too expensive, right? So, for example, ifmaximum acceptable price
is10
and auction price is20
, it should revert the transaction. But currently it's the opposite: it prevents the transactions which are cheaper then expected (which should be totally fine for the end user). Moreover it is even exclusive of the current auction price, so sending currentprice
asmaximum acceptable price
will also revert the transaction. Or maybe I misunderstood the meaning of this argument?The Solution
To change the validation to be:
The text was updated successfully, but these errors were encountered: