Skip to content

Commit

Permalink
[Price Feed] Remove discount
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Dec 2, 2015
1 parent 96e9a35 commit 6a616d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 0 additions & 4 deletions scripts/pricefeeds/config-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@
# Stop calling when collateral only pays off 110% of the debt
# This is denoted as: 1100 = 110% = 1.10
"maximum_short_squeeze_ratio" : 1100,
# Multiplicative factor for discount when borrowing
# bitassets. This is a factor: 0.95 = 95%. 1.0 disables
# the discount
"discount" : 1.0,
},
## Exchanges trading BTC/BTS directly
## (this does not include any other trading pairs)
Expand Down
9 changes: 4 additions & 5 deletions scripts/pricefeeds/pricefeeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def derive_prices(feed):

this_asset_config = config.asset_config[asset] if asset in config.asset_config else config.asset_config["default"]
sources = list(feed) if this_asset_config["sources"][0] == '*' else this_asset_config["sources"]
discount = this_asset_config["discount"] if "discount" in this_asset_config else config.asset_config["default"]["discount"]

for base in _all_bts_assets + [core_symbol]:
price[base] = {}
Expand Down Expand Up @@ -235,11 +234,11 @@ def derive_prices(feed):
else :
price_weighted = assetprice[0]

# Discount and price convertion to "price for one BTS" i.e. base=*, quote=core_symbol
# price convertion to "price for one BTS" i.e. base=*, quote=core_symbol
price_result[asset] = {
"mean" : price_mean * discount,
"median" : price_median * discount,
"weighted": price_weighted * discount,
"mean" : price_mean,
"median" : price_median,
"weighted": price_weighted,
}

return price_result
Expand Down

0 comments on commit 6a616d4

Please sign in to comment.