Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
added a minimum size so you always make money
Browse files Browse the repository at this point in the history
  • Loading branch information
Belcher committed Jan 12, 2015
1 parent 8ad0eeb commit e14e60d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yield-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
cjfee = '0.01' # 1% fee
mix_levels = 5
nickserv_password = ''
minsize = int(2 * txfee / float(cjfee)) #minimum size is such that you always net profit at least the miners fee



#is a maker for the purposes of generating a yield from held
# bitcoins without ruining privacy for the taker, the taker could easily check
Expand Down Expand Up @@ -46,7 +49,7 @@ def create_my_orders(self):

#print mix_balance
max_mix = max(mix_balance, key=mix_balance.get)
order = {'oid': 0, 'ordertype': 'relorder', 'minsize': 0,
order = {'oid': 0, 'ordertype': 'relorder', 'minsize': minsize,
'maxsize': mix_balance[max_mix], 'txfee': txfee, 'cjfee': cjfee,
'mix_balance': mix_balance}
return [order]
Expand Down

0 comments on commit e14e60d

Please sign in to comment.