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
feat(pricing): make pricing constants mutable with owner-controlled u… (#325)
Makes the three pricing rate constants mutable storage variables instead
of immutable, enabling future price adjustments without requiring
contract upgrades.
## Changes
- **Pricing Variables**: Converted `STORAGE_PRICE_PER_TIB_PER_MONTH`,
`CACHE_MISS_PRICE_PER_TIB_PER_MONTH`, and `CDN_PRICE_PER_TIB_PER_MONTH`
from immutable constants to mutable storage variables
- **New Function**: Added `updatePricing()` - owner-only function that
allows selective updates to pricing rates (pass 0 to keep existing
value)
- **New Getter**: Added `getCurrentPricingRates()` - public view
function to query current pricing values
- **New Event**: Added `PricingUpdated` event to track pricing changes
- **Lockup Amounts**: `DEFAULT_CDN_LOCKUP_AMOUNT` and
`DEFAULT_CACHE_MISS_LOCKUP_AMOUNT` remain immutable as they are not
expected to change
## Impact
- New price rates will apply to all active data sets on their next
proving period update (via `nextProvingPeriod()`)
---------
Co-authored-by: William Morriss <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
23
23
- Use `getDataSetStatusDetails()` to check termination status separately from Active/Inactive status
24
24
- Subgraph schema updated with status enum and history tracking
25
25
-**Calibnet**: Reduced DEFAULT_CHALLENGE_WINDOW_SIZE from 30 epochs to 20 epochs for faster testing iteration
26
+
- Made storage pricing and minimum rate mutable storage variables instead of immutable constants ([#306](https://github.com/FilOzone/filecoin-services/issues/306))
27
+
-`storagePricePerTibPerMonth` (initially 2.5 USDFC, max 10 USDFC)
28
+
-`minimumStorageRatePerMonth` (initially 0.06 USDFC, max 0.24 USDFC)
29
+
- Added `updatePricing(uint256 newStoragePrice, uint256 newMinimumRate)` function to allow owner to update pricing rates without contract upgrades
0 commit comments