Skip to content

Conversation

pyropy
Copy link
Member

@pyropy pyropy commented Oct 23, 2025

  • Replace monthly CDN subscription pricing with per-TiB egress rates
  • Remove automatic CDN payment rail updates when storage size changes
  • Update ServicePricing struct to reflect usage-based pricing model
  • Refactor calculateRatesPerEpoch to only handle storage rates

BREAKING CHANGE: ServicePricing API changed - pricePerTiBPerMonthWithCDN replaced with pricePerTiBCdnEgress and pricePerTiBCacheMissEgress fields

Closes #323

- Replace monthly CDN subscription pricing with per-TiB egress rates
- Remove automatic CDN payment rail updates when storage size changes
- Update ServicePricing struct to reflect usage-based pricing model
- Refactor calculateRatesPerEpoch to only handle storage rates

BREAKING CHANGE: ServicePricing API changed - pricePerTiBPerMonthWithCDN replaced
with pricePerTiBCdnEgress and pricePerTiBCacheMissEgress fields
@FilOzzy FilOzzy added this to FS Oct 23, 2025
@github-project-automation github-project-automation bot moved this to 📌 Triage in FS Oct 23, 2025
@pyropy pyropy self-assigned this Oct 23, 2025
@pyropy pyropy marked this pull request as ready for review October 23, 2025 09:50
@juliangruber
Copy link
Member

regarding the PR title: I think this is a fix and not a refactor

@pyropy pyropy changed the title refactor: change CDN pricing from monthly to usage-based egress model fix: change CDN pricing from monthly to usage-based egress model Oct 23, 2025
@pyropy
Copy link
Member Author

pyropy commented Oct 23, 2025

regarding the PR title: I think this is a fix and not a refactor

Should I also ammend the commit and rename the branch? WDYT?

@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting review in FS Oct 23, 2025
uint256 private immutable CACHE_MISS_PRICE_PER_TIB_PER_MONTH; // .5 USDFC per TiB per month for CDN with correct decimals
uint256 private immutable CDN_PRICE_PER_TIB_PER_MONTH; // .5 USDFC per TiB per month for CDN with correct decimals
uint256 private immutable CDN_EGRESS_PRICE_PER_TIB; // 7 USDFC per TiB of CDN egress
uint256 private immutable CACHE_MISS_EGRESS_PRICE_PER_TIB; // 7 USDFC per TiB of cache miss egress
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these too low? AWS egress seems to charge about 10x higher. Does this align with your own costs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 Awaiting review

Development

Successfully merging this pull request may close these issues.

Fix ServicePricing to show CDN egress pricing instead of monthly rate

4 participants