Skip to content

calculateLifecycleReserveFunding

calculateLifecycleReserveFunding(params): OutputType

Defined in: packages/synapse-core/src/warm-storage/calculate-lifecycle-reserve-funding.ts:48

Calculate lifecycle-reserve funding for an upload.

FWSS pays operation fees from the PDP rail’s fixed lifecycle reserve. Before the fee flush it replenishes an active reserve when the remaining balance would fall below replenishThreshold. pieceSizes represents one add-pieces operation and therefore one fee flush.

Operation fees remain real charges, but they must not also be added directly to the deposit: paying a fee reduces account funds and fixed lockup by the same amount. Only initial reserve creation and conditional replenishments require additional funding.

ParameterTypeDescription
paramsParamsTypecalculateLifecycleReserveFunding.ParamsType

OutputType

Lifecycle funding and expected final balance calculateLifecycleReserveFunding.OutputType

ValidationError when counts or existing reserve state are invalid