Calculation for estimated storage is incorrect
Closed this issue · 2 comments
mtlynch commented
Sia-UI estimates the storage capacity based on the allowance:
The calculation is here:
Sia-UI/plugins/Files/js/sagas/files.js
Lines 50 to 52 in e6be3f6
This calculation is essentially:
[allowance] / [storage_per_tb_per_month]
This is incorrect as it neglects upload cost and contract fees. It also misuses the storage price as the price per TB per contract period when it is actually the price per TB per month. The actual calculation requires Sia-UI to solve for tb_count
in this equation:
allowance = (storage_per_tb_per_month * tb_count * months_per_contract) +
(upload_per_tb * tb_count) +
(contract_fees)
DavidVorick commented
don't know how this slipped through for so many months, this is an easy fix. @eddiewang