@@ -539,9 +539,9 @@ export function calculateStorageAllowances(storageTiB: number, pricePerTiBPerEpo
539539 // Calculate rate allowance (per epoch payment)
540540 const rateAllowance = ( pricePerTiBPerEpoch * BigInt ( scaledStorage ) ) / BigInt ( scale )
541541
542- // Calculate lockup allowance (30 days worth)
543- const epochsIn10Days = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
544- const lockupAllowance = rateAllowance * epochsIn10Days
542+ // Calculate lockup allowance
543+ const epochsInLockupDays = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
544+ const lockupAllowance = rateAllowance * epochsInLockupDays
545545
546546 return {
547547 rateAllowance,
@@ -582,7 +582,7 @@ export function calculateActualCapacity(rateAllowance: bigint, pricePerTiBPerEpo
582582 * Calculate storage capacity from USDFC amount
583583 *
584584 * Determines how much storage can be purchased with a given USDFC amount,
585- * accounting for the 10 -day lockup period.
585+ * accounting for the 30 -day lockup period.
586586 *
587587 * @param usdfcAmount - Amount of USDFC in its smallest unit
588588 * @param pricePerTiBPerEpoch - Current pricing from storage service
@@ -591,9 +591,9 @@ export function calculateActualCapacity(rateAllowance: bigint, pricePerTiBPerEpo
591591export function calculateStorageFromUSDFC ( usdfcAmount : bigint , pricePerTiBPerEpoch : bigint ) : number {
592592 if ( pricePerTiBPerEpoch === 0n ) return 0
593593
594- // Calculate how much this covers for 30 days
595- const epochsIn10Days = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
596- const ratePerEpoch = usdfcAmount / epochsIn10Days
594+ // Calculate how much this covers for lockup
595+ const epochsInLockupDays = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
596+ const ratePerEpoch = usdfcAmount / epochsInLockupDays
597597
598598 return calculateActualCapacity ( ratePerEpoch , pricePerTiBPerEpoch )
599599}
@@ -810,7 +810,7 @@ export function computeAdjustmentForExactDaysWithPiece(
810810 * treating WarmStorage as fully trusted with max allowances, i.e. not
811811 * accounting for allowance limits. If usage limits need to be accounted for
812812 * then the capacity can be capped by either deposit or allowances.
813- * This function accounts for the 10 -day lockup requirement.
813+ * This function accounts for the 30 -day lockup requirement.
814814 *
815815 * @param depositAmount - Amount deposited in USDFC
816816 * @param pricePerTiBPerEpoch - Current pricing from storage service
@@ -840,21 +840,21 @@ export function calculateDepositCapacity(
840840
841841 // With infinite allowances, deposit is the only limiting factor
842842 // Deposit needs to cover: lockup (30 days) + at least some buffer
843- const epochsIn10Days = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
843+ const epochsInLockupDays = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
844844 const epochsPerMonth = TIME_CONSTANTS . EPOCHS_PER_MONTH
845845
846846 // Maximum storage we can support with this deposit
847847 // Reserve 10% for buffer beyond the lockup
848848 // Calculate max rate per epoch we can afford with deposit
849- const maxRatePerEpoch = ( depositAmount * BUFFER_DENOMINATOR ) / ( epochsIn10Days * BUFFER_NUMERATOR )
849+ const maxRatePerEpoch = ( depositAmount * BUFFER_DENOMINATOR ) / ( epochsInLockupDays * BUFFER_NUMERATOR )
850850
851851 // Convert to storage capacity
852852 const tibPerMonth = calculateActualCapacity ( maxRatePerEpoch , pricePerTiBPerEpoch )
853853 const gibPerMonth = tibPerMonth * 1024
854854
855855 // Calculate the actual costs for this capacity
856856 const monthlyPayment = maxRatePerEpoch * epochsPerMonth
857- const requiredLockup = maxRatePerEpoch * epochsIn10Days
857+ const requiredLockup = maxRatePerEpoch * epochsInLockupDays
858858 const totalRequired = withBuffer ( requiredLockup )
859859
860860 return {
0 commit comments