OutputType
OutputType =
object
Defined in: packages/synapse-core/src/warm-storage/calculate-effective-rate.ts:18
Properties
Section titled “Properties”ratePerEpoch
Section titled “ratePerEpoch”ratePerEpoch:
bigint
Defined in: packages/synapse-core/src/warm-storage/calculate-effective-rate.ts:31
Rate per epoch — matches the contract’s additive per-epoch rate
(calculateStorageSizeBasedRatePerEpoch): the size-based storage rate plus
the per-epoch dataset fee, each truncated independently then summed:
(totalBytes * storagePerTibPerMonth) / (TiB * EPOCHS_PER_MONTH) + datasetFeePerMonth / EPOCHS_PER_MONTH
Because truncation depends on totalBytes, this value is only valid for the exact size it was computed for; you cannot scale it linearly to estimate costs for different sizes.
Use for: lockup calculations, on-chain comparisons.
ratePerMonth
Section titled “ratePerMonth”ratePerMonth:
bigint
Defined in: packages/synapse-core/src/warm-storage/calculate-effective-rate.ts:45
Rate per month — preserves precision before epoch division.
Computed as (totalBytes * storagePerTibPerMonth) / TiB (one fewer
division than ratePerEpoch), so it retains more precision and scales
linearly with size, making it suitable for display and cost estimation.
Note: this is slightly higher than ratePerEpoch * epochsPerMonth
(the actual on-chain monthly cost) due to integer truncation in the
per-epoch calculation.
Use for: display, cost comparisons across sizes.