The SalvorLending::setDutchAuction function invocations referenced will utilize a fixed "start price" of three times the loan offer amount, however, that value is not necessarily greater than the endPrice as the rate of a lending pool is uncapped.
Impact:
The Dutch auction of the loan will be inoperable if its starting price is greater than its end price due to an underflow occurring within SalvorLending::getDutchPrice.
We advise the code to instead configure the start price as three times the endPrice, ensuring that the gradient via which the price reduces is properly scaled based on the loan's evaluation.
SLG-06M: Incorrect Configuration of Dutch Auction
Description:
The
SalvorLending::setDutchAuction
function invocations referenced will utilize a fixed "start price" of three times the loan offer amount, however, that value is not necessarily greater than theendPrice
as the rate of a lending pool is uncapped.Impact:
The Dutch auction of the loan will be inoperable if its starting price is greater than its end price due to an underflow occurring within
SalvorLending::getDutchPrice
.Example:
Recommendation:
We advise the code to instead configure the start price as three times the
endPrice
, ensuring that the gradient via which the price reduces is properly scaled based on the loan's evaluation.