Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - GaltReport

Pages: 1 ... 18 19 20 21 22 23 24 [25] 26 27 28 29 30 31 32 ... 46
361
Do your "words" have spaces between them?  If so it may be just looking at the first word.  I don't think you can use "words".

362
General Discussion / Re: recommended BitAsset portfolio
« on: September 07, 2014, 08:03:33 pm »
It would be great once more bitassets are established to have sample portfolios that people could use a as a guide to diversifying their portfolio....  "Trader", "Saver", "Low Risk", "High Risk" etc...

363
This sounds great.  It will be good to have the GUI show the accumulation of interest and the actual addition of it to their account somehow so that this great benefit is very prominent to everyone.

364
General Discussion / Re: drltc's interest rate and BitBond proposal
« on: September 07, 2014, 02:47:00 am »
I'm glad we are finally reaching an understanding. My issue is I really don't like price fixing and would prefer a design that can last. I rather avoid requiring some other consensus mechanism to constantly tweak parameters if there is another market-based solution that can take care of it. Of course, the trade-off with that as you mention is that the BitUSD holder has difficulty predicting what kind of returns he will get.

As I alluded to, what we do is pay 5% when we can, with any surplus going to bond-holders.  When we can't pay 5%, we shut down writing new bonds and pay whatever we can afford.

Shorts are, of course, free to charge a premium above the peg, which they can use against their interest obligation.  That is fairly close in practice to a variable interest rate.

My proposal here has the shorts paying a fixed interest rate.  I have an idea for charging shorts variable interest based on their leverage ratio, allowing a limited number of shorts to be initiated with high leverage (not enough to jeopardize the system) and giving people incentive to maintain lower leverage ratios (in the form of reduced interest on the portion they are "borrowing.")  However that idea is more complex, and I want to focus on one problem at a time.

So if you make the assumption that BTSX growth will always be good enough that you can sustain a 5% interest rate without depleting the insurance fund, then is it fair to say that you are basically taking the free-market variable interest paid by shorts, buffering it into a fund, and then paying that interest out capped at 5% to BitUSD holders, and then using the excess interest to pay for the BitBonds?

I'm not sure if I made this clear, but I intended in this proposal to have all shorts pay the same interest rate, I was thinking 7%.  That interest would be paid by an appropriate exponential increase in the short position's short BitUSD balance, which would gradually lower their margin call price.  Thus you should always be able to pay 5% to longs and have the 2% spread plus fees go to insurance and BitBonds, unless and until you get a margin crisis.

If so, that means if BTSX growth slows (thus reducing interest rates shorts are willing to pay) and/or transaction and ask/bid overlap fees shrink, you risk having BitBonds become worthless (since they wouldn't pay higher interest than just holding BitUSD),

Re-read the sections on BitBond mechanics.  The BitBonds are fully backed by BitUSD.  If the BitBond fund is depleted, the network will stop writing new BitBonds.  BitBonds already in circulation will pay their full face value in BitUSD, and can be sold in user-to-user transactions for less than face value if someone doesn't want to wait for the interest payment schedule (the buyer would receive an implied interest rate based on the price at which this transaction occurs).


the insurance fund providing no protection against black swans, and in extreme situations perhaps not even being able to pay the full 5% interest. I would tweak the "graceful degradation" to prioritize the insurance funds before the the 5% interest.

It was my intention to prioritize the insurance fund over 5% interest, unless the insurance fund already has sufficient capital.

Even then, I still don't care for the BitBond concept all that much. I don't see why we should be rewarding people more for long term commitment. Why not just take the excess interest and give that value to the shareholders instead?

... It would be helpful to the ecosystem if we had some product which can only be bought with BitUSD, is useful to any consumer in arbitrarily large quantities, and whose producer can fill arbitrarily large orders.  BitBonds are that product.
...

This is interesting.  I just realized from your post that these financial instruments (Interest Earning Accounts, CDs , Bonds etc...) are PRODUCTS. WE will have PRODUCTS that can be marketed and SOLD.  We don't have to wait until some vendor starts accepting BitUSD etc...Wow.

365
General Discussion / Re: Interest on BitUSD - A Proposal for Review
« on: September 06, 2014, 04:31:58 pm »
Quote
Don't be too sure... the Fed has pretty much quintupled (5x) the US monetary base since 2008. What happens when velocity picks up?
... People are still starving, unemployment is bigger than ever and people when they get some money they don't tend to invest or spend them or consume them, or buy a house or whatever to drive the real economy up as before but rather save them for a rainy day.....

100% Agree.

366
Technical Support / Re: bitusd not transfered
« on: September 06, 2014, 02:04:09 pm »
You may want to message freeworm.  He has helped with a lot of bter deposit/withdraw issues.

367
General Discussion / Re: PSA: I'm buying... and you probably should be too
« on: September 06, 2014, 03:16:24 am »
 +5% +5% +5%

368
General Discussion / Re: Interest on BitUSD - A Proposal for Review
« on: September 05, 2014, 09:29:08 pm »
"dividends" and "interest" are difficult words to legally market.

dividends and interest sound like money to me. Rewards could be anything.  Points, tokens, mileage, coupons etc...

I want money!

369
General Discussion / Re: Interest on BitUSD - A Proposal for Review
« on: September 05, 2014, 09:22:17 pm »
FYI... I have already implemented the rewards program :)  at the blockchain level.  I just need to add a few wallet operations and do some testing on a test-net, but it should be ready to go next week.

Anybody else get the feeling BM is changing the world with every stroke of the keyboard?

Who would have thought, the G*d D**n kid built a "bank"!!

370
I managed to hack up the price feed python script that was floating around so that I can schedule it using the Linux cron job scheduler as well as implementing the update on price variance and hours since last update.  I will put it below for anyone that may find it useful.

I'm no great python programmer so please validate and/or fix any bugs discovered. 

I modified the config.json.  I added 2 new variables:

variance: percentage price variance
maxhours: maximum time between updates

The program will check the delegate's current published price for each asset and publish a new price if the current price exceeds the variance or if it has been longer than maxhours since the price has been published.

It has only been through basic testing so be advised.  I am not particularly confident in the math and date manipulations but it seems to work for my limited test cases.

I store the config.json file below in /home/ubuntu.  You can move it somewhere else but will need to change the location in the code. 

In the config.json file below you need to modify the following:

1. Set 1434 to the port number used in the httpd_endpoint entry in your .BitSharesX/config.json file
2. Set rpc-username-goes-here to the rpc_user setting in .BitSharesX/config.json file
3. Set rpc-password-goes-here to the rpc_password setting in .BitSharesX/config.json file
4. Set delegate-name-goes-here to your delegate name.
5. Set variance and maxhours to what you want

config.json

Code: [Select]
{
  "bts_rpc": {
    "url": "http://localhost:1434/rpc",
    "username": "rpc-username-goes-here",
    "password": "rpc-password-goes-here"
  },
  "asset_list": ["USD","BTC","CNY"],
  "delegate_list": ["delegate-name-goes-here"],
  "variance": 1,
  "maxhours": 12
}

price_feed.py

Code: [Select]
import requests
import json
import sys
from math import fabs

import datetime, threading, time
from pprint import pprint


headers = {'content-type': 'application/json',
   'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0'}

config_data = open('/home/ubuntu/config.json')
config = json.load(config_data)
config_data.close()

## -----------------------------------------------------------------------
## function about bts rpc
## -----------------------------------------------------------------------
auth = (config["bts_rpc"]["username"], config["bts_rpc"]["password"])
url = config["bts_rpc"]["url"]

asset_list = config["asset_list"]
init_asset_list = asset_list
delegate_list = config["delegate_list"]

def fetch_from_btc38():
  url="http://api.btc38.com/v1/ticker.php"
  while True:
     try:
       params = { 'c': 'btsx', 'mk_type': 'btc' }
       responce = requests.get(url=url, params=params, headers=headers)
       result = responce.json()
       price["BTC"].append(float(result["ticker"]["last"]))

       params = { 'c': 'btsx', 'mk_type': 'cny' }
       responce = requests.get(url=url, params=params, headers=headers)
       result = responce.json()
       price_cny = float(result["ticker"]["last"])
       price["CNY"].append(float(result["ticker"]["last"]))

       price["USD"].append(price_cny/rate_usd_cny)
       break
     except:
       e = sys.exc_info()[0]
       print "Error: fetch_from_btc38: retrying in 30 seconds", e
       time.sleep(30)
       continue

def fetch_from_bter():
  while True:
     try:
       url="http://data.bter.com/api/1/ticker/btsx_btc"
       responce = requests.get(url=url, headers=headers)
       result = responce.json()
       price["BTC"].append(float(result["last"]))

       url="http://data.bter.com/api/1/ticker/btsx_cny"
       responce = requests.get(url=url, headers=headers)
       result = responce.json()
       price_cny = float(result["last"])
       price["CNY"].append(float(result["last"]))
       price["USD"].append(price_cny/rate_usd_cny)
       break
     except:
       e = sys.exc_info()[0]
       print "Error: fetch_from_bter: retrying in 30 seconds", e
       time.sleep(30)
       continue

def get_rate_from_yahoo():
  global headers
  global rate_usd_cny, rate_xau_cny

  while True:
     try:
       url="http://download.finance.yahoo.com/d/quotes.csv"
       params = {'s':'USDCNY=X,XAUCNY=X','f':'l1','e':'.csv'}
       responce = requests.get(url=url, headers=headers,params=params)

       pos = posnext = 0
       posnext = responce.text.find("\n", pos)
       rate_usd_cny = float(responce.text[pos:posnext])
       print "Fetch: rate usd/cny", rate_usd_cny
       pos = posnext + 1
       posnext = responce.text.find("\n", pos)
       rate_xau_cny = float(responce.text[pos:posnext])
       print "Fetch: rate xau/cny", rate_xau_cny
       print
       break
     except:
       e = sys.exc_info()[0]
       print "Error: get_rate_from_yahoo:  try again after 30 seconds", e
       time.sleep(30)
       continue

def update_price(delegate,asset,price,feed):
      update_request = {
         "method": "wallet_publish_price_feed",
         "params": [delegate, price, asset],
         "jsonrpc": "2.0",
         "id": 1
      }

      present  = datetime.datetime.now()
      feed_price  = feed['price']
      symbol      = feed['asset_symbol']
      last_update = feed['last_update']

      lu_yr  = int(last_update[0:4])
      lu_mn  = int(last_update[4:6])
      lu_dy  = int(last_update[6:8])
      lu_hr  = int(last_update[9:11])
      lu_min = int(last_update[11:13])
      lu_sec = int(last_update[13:15])
      lu_d   = datetime.date(lu_yr,lu_mn,lu_dy)
      lu_t   = datetime.time(lu_hr,lu_min,lu_sec)
      lu_dt  = datetime.datetime.combine(lu_d,lu_t)

      # Calculate Price Variance
      if (price > feed_price):
            diff = 100 - (round((feed_price / price) * 100,0))
      else:
            diff = 100 - (round((price / feed_price) * 100,0))

      # Calculate Time Since Last Update
      tm_df  = present-lu_dt
      tm_mx  = datetime.timedelta(hours=config['maxhours'])

      print "   Delegate Price Feed: ",symbol,feed_price
      print "         Current Price: ",asset,price
      print " BC Last Update String: ",last_update
      print "      Last Update Date: ",lu_dt
      print "     Current Date/Time: ",present
      print "     Time Since Update: ",str(tm_df)
      print " Max Hrs Before Update: ",str(tm_mx)
      print "        Price Variance: ",int(diff)
      print "    Max Price Variance: ",config['variance']
      print "           Update Feed: ",

      while True:
           try:
               # Publish Asset Price If Maximum Price Variance or Maximum Time Are Exceeded
               if ((int(diff) >= config['variance']) or (tm_df > tm_mx)):
                  print "Yes",
                  responce = requests.post(url, data=json.dumps(update_request), headers=headers, auth=auth)
                  result = json.loads(vars(responce)["_content"])
                  print "-",delegate, price_average[asset], asset
               else:
                  print "No"
               print
               break

           except:
               e = sys.exc_info()[0]
               print "Warnning: Can't connect to rpc server or other error, (update_request) try again after 30 seconds", e
               time.sleep(30)

def update_feed(price, asset):
  for delegate in delegate_list:
     headers = {'content-type': 'application/json'}
     feed_request = {
         "method": "blockchain_get_feeds_from_delegate",
         "params": [delegate],
         "jsonrpc": "2.0",
         "id": 1
     }
     while True:
        try:
           # Get Delegate Price Feeds
           responce = requests.post(url, data=json.dumps(feed_request), headers=headers, auth=auth)
           result   = json.loads(vars(responce)['_content'])
           lresult  = result['result']
           for i in lresult:
              if (asset == i['asset_symbol']):
                 update_price(delegate,asset,price,i)
           break

        except:
           e = sys.exc_info()[0]
           print "Warnning: Can't connect to rpc server or other error, (get_feeds) try again after 30 seconds", e
   time.sleep(30)

def fetch_price():
  for asset in init_asset_list:
    price[asset] = []

  fetch_from_btc38()
  fetch_from_bter()

  for asset in asset_list:
    if len(price[asset]) == 0:
      print "Warning: can't get price of", asset
      continue
    price_average[asset] = sum(price[asset])/len(price[asset])
    if price_average_last[asset] != 0.0:
      change = 100.0 * (price_average[asset] - price_average_last[asset])/price_average_last[asset]
    else:
      change = 100.0

    update_feed(price_average[asset], asset)

print '=================', time.strftime("%Y%m%dT%H%M%S", time.localtime(time.time())), '=================='

rate_usd_cny = 0.0
rate_xau_cny = 0.0
get_rate_from_yahoo()

price = {}
price_average = {}
price_average_last = {}

for asset in init_asset_list:
  price[asset] = []
  price_average[asset] = 0.0
  price_average_last[asset] = 0.0

fetch_price()

print '=================', time.strftime("%Y%m%dT%H%M%S", time.localtime(time.time())), '=================='
print


Below crontab will run the script every 4 hours:

crontab

Code: [Select]
0 1,5,9,13,17,21 * * *  python /home/ubuntu/price_feed.py >> /home/ubuntu/price_feed.out

Log of actions will be stored in /home/ubuntu/price_feed.out

This may grow large after awhile so keep an eye on it and remove it when it get's too large or if you are familiar with it, you can use logrotate to maintain it

Edit: Edited to fix bug where it wouldn't work for multiple delegates.

Edit: Edited to change the retry Timer to 60 seconds instead of 1 second.  I ended up missing blocks because the program got into a tight 1 second retry loop and spiked my CPU.  I highly recommend changing this if you are using the original to something more than 1 second.  Otherwise, you have a chance of spiking your CPU and missing blocks if it continually retries every second.

The relevant lines of the code to change start with threading.Timer(1
Change the 1 to 30 or 60 maybe.

Edit: Edited to remove use of "threading.Timer" to avoid possible zombie process/threads that may use up memory/cpu.  Substituted while loop for retries.

371
General Discussion / Re: Interest on BitUSD - A Proposal for Review
« on: September 05, 2014, 04:35:33 pm »
BitUSD is incredibly useful as a trading instrument but the "sales pitch" for the average Joe is something like this:

1) Buy BitUSD today and you will be able to sell it back for 98% of what you paid for it (due to the spread)
2) Once you have BitUSD you get all of the benefits of Bitcoin, instant transfers, privacy, security.
3) As a merchant the "cost" of accepting BitUSD (at parity) is currently equal to the cost of a credit card (a few percent)

Initially demand from traders will to hedge against BTSX volatility will help the market grow, but what we *REALLY WANT* is for people to store their wealth in the system, not just their trading account.  To do this BitUSD needs to offer a return that is explicit.  IE: it shouldn't be done via the value deviating from the peg.

Right now the network earns USD via the market and via transaction fees (yes transaction fees can be paid in USD).  This income is saved for a "rainy day" which we don't actually expect to happen, but could.  The value as an insurance system could be better used to pay interest to USD holders.   If BitUSD were an interest bearing asset, then the interest would compensate for the risk of black swans in the same way that the insurance fund does today.

So far BitUSD has earned $1800 on $485,000 issuance in just 2 weeks of light trading.  This is about .4% yield every 2 weeks or about 10% per year.   I have no idea how this will play out over time, but I suspect that it will result in a significant yield for BitUSD holders.   The more people hold BitUSD the more BTSX is worth.   So it is in the best interest (No pun intended) of BTSX holders to pay interest on BitUSD from the fees collected.

I would like to implement it as follows:
1) If you hold a balance for less than 1 month, you earn nothing.
2) If you hold a balance for one year or more then you earn (YOURUSD / TOTAL_USD) * COLLECTED_FEES_BALANCE
3) If you hold a balance for less than one year then you earn a pro-rated amount.     (YOURUSD / TOTAL_USD) * COLLECTED_FEES_BALANCE * FRACTION_OF_YEAR_HELD^2

The result is that long-term holders of BitUSD earn much higher yields than short-term holders.  The yield should more than cover the cost of the spread and thus your pitch to the average Joe is much stronger:

1) Buy BitUSD and earn more (much more) on your dollars than you do at your bank.
2) Enjoy all the other benefits of crypto.

This feature would have a greater impact on adoption than just about anything else being discussed. 

Discuss.

 +5% +5% +5%

Glad you are thinking about the average joe.  So important.  Putting aside the fact that I am no expert in the economics of this all, I'd have to say that THIS SOUNDS GREAT!!  If this works, it has an almost frightening level of possibilities.  :)

372
General Discussion / Re: Can't install 4.12 on windows 64 bit
« on: September 05, 2014, 12:52:20 am »
Uninstalled 0.4.9 and tried to install 4.12 on 64 bit windows 7 but got this error message
"This version of this file is not compatible with the version of windows you're running.............."

I downloaded it from http://bitshares-x.info/ download.


Tried installing 64 bit version from https://github.com/dacsunlimited/bitsharesx/releases/tag/0.4.12 and after installing I try to run it and then another error comes up
"The application was unable to start correctly (0xc000007b)...."

This is a known issue.  I haven't seen any resolution yet.  The 32-Bit version seems to work fine.

373
They are here.......

I sent some out in the post today to Stan's team.
I have a few in-stock from first run. If the first few sell out I will do more runs but they have to be in batches of at least 13.
Price is 10$ plus shipping (all shirts shipped USPS with tracking/flat rate boxes I think its 5 bucks anywhere in the US).
The project has been funded by I3 so thanks goes to them, any profit will be contributed to a public marketing fund or burned :)
Vinyl stickers with Bitshares logo coming soon, stay tuned.
Oh and how about a best MEME giveaway for a free tee. The theme will be bit asset's bitGLD,bitBTC,bitCNY.....etc. Anything funny, creative, crazy.Try and show why bit assets are the way to go. Meme's must be posted by 9/10 3pm EST. Multiple entries are ENCOURAGED but not necessary.
please post memes in here--------https://bitsharestalk.org/index.php?topic=8369.new#new

How do you buy them?

374
Honestly I wouldn't wear it. Make it simpler and less "BUY BITSHARES" vibe.

A simple "I killed the bank" on the bank and "bitshares" on the front left

I like this idea.  I would wear buy and wear this.  Sometimes less is better.  Good Logo, Good Quote.

375
Done.

delegate1-galt
delegate1.john-galt

Upgraded to 0.4.12

Pages: 1 ... 18 19 20 21 22 23 24 [25] 26 27 28 29 30 31 32 ... 46