paymentModelFunction = function(gbHours, downloadedBytes) {
HOURS_IN_MONTH = (24 * 365) / 12
## Average number of hours in a month
STORJ_USD_RATE = 0.81671
## This is determined by value reported on https://coinmarketcap.com/ at time
## of payout calculation.
gbHoursScaled = sapply((gbHours - median(gbHours)) / sd(gbHours),
function(x) ifelse(x < 0, 0, x))
downloadedBytesScaled = sapply((downloadedBytes - median(downloadedBytes)) / sd(downloadedBytes),
function(x) ifelse(x < 0, 0, x))
## Both gbHoursScaled and downloadedBytesScaled can not be less than 0 to
## ensure everyone gets at least the base payout amount.
downloadedBytesFlag = as.numeric(downloadedBytes > 0)
gbHoursFlag = as.numeric(gbHours >= 730)
isQualifiedFlag = sapply(gbHoursFlag + downloadedBytesFlag,
function(x) ifelse(x > 0, 1, 0))
## At least one of the above criteria must be met to qualify for a payment.
basePayout = (1.50 / STORJ_USD_RATE) * isQualifiedFlag
## The current base payout is set to $1.50 USD.
ghHourPayout = 11.45 * gbHoursScaled * isQualifiedFlag
downloadedBytesPayout = 3.0060 * downloadedBytesScaled * isQualifiedFlag
payoutAmountSTORJ = ghHourPayout + downloadedBytesPayout + basePayout
payoutAmountUsd = payoutAmountSTORJ * STORJ_USD_RATE
cbind(payoutAmountSTORJ, payoutAmountUsd)
}
- Nodes that have not been seen in the past week (from the time first preliminary payouts are calculated) are not included in the metric totals
- Each component (gbHours and downloaded bytes) is scaled so that each metric ends up being a measurement of how far away you are from the median
- Those values are multiplied by certain weights and summed to arrive at a final value
@BlackDuck888 A freeze rate for Storj during the moment of payouts, i believe makes it easier for Storj to show farmers and get the feedback on the payouts. Having a tighter loop from feedback to actual payout(which is a process that they can look into, for e.g. tightening the window to be shorter and shorter, since payout fees and time could be faster now on Eth), reduces market risk on both ends. Farmers could hold or sell, Storj could buy/sell if they do not have sufficient supply.
The idea of protection is both a give and take. Farmers take the risk when prices goes lower. Storj takes the risk when prices are going higher(when they do not have sufficient supply to give farmers.).