This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

adjust defaults to account for sc price increase

  • Loading branch information...
DavidVorick committed May 21, 2017
1 parent 4c624d9 commit a85353d8cec915ff2632eec32283a12dafcf0107
View
@@ -51,18 +51,18 @@ var (
// host is going to allocate towards collateral. The number has been chosen
// as a number that is large, but not so large that someone would be
// furious for losing access to it for a few weeks.
defaultCollateralBudget = types.SiacoinPrecision.Mul64(1e6)
defaultCollateralBudget = types.SiacoinPrecision.Mul64(100e3)
// defaultContractPrice defines the default price of creating a contract
// with the host. The default is set to 30 siacoins, which the file
// contract revision can have 15 siacoins put towards it, and the storage
// proof can have 15 siacoins put towards it.
defaultContractPrice = types.SiacoinPrecision.Mul64(5) // 5 siacoins
defaultContractPrice = types.SiacoinPrecision.Mul64(3) // 3 siacoins
// defaultDownloadBandwidthPrice defines the default price of upload
// bandwidth. The default is set to 10 siacoins per gigabyte, because
// download bandwidth is expected to be plentiful but also in-demand.
defaultDownloadBandwidthPrice = types.SiacoinPrecision.Mul64(250).Div(modules.BytesPerTerabyte) // 250 SC / TB
defaultDownloadBandwidthPrice = types.SiacoinPrecision.Mul64(25).Div(modules.BytesPerTerabyte) // 25 SC / TB
// defaultMaxDownloadBatchSize defines the maximum number of bytes that the
// host will allow to be requested by a single download request. 17 MiB has
@@ -94,15 +94,15 @@ var (
// defaultStoragePrice defines the starting price for hosts selling
// storage. We try to match a number that is both reasonably profitable and
// reasonably competitive.
defaultStoragePrice = types.SiacoinPrecision.Mul64(750).Div(modules.BlockBytesPerMonthTerabyte) // 750 SC / TB / Month
defaultStoragePrice = types.SiacoinPrecision.Mul64(50).Div(modules.BlockBytesPerMonthTerabyte) // 50 SC / TB / Month
// defaultUploadBandwidthPrice defines the default price of upload
// bandwidth. The default is set to 1 siacoin per GB, because the host is
// presumed to have a large amount of downstream bandwidth. Furthermore,
// the host is typically only downloading data if it is planning to store
// the data, meaning that the host serves to profit from accepting the
// data.
defaultUploadBandwidthPrice = types.SiacoinPrecision.Mul64(10).Div(modules.BytesPerTerabyte) // 10 SC / TB
defaultUploadBandwidthPrice = types.SiacoinPrecision.Mul64(1).Div(modules.BytesPerTerabyte) // 1 SC / TB
// workingStatusFirstCheck defines how frequently the Host's working status
// check runs
@@ -30,7 +30,7 @@ var (
// minCollateral is the amount of collateral we weight all hosts as having,
// even if they do not have any collateral. This is to temporarily prop up
// weak / cheap hosts on the network while the network is bootstrapping.
minCollateral = types.SiacoinPrecision.Mul64(25).Div64(tbMonth)
minCollateral = types.SiacoinPrecision.Mul64(5).Div64(tbMonth)
// Set a minimum price, below which setting lower prices will no longer put
// this host at an advatnage. This price is considered the bar for
@@ -39,11 +39,11 @@ var (
//
// NOTE: This needs to be intelligently adjusted down as the practical price
// of storage changes, and as the price of the siacoin changes.
minTotalPrice = types.SiacoinPrecision.Mul64(250).Div64(tbMonth)
minTotalPrice = types.SiacoinPrecision.Mul64(25).Div64(tbMonth)
// priceExponentiation is the number of times that the weight is divided by
// the price.
priceExponentiation = 4
priceExponentiation = 5
// requiredStorage indicates the amount of storage that the host must be
// offering in order to be considered a valuable/worthwhile host.
@@ -120,7 +120,7 @@ func (hdb *HostDB) priceAdjustments(entry modules.HostDBEntry) float64 {
//
// In the future, the renter should be able to track average user behavior
// and adjust accordingly. This flexibility will be added later.
adjustedContractPrice := entry.ContractPrice.Div64(6048).Div64(15e9) // Adjust contract price to match 25GB for 6 weeks.
adjustedContractPrice := entry.ContractPrice.Div64(6048).Div64(25e9) // Adjust contract price to match 25GB for 6 weeks.
adjustedUploadPrice := entry.UploadBandwidthPrice.Div64(24192) // Adjust upload price to match a single upload over 24 weeks.
adjustedDownloadPrice := entry.DownloadBandwidthPrice.Div64(12096).Div64(3) // Adjust download price to match one download over 12 weeks, 1 redundancy.
siafundFee := adjustedContractPrice.Add(adjustedUploadPrice).Add(adjustedDownloadPrice).Add(entry.Collateral).MulTax()
@@ -40,7 +40,7 @@ var (
// TransactionMinFee defines the minimum fee required for a transaction in
// order for it to be accepted if there is already more than
// TransactionPoolSizeForFee transactions in the transaction pool.
TransactionMinFee = types.SiacoinPrecision.Div64(3)
TransactionMinFee = types.SiacoinPrecision.Div64(20)
// relayTransactionSetTimeout establishes the timeout for a relay
// transaction set call.
@@ -135,7 +135,7 @@ func (tp *TransactionPool) FeeEstimation() (min, max types.Currency) {
// a much lower value, which means hosts would be incompatible if the
// minimum recommended were set to 10. The value has been set to 1, which
// should be okay temporarily while the renters are given time to upgrade.
return types.SiacoinPrecision.Mul64(1).Div64(3).Div64(1e3), types.SiacoinPrecision.Mul64(1).Div64(1e3)
return types.SiacoinPrecision.Mul64(1).Div64(20).Div64(1e3), types.SiacoinPrecision.Mul64(1).Div64(1e3) // TODO: Adjust down once miners have upgraded.
}
// TransactionList returns a list of all transactions in the transaction pool.

0 comments on commit a85353d

Please sign in to comment.