You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update pricing for per-operation fees (#820)
* chore(docs): update latest pricing changes
* docs: update pricing docs for per-op model and fix MDX tables
Aligns three docs files with the per-op pricing model landed in
synapse-sdk#823 (synapse-sdk 1.0.1 / synapse-core 0.7.0):
- payments-and-storage.mdx: replace floor/sybil pricing with recurring
rates ($2.50/TiB/mo, $0.024/dataset/mo proving) and per-op fees table;
update dataset creation cost table; fix CDN unit to $14/TiB
- storage-costs.mdx: fix CDN unit, remove stale SDK-update caution,
update getUploadCosts() examples to surface fees and lockups fields
- about.mdx: add proving-fee conditionality clause, fix CDN unit,
mention lockup reserve in per-op fees sentence
- astro.config.mjs: add gfm: true to fix MDX table rendering (Astro 6
deprecated but still respects the option via @astrojs/mdx)
* docs: say empty data sets have no recurring cost
"Free"/"costs nothing" overstated it: an empty data set still pays the
one-time creation fee. Reword the storage rows and proving text on the
storage-costs, payments-and-storage, and about pages.
* docs: drop earlier-pricing comparisons
State current pricing only. The old $0.06/month floor comparison adds
noise here; release history belongs in a changelog.
* docs: note CDN must be enabled at data set creation
CDN cannot currently be added to an existing data set; the previous
wording implied it could be enabled later. Link FilOzone/filecoin-services#529
so readers can follow or weigh in on changing this.
* docs: clarify CDN lockups are refunded only if unused
The egress and cache-miss lockups are returned on finalization only to
the extent they were not spent.
* docs: normalize spelling to US English
finalised/finalisation -> finalized/finalization, matching the rest of
the repo and this file's existing usage.
These are fractions of a cent. They are drawn from a ~$0.10 lockup reserve held while the data set is active, not billed separately on each call. See [Storage Costs: How the fees and lockup work](/developer-guides/storage/storage-costs/#how-the-fees-and-lockup-work) for the mechanics.
66
+
67
+
### Proving Fee
56
68
57
-
Every dataset has a minimum monthly charge of **$0.06/month**, regardless of size. This compensates storage providers for the overhead of maintaining a dataset. Files under ~24.567 GiB all pay this same floor rate. Above that threshold, the natural rate (`bytes/TiB × $2.50/month`) takes over.
69
+
The monthly cost of an active data set is `(bytes / TiB) × $2.50 + $0.024`. There is no minimum floor: a data set with no pieces has no recurring cost, and the rate activates when the first piece is added. The proving fee is a flat addition per data set, on top of the per-size storage rate.
58
70
59
-
### Dataset Creation Costs
71
+
### Data Set Creation Costs
60
72
61
-
Creating a new dataset requires minimum available funds to cover the initial lockup plus the sybil fee:
73
+
Creating a data set locks a small lifecycle reserve. The storage rate starts at zero and is set automatically when you add data:
The storage rate starts at zero when a dataset is created and is set automatically when you add data.
80
+
One-time fees such as the $0.025 creation fee are drawn from the lifecycle reserve, not added on top of these amounts.
69
81
70
82
## Payment Rails
71
83
72
-
For each dataset, FWSS creates payment channels called **rails** that stream funds from your account to the storage provider. A dataset can have up to three rails:
84
+
For each data set, FWSS creates payment channels called **rails** that stream funds from your account to the storage provider. A data set can have up to three rails:
|**Cache miss**| Fixed | 0.3 USDFC lockup for cache miss credits |
79
91
80
-
Every dataset gets a PDP rail. CDN and cache miss rails are added only when CDN is enabled.
92
+
Every data set gets a PDP rail, which also holds the ~$0.10 lifecycle reserve that one-time fees draw from. CDN and cache miss rails are added only when CDN is enabled, which must happen at data set creation. CDN cannot currently be added to an existing data set. Follow [FilOzone/filecoin-services#529](https://github.com/FilOzone/filecoin-services/issues/529) to share your use case or track changes.
81
93
82
94
FWSS enforces a **30-day lockup period**: your account must always have enough funds to cover at least 30 days of storage at the current rate. Think of it as a security deposit. The funds aren't spent upfront, but they're reserved so providers are guaranteed payment even if you stop topping up.
83
95
84
-
When you add data to an existing dataset, FWSS automatically adjusts the rail's payment rate. The SDK calculates the correct deposit amount for you via `getUploadCosts()` and `prepare()`.
96
+
When you add data to an existing data set, FWSS automatically adjusts the rail's payment rate. The SDK calculates the correct deposit amount for you via `getUploadCosts()` and `prepare()`.
- CDN data sets require 1 USDFC setup on first creation only
37
-
- CDN egress credits can be topped up anytime
36
+
The monthly rate for an active data set is `(bytes / TiB) × $2.50 + $0.024`. There is no minimum floor: a data set with no pieces has no recurring cost, and the rate activates when the first piece is added.
37
+
38
+
### One-time fees
39
+
40
+
Each on-chain operation pays a small fee to the storage provider, covering the gas that provider spends on your behalf:
These are fractions of a cent. Think of them like gas: negligible for normal use, only adding up at very high operation volumes. They are paid from a small lockup reserve (~$0.10) held while the data set is active, not billed separately on every call. See [How the fees and lockup work](#how-the-fees-and-lockup-work) below.
50
+
51
+
:::note[CDN setup]
52
+
Enabling CDN adds two refundable lockups on first use: ~0.7 USDFC for egress credits and ~0.3 USDFC for cache-miss credits. Reusing an existing CDN data set incurs no new setup. These are lockups, not fees, and are returned when the rail is finalized if unused.
53
+
:::
38
54
39
55
### Real-World Cost Examples
40
56
@@ -44,17 +60,25 @@ These examples use plain arithmetic for clarity. For programmatic cost calculati
The default 2-copy configuration roughly doubles the recurring cost. One-time fees apply once: $0.025 to create the data set plus the per-batch add-pieces fee.
Egress here is the worst case where every byte is a cache miss. When content is served from the Filecoin Beam cache, egress is roughly half this.
125
+
126
+
## How the fees and lockup work
127
+
128
+
Most developers can stop at the tables above. This section explains the mechanics behind the per-operation fees and the lockup reserve for anyone who needs the detail.
129
+
130
+
**The proving fee is additive, not a floor.** The rate is `(bytes / TiB) × $2.50 + $0.024`, so storage scales with size and the proving fee is a flat addition per data set. A data set with no pieces has no recurring charge until the first piece is added.
131
+
132
+
**Add-pieces pricing scales with batch size.** Each `addPieces` call costs `$0.0005 + $0.0003 × N`, where `N` is the number of pieces in the batch. The base fee is shared across the batch, so adding many pieces in one call is cheaper per piece than adding them one at a time. When estimating the cost of a single piece, assume the single-piece price (`$0.0008`); batching only makes it cheaper.
133
+
134
+
**Fees are paid from a small lockup reserve, not billed per call.** When a data set is created, ~$0.10 of USDFC is locked as a lifecycle reserve on the data set's payment rail. One-time fees are drawn from this reserve as operations happen, and the reserve is topped back up toward its target as it is drawn down. You see ~$0.10 of additional locked USDFC while the data set is active. It is refunded when the rail is finalized.
135
+
136
+
<details>
137
+
<summary>Why the reserve exists: wind-down after termination</summary>
138
+
139
+
Filecoin Pay does not allow raising a rail's fixed lockup once the rail has been terminated. The lifecycle reserve gives you headroom to run wind-down operations (such as scheduling piece removals) after termination, when the reserve can no longer be refilled.
140
+
141
+
If you expect to need more wind-down operations than the reserve covers, fund the reserve before terminating. User-initiated termination charges the $0.00112 termination fee and makes a best-effort top-up of the reserve. Provider-initiated termination charges no fee and does not top up, so those data sets are limited to whatever was in the reserve at termination.
142
+
143
+
For the full lockup model (streaming versus fixed lockup, rail settlement, finalization), see the [Payments & Storage cookbook](/cookbooks/payments-and-storage/) and the [Filecoin Pay spec](https://github.com/FilOzone/filecoin-pay/blob/main/SPEC.md).
144
+
145
+
</details>
97
146
98
147
## Querying Upload Costs
99
148
100
-
Use `getUploadCosts()` to preview costs without executing any transaction. This is useful for displaying pricing in a UI or letting users confirm before proceeding.
149
+
Use `getUploadCosts()` to preview costs without executing any transaction. This is useful for displaying pricing in a UI or letting users confirm before proceeding. The result reads the on-chain price list, so it reflects the rates, one-time fees, and lockups described above.
101
150
102
-
Getting the costs for uploading to an existing dataset:
151
+
Getting the costs for uploading to an existing data set:
Copy file name to clipboardExpand all lines: docs/src/content/docs/introduction/about.mdx
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,8 +65,11 @@ All payments are settled automatically through Filecoin Pay, ensuring on-chain a
65
65
66
66
|**Service**|**Pricing**|**Description**|
67
67
| ------- | --------- | -------------------- |
68
-
|**Base Storage & Retrival**|**$2.5/TiB/month/copy** (minimum 2 copies) | Redundant storage ensures durability and continuous PDP verification.<br />Minimum monthly charge of **0.06 USDFC**, covering roughly **24 GiB** of total data (two copies). |
69
-
|**Add-on Retrieval (Filecoin Beam)**|**Up to $0.014/GiB egress**| Charged for outbound data delivered via Filecoin Beam gateways or retrieval providers. |
68
+
|**Storage**|**$2.50/TiB/month/copy** (minimum 2 copies) | Redundant storage with continuous PDP verification. Empty data sets have no recurring cost; charges begin when the first piece is added. |
69
+
|**Proving Service**|**$0.024/data set/month**| Flat per-data-set fee for proof verification, added on top of the storage rate. Charged only while the data set holds pieces. |
70
+
|**Add-on Retrieval (Filecoin Beam)**|**Up to $14/TiB (≈ $0.014/GiB) egress**| Outbound data delivered via Filecoin Beam. Roughly half this when served from cache, up to the full rate on a cache miss. |
71
+
72
+
Beyond these recurring rates, each on-chain operation (creating a data set, adding or removing pieces, terminating service) carries a small one-time fee paid to the storage provider to cover its gas. These fees are fractions of a cent, drawn from a small refundable lockup reserve (~$0.10 USDFC) held while the data set is active, and only matter at very high operation volumes. See [Storage Costs](/developer-guides/storage/storage-costs/) for the full breakdown.
70
73
71
74
:::note[Verifiable Payment]
72
75
All storage and retrieval charges are denominated in **USDFC** (or supported ERC-20 tokens) and settled via **Filecoin Pay**. Every transaction is on-chain, auditable, and linked to verifiable service proofs.
0 commit comments