Switch to a Michaelis-Menten saturating curve. search bar filtering. mobile improvements
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m50s
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m50s
This commit is contained in:
@@ -152,21 +152,26 @@ All variables are documented in `.env.example`. Key ones:
|
||||
|
||||
## Pricing Formula
|
||||
|
||||
Prices follow a **saturating curve** (Michaelis-Menten) so that viral hashtags don't produce runaway prices:
|
||||
|
||||
```
|
||||
price = max($0.25, round(postsPerHour × $0.25, 2))
|
||||
price = max($0.25, round((base × pph) / (1 + k × pph), 2))
|
||||
```
|
||||
|
||||
Examples:
|
||||
`k` is derived from two anchor points: floor price `$0.25` and a target of `$250` at 3,600 PPH (one post per second).
|
||||
|
||||
| Posts/hr | Price |
|
||||
|---|---|
|
||||
| 1 | $0.25 |
|
||||
| 10 | $2.50 |
|
||||
| 100 | $25.00 |
|
||||
| 1,000 | $250.00 |
|
||||
| 12,000 (e.g. #happynewyear at midnight) | $3,000.00 |
|
||||
| 1 | ~$0.25 |
|
||||
| 10 | ~$2.48 |
|
||||
| 100 | ~$23.32 |
|
||||
| 1,000 | ~$145 |
|
||||
| 3,600 (one post/sec) | ~$250 |
|
||||
| ∞ (theoretical) | ~$346 (asymptote) |
|
||||
|
||||
**Burst handling:** when all fetched posts share a very tight timestamp window the worker paginates up to `MAX_PAGES_PER_HASHTAG` pages to get a realistic count before the span grows to > 5 minutes.
|
||||
At low activity the curve is approximately linear (≈ $0.25 per post/hr). At high activity it flattens, preventing a single trending hashtag from dwarfing the entire market.
|
||||
|
||||
**Burst handling:** the worker fetches up to `MAX_PAGES_PER_HASHTAG` pages of Mastodon results and uses only posts within the most recent hour when calculating PPH. If the fetched results are exhausted before covering a full hour, PPH is extrapolated from the covered window.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user