@@ -22,7 +22,7 @@ import { isSessionKeyMode } from '../synapse/index.js'
2222// Constants
2323export const USDFC_DECIMALS = 18
2424const MIN_FIL_FOR_GAS = ethers . parseEther ( '0.1' ) // Minimum FIL padding for gas
25- export const DEFAULT_LOCKUP_DAYS = 10 // WarmStorage requires 10 days lockup
25+ export const DEFAULT_LOCKUP_DAYS = 30 // WarmStorage requires 30 days lockup
2626
2727// Maximum allowances for trusted WarmStorage service
2828// Using MaxUint256 which MetaMask displays as "Unlimited"
@@ -379,7 +379,7 @@ export async function setServiceApprovals(
379379) : Promise < string > {
380380 const warmStorageAddress = synapse . getWarmStorageAddress ( )
381381
382- // Max lockup period is always 10 days worth of epochs for WarmStorage
382+ // Max lockup period is always 30 days worth of epochs for WarmStorage
383383 const maxLockupPeriod = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
384384
385385 // Set the service approval
@@ -535,7 +535,7 @@ export function calculateStorageAllowances(storageTiB: number, pricePerTiBPerEpo
535535 // Calculate rate allowance (per epoch payment)
536536 const rateAllowance = ( pricePerTiBPerEpoch * BigInt ( scaledStorage ) ) / BigInt ( scale )
537537
538- // Calculate lockup allowance (10 days worth)
538+ // Calculate lockup allowance (30 days worth)
539539 const epochsIn10Days = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
540540 const lockupAllowance = rateAllowance * epochsIn10Days
541541
@@ -587,7 +587,7 @@ export function calculateActualCapacity(rateAllowance: bigint, pricePerTiBPerEpo
587587export function calculateStorageFromUSDFC ( usdfcAmount : bigint , pricePerTiBPerEpoch : bigint ) : number {
588588 if ( pricePerTiBPerEpoch === 0n ) return 0
589589
590- // Calculate how much this covers for 10 days
590+ // Calculate how much this covers for 30 days
591591 const epochsIn10Days = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
592592 const ratePerEpoch = usdfcAmount / epochsIn10Days
593593
@@ -597,7 +597,7 @@ export function calculateStorageFromUSDFC(usdfcAmount: bigint, pricePerTiBPerEpo
597597/**
598598 * Compute the additional deposit required to fund current usage for a duration.
599599 *
600- * The WarmStorage service maintains ~10 days of lockup (lockupUsed) and draws future
600+ * The WarmStorage service maintains ~30 days of lockup (lockupUsed) and draws future
601601 * lockups from the available deposit (deposited - lockupUsed). To keep the current
602602 * rails alive for N days, ensure available >= N days of spend at the current rateUsed.
603603 *
@@ -835,7 +835,7 @@ export function calculateDepositCapacity(
835835 }
836836
837837 // With infinite allowances, deposit is the only limiting factor
838- // Deposit needs to cover: lockup (10 days) + at least some buffer
838+ // Deposit needs to cover: lockup (30 days) + at least some buffer
839839 const epochsIn10Days = BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
840840 const epochsPerMonth = TIME_CONSTANTS . EPOCHS_PER_MONTH
841841
0 commit comments