tokenized-strategy-periphery icon indicating copy to clipboard operation
tokenized-strategy-periphery copied to clipboard

feat: add minimum price

Open johnnyonline opened this issue 1 month ago • 0 comments

Adds a configurable minimumPrice parameter to the auction contract that automatically deactivates auctions when the price decays below the specified threshold.

  • Added minimumPrice state variable (scaled to 1e18)
  • Added setMinimumPrice() governance function to configure the minimum price
  • Modified _price() to return 0 when current price falls below minimum, making the auction inactive
  • Updated isActive() to rely on price > 0, which now accounts for minimum price
  • Modified _kick() to allow re-kicking when price is below minimum (even if auction length hasn't fully elapsed)
  • Removed redundant auction expiry/kicked checks from _take() - these are now handled implicitly by _price() returning 0 (causing _getAmountNeeded() to return 0 and revert with "zero needed") when the auction is expired, not kicked, or below minimum price

johnnyonline avatar Nov 19 '25 18:11 johnnyonline