@@ -537,9 +537,9 @@ export function calculateStorageAllowances(storageTiB: number, pricePerTiBPerEpo
537537 // Calculate rate allowance (per epoch payment)
538538 const rateAllowance = ( pricePerTiBPerEpoch * BigInt ( scaledStorage ) ) / BigInt ( scale )
539539
540- // Calculate lockup allowance (30 days worth)
541- const epochsIn10Days = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
542- const lockupAllowance = rateAllowance * epochsIn10Days
540+ // Calculate lockup allowance
541+ const epochsInLockupDays = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
542+ const lockupAllowance = rateAllowance * epochsInLockupDays
543543
544544 return {
545545 rateAllowance,
@@ -580,7 +580,7 @@ export function calculateActualCapacity(rateAllowance: bigint, pricePerTiBPerEpo
580580 * Calculate storage capacity from USDFC amount
581581 *
582582 * Determines how much storage can be purchased with a given USDFC amount,
583- * accounting for the 10 -day lockup period.
583+ * accounting for the 30 -day lockup period.
584584 *
585585 * @param usdfcAmount - Amount of USDFC in its smallest unit
586586 * @param pricePerTiBPerEpoch - Current pricing from storage service
@@ -589,9 +589,9 @@ export function calculateActualCapacity(rateAllowance: bigint, pricePerTiBPerEpo
589589export function calculateStorageFromUSDFC ( usdfcAmount : bigint , pricePerTiBPerEpoch : bigint ) : number {
590590 if ( pricePerTiBPerEpoch === 0n ) return 0
591591
592- // Calculate how much this covers for 30 days
593- const epochsIn10Days = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
594- const ratePerEpoch = usdfcAmount / epochsIn10Days
592+ // Calculate how much this covers for lockup
593+ const epochsInLockupDays = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
594+ const ratePerEpoch = usdfcAmount / epochsInLockupDays
595595
596596 return calculateActualCapacity ( ratePerEpoch , pricePerTiBPerEpoch )
597597}
@@ -808,7 +808,7 @@ export function computeAdjustmentForExactDaysWithFile(
808808 * treating WarmStorage as fully trusted with max allowances, i.e. not
809809 * accounting for allowance limits. If usage limits need to be accounted for
810810 * then the capacity can be capped by either deposit or allowances.
811- * This function accounts for the 10 -day lockup requirement.
811+ * This function accounts for the 30 -day lockup requirement.
812812 *
813813 * @param depositAmount - Amount deposited in USDFC
814814 * @param pricePerTiBPerEpoch - Current pricing from storage service
@@ -838,21 +838,21 @@ export function calculateDepositCapacity(
838838
839839 // With infinite allowances, deposit is the only limiting factor
840840 // Deposit needs to cover: lockup (30 days) + at least some buffer
841- const epochsIn10Days = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
841+ const epochsInLockupDays = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
842842 const epochsPerMonth = TIME_CONSTANTS . EPOCHS_PER_MONTH
843843
844844 // Maximum storage we can support with this deposit
845845 // Reserve 10% for buffer beyond the lockup
846846 // Calculate max rate per epoch we can afford with deposit
847- const maxRatePerEpoch = ( depositAmount * BUFFER_DENOMINATOR ) / ( epochsIn10Days * BUFFER_NUMERATOR )
847+ const maxRatePerEpoch = ( depositAmount * BUFFER_DENOMINATOR ) / ( epochsInLockupDays * BUFFER_NUMERATOR )
848848
849849 // Convert to storage capacity
850850 const tibPerMonth = calculateActualCapacity ( maxRatePerEpoch , pricePerTiBPerEpoch )
851851 const gibPerMonth = tibPerMonth * 1024
852852
853853 // Calculate the actual costs for this capacity
854854 const monthlyPayment = maxRatePerEpoch * epochsPerMonth
855- const requiredLockup = maxRatePerEpoch * epochsIn10Days
855+ const requiredLockup = maxRatePerEpoch * epochsInLockupDays
856856 const totalRequired = withBuffer ( requiredLockup )
857857
858858 return {
0 commit comments