BendDAO / bend-lending-protocol

BendDAO Lending Protocol for Web3 Data Liquidity
Other
126 stars 55 forks source link

When the floor price rises rapidly during the auction process, it will result in deny bid. #44

Closed xiaoxiaoleo closed 2 years ago

xiaoxiaoleo commented 2 years ago

Describe the bug When the floor price rises rapidly during the auction process, it will result in deny bid. In LiquidateLogic.sol - executeAuction():

      // loan's accumulated debt must exceed threshold (heath factor below 1.0)
      require(vars.borrowAmount > vars.thresholdPrice, Errors.LP_BORROW_NOT_EXCEED_LIQUIDATION_THRESHOLD);

thresholdPrice will increase when floor price rise, if floor price rise is high enough to cause heath factor greater than 1.0, then customer can not bid anymore.

Screenshots image

thorseldon commented 2 years ago

Look at the state check, only the first-time bid will check this. The loan state will change to Auction after the first bid succeeds.