tokenized-strategy-periphery
tokenized-strategy-periphery copied to clipboard
feat: add minimum price
Adds a configurable minimumPrice parameter to the auction contract that automatically deactivates auctions when the price decays below the specified threshold.
- Added
minimumPricestate 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 onprice > 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