Skip to content

calculateEffectiveRate

calculateEffectiveRate(params): OutputType

Defined in: packages/synapse-core/src/warm-storage/calculate-effective-rate.ts:64

Calculate the expected FWSS recurring rate for a contract-priced data-set size.

Returns two rates for different use cases:

  • ratePerEpoch — matches the on-chain rail rate (use for lockup math)
  • ratePerMonth — higher precision, linearly scalable (use for display)

Callers matching on-chain behavior must first combine all PDP leaf counts, then convert that aggregate count with leafCountToRawSize. Empty data sets have no recurring rate. Non-empty data sets pay the size-based storage rate plus the per-data-set proving service fee.

ParameterTypeDescription
paramsParamsTypecalculateEffectiveRate.ParamsType

OutputType

calculateEffectiveRate.OutputType