Skip to content

Commit 22e3f0d

Browse files
committed
fixup! feat: floor price set to 0.06 USDFC/month per data set
1 parent 3e56dad commit 22e3f0d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

service_contracts/src/FilecoinWarmStorageService.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ contract FilecoinWarmStorageService is
158158
uint256 pricePerTiBPerMonthWithCDN; // Price with CDN add-on (3 USDFC per TiB per month)
159159
IERC20 tokenAddress; // Address of the USDFC token
160160
uint256 epochsPerMonth; // Number of epochs in a month
161+
uint256 minimumPricePerMonth; // Minimum monthly charge for any dataset size (0.06 USDFC)
161162
}
162163

163164
// Used for announcing upgrades, packed into one slot
@@ -1330,7 +1331,8 @@ contract FilecoinWarmStorageService is
13301331
pricePerTiBPerMonthNoCDN: STORAGE_PRICE_PER_TIB_PER_MONTH,
13311332
pricePerTiBPerMonthWithCDN: STORAGE_PRICE_PER_TIB_PER_MONTH + CDN_PRICE_PER_TIB_PER_MONTH,
13321333
tokenAddress: usdfcTokenAddress,
1333-
epochsPerMonth: EPOCHS_PER_MONTH
1334+
epochsPerMonth: EPOCHS_PER_MONTH,
1335+
minimumPricePerMonth: MINIMUM_STORAGE_RATE_PER_MONTH
13341336
});
13351337
}
13361338

service_contracts/test/FilecoinWarmStorageService.t.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,11 +912,13 @@ contract FilecoinWarmStorageServiceTest is MockFVMTest {
912912
uint256 decimals = 18; // MockUSDFC uses 18 decimals in tests
913913
uint256 expectedNoCDN = 25 * 10 ** (decimals - 1); // 2.5 USDFC with 18 decimals
914914
uint256 expectedWithCDN = 3 * 10 ** decimals; // 3 USDFC with 18 decimals (2.5 + 0.5 CDN)
915+
uint256 expectedMinimum = (6 * 10 ** decimals) / 100; // 0.06 USDFC minimum
915916

916917
assertEq(pricing.pricePerTiBPerMonthNoCDN, expectedNoCDN, "No CDN price should be 2.5 * 10^decimals");
917918
assertEq(pricing.pricePerTiBPerMonthWithCDN, expectedWithCDN, "With CDN price should be 3 * 10^decimals");
918919
assertEq(address(pricing.tokenAddress), address(mockUSDFC), "Token address should match USDFC");
919920
assertEq(pricing.epochsPerMonth, 86400, "Epochs per month should be 86400");
921+
assertEq(pricing.minimumPricePerMonth, expectedMinimum, "Minimum price should be 0.06 * 10^decimals");
920922

921923
// Verify the values are in expected range
922924
assert(pricing.pricePerTiBPerMonthNoCDN < 10 ** 20); // Less than 10^20

0 commit comments

Comments
 (0)