SiaFoundation / renterd

A renter for Sia
https://sia.tech/software/renterd
MIT License
62 stars 18 forks source link

Update approach to pricing #1303

Open alexfreska opened 2 weeks ago

alexfreska commented 2 weeks ago

Went with a modified approach documented here: https://github.com/SiaFoundation/web/pull/647


Original approach:

Set allowance, then derive storage, upload, and download cost from the allowance. To derive the the values:

Reasoning (from @ChrisSchinnerl): The point is that people use the Pricing in the UI as the amount of money they want to pay. But that's not quite right. e.g. I can pay $2 per TB upload if I upload to a $1 and a $3 host. Setting the max price to $2 would be counter productive since it creates unnecessary churn. In reality we probably want a user who expects $2 per TB to set the max to $4 per TB.

alexfreska commented 1 week ago

@ChrisSchinnerl just wondering: does the actual allowance value / remaining allowance value actually factor into host selection or does it just act as a hard limit?

alexfreska commented 1 week ago

@ChrisSchinnerl similar to the current estimates, this calculation also probably needs to adjust for estimated storage, download, upload values?

ChrisSchinnerl commented 1 week ago

@ChrisSchinnerl just wondering: does the actual allowance value / remaining allowance value actually factor into host selection or does it just act as a hard limit?

Yes, the allowance is taken into account when computing the score of a host that we use for the host selection. e.g. if you want to spend $10 per month on 10 hosts we use $1 per host as the baseline for the pricing score we give a host. So we penalise a host if the expected amount of traffic/storage can't be paid for using $1.

@ChrisSchinnerl similar to the current estimates, this calculation also probably needs to adjust for estimated storage, download, upload values?

Changing the expected values is part of the advanced settings right? So in that case I'd leave it up to the user to make sure the values are sane.