Author Topic: S&P 500, Dow and other indexes as smart assets  (Read 2922 times)

0 Members and 1 Guest are viewing this topic.

Offline btsindex

S&P 500, Dow and other indexes as smart assets
« on: April 09, 2018, 10:34:01 am »
We've created 3 new smart-assets: INDEXSPX (S&P 500), INDEXDJI (Dow Jones Industrial Average), INDEXNASDAQ with a precision of 8, paired them with BTS.
The script that gets latest index values, calculates price and pushes it to the blockchain is ready. Two separate 24/7 working servers are also ready to run the script. 
The question is how to do everything right? Should we convert the indexes to BTS price according to BTS/USD rate or just push the index value?

For example: Dow is 23,932.76 at the moment. Should we push 23,932 BTS or 23,932 / 0.144462 (USD/BTS rate)

Any other recommendations until its not too late?

Thanks!  :)
« Last Edit: April 09, 2018, 10:44:03 am by btsindex »

Online sschiessl

Re: S&P 500, Dow and other indexes as smart assets
« Reply #1 on: April 09, 2018, 11:36:50 am »
Hello btsindex,

who is we in that case? Please consider the permission discussion in https://bitsharestalk.org/index.php?topic=26068.0.
Also, the price should reflect actual FIAT price of the asset.


Offline zapata42

  • Full Member
  • ***
  • Posts: 60
    • View Profile
  • BitShares: zapata42
Re: S&P 500, Dow and other indexes as smart assets
« Reply #2 on: April 09, 2018, 01:54:02 pm »
We've created 3 new smart-assets: INDEXSPX (S&P 500), INDEXDJI (Dow Jones Industrial Average), INDEXNASDAQ with a precision of 8, paired them with BTS.
The script that gets latest index values, calculates price and pushes it to the blockchain is ready. Two separate 24/7 working servers are also ready to run the script. 
The question is how to do everything right? Should we convert the indexes to BTS price according to BTS/USD rate or just push the index value?

For example: Dow is 23,932.76 at the moment. Should we push 23,932 BTS or 23,932 / 0.144462 (USD/BTS rate)


Both are valid.

It depends what do you intend to sell.. do you want to guaranty the Dow performance against USD or BTS.

Actually buyer expect to perform against USD. That's why BTWTY and SNPFH express it in USD (publish feed = index price / USD/BTS rate).

Note that you can use BitUSD as collateral, and publish the index price unchanged.


Offline pc

  • Hero Member
  • *****
  • Posts: 1521
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Re: S&P 500, Dow and other indexes as smart assets
« Reply #3 on: April 09, 2018, 07:19:59 pm »
We've created 3 new smart-assets: INDEXSPX (S&P 500), INDEXDJI (Dow Jones Industrial Average), INDEXNASDAQ with a precision of 8, paired them with BTS.

Should we push 23,932 BTS or 23,932 / 0.144462 (USD/BTS rate)

Since you have paired them with BTS you *should* calculate and publish the index price in BTS, i. e. 23,932 / 0.144462 .
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline btsindex

Re: S&P 500, Dow and other indexes as smart assets
« Reply #4 on: April 10, 2018, 09:26:20 am »
Thank you! It seems that pushing a price feed reflecting a USD value in BTS is a good idea.
Assets permissions is also important topic. Thanks!

Offline btsindex

Re: S&P 500, Dow and other indexes as smart assets
« Reply #5 on: April 10, 2018, 12:51:22 pm »
More general question - can we trust feed-producers we don't know? https://bitsharestalk.org/index.php?topic=26273.0

Offline akledirs

Re: S&P 500, Dow and other indexes as smart assets
« Reply #6 on: February 12, 2019, 03:58:23 pm »
btsindex, you give wrong price on INDEXSPX. Diff>20%. Error - you use bitUSD price in your feed.

Offline akledirs

Re: S&P 500, Dow and other indexes as smart assets
« Reply #7 on: February 20, 2019, 07:56:47 am »
Anybody know contacts bts-index? He stopped feedprice 15 feb 2019.

Online sschiessl

Re: S&P 500, Dow and other indexes as smart assets
« Reply #8 on: February 20, 2019, 08:22:52 am »
In here is probably the best way

Offline btsindex

Re: S&P 500, Dow and other indexes as smart assets
« Reply #9 on: February 20, 2019, 09:46:54 am »
Sorry, there are multiple problems with the server script. Cli-wallet stopped working on Feb 15 (500 error). Because of frequent restarts by process manager, API that provides indexes prices blocked me. I'll try to fix that when i have some free time (probably at the end of the week). I could push the latest price for INDEXSPX manually to make it possible to settle the asset. It's the only asset i own that survived during the black-swan period with some amount still borrowed.

Offline btsindex

Re: S&P 500, Dow and other indexes as smart assets
« Reply #10 on: February 20, 2019, 09:46:31 pm »
Fixed the cli_wallet error, got a new API key. Restarted following assets:
INDEXSPX
INDEXDJI (in global settlement)
CUBED.USD (in global settlement)
CUBED.CNY (in global settlement)

I still can't get the feed for INDEXNASDAQ. The API returns an empty object. I'll check tomorrow.
P.S. Sorry about that downtime. It seems that the script is quite unstable so use the assets at your own risk.

Offline akledirs

Re: S&P 500, Dow and other indexes as smart assets
« Reply #11 on: February 21, 2019, 07:30:38 am »
Why you give price indexspx ~54500 bts if current price S&P=2792$, BTS= 0.0452$ and S&P=2792/0.0452=61769 BTS ? >13% different

Offline btsindex

Re: S&P 500, Dow and other indexes as smart assets
« Reply #12 on: February 21, 2019, 08:44:33 am »
Thanks, akledirs. You're right. That's because of the bitUSD global settlement. The script gets the BTS/USD price from the blockchain. And it doesn't make sense anymore. I'll probably update it later to get the price from the outside. That can trigger the global settlement for INDEXSPX. If anyone knows how to contact babydragon, please warn them about that. That's the only borrower at the moment. Don't borrow the asset until that update!

Offline akledirs

Re: S&P 500, Dow and other indexes as smart assets
« Reply #13 on: February 22, 2019, 10:10:55 am »
Thanks, akledirs. You're right. That's because of the bitUSD global settlement. The script gets the BTS/USD price from the blockchain. And it doesn't make sense anymore. I'll probably update it later to get the price from the outside. That can trigger the global settlement for INDEXSPX. If anyone knows how to contact babydragon, please warn them about that. That's the only borrower at the moment. Don't borrow the asset until that update!
His ratio 3.75, blackswan will not happen. Simple changing - use pricefeed from bts/usd but not market price.

Offline clockwork

  • Committee member
  • Sr. Member
  • *
  • Posts: 371
    • View Profile
  • BitShares: clockwork
Re: S&P 500, Dow and other indexes as smart assets
« Reply #14 on: February 22, 2019, 03:43:14 pm »
Thanks, akledirs. You're right. That's because of the bitUSD global settlement. The script gets the BTS/USD price from the blockchain. And it doesn't make sense anymore. I'll probably update it later to get the price from the outside. That can trigger the global settlement for INDEXSPX. If anyone knows how to contact babydragon, please warn them about that. That's the only borrower at the moment. Don't borrow the asset until that update!

You can update it to take the feed price from the chain rather than market and/or settlement...should be less code work

Offline pc

  • Hero Member
  • *****
  • Posts: 1521
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Re: S&P 500, Dow and other indexes as smart assets
« Reply #15 on: February 22, 2019, 05:49:01 pm »
Simple changing - use pricefeed from bts/usd but not market price.

Keep in mind that feed price may not match actual bts valuation either, see BSIP-42 and BSIP-58.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline akledirs

Re: S&P 500, Dow and other indexes as smart assets
« Reply #16 on: March 10, 2019, 11:32:44 am »
When update? I want settle this on true price.

Offline akledirs

Re: S&P 500, Dow and other indexes as smart assets
« Reply #17 on: June 24, 2019, 11:41:24 am »
btsindex, please give feedprice and do force settle for all if not can give feeds constantly. I few months not can close position on S&P.