BitShares Forum

Main => Technical Support => Topic started by: alt on December 07, 2015, 03:13:15 am

Title: how does globel settlle work?
Post by: alt on December 07, 2015, 03:13:15 am
I'm testing global settle in a private network.
after I ask for global_settle_asset, the asset is still there, how will this work?
if there is a delay, how to change the delay?(I have set force_settlement_delay_sec to 0)

and I have some questions about the details:
1. if the asset is in a market order, will global settle cancel the order automatic?
2. if the asset is another asset's short backing asset, how to handle the asset's which currently in the collatereal?
Title: Re: how does globel settlle work?
Post by: alt on December 07, 2015, 01:51:57 pm
seems global_settle_asset just open a switch to allow all holders ask for a settlement
the settlement will not really happen until the holders ask  for settlement

so I am wondering if there is a method to ask for a global settlement?
I want to run a business like prediction market
Title: Re: how does globel settlle work?
Post by: xeroc on December 07, 2015, 02:07:32 pm
Maybe this helps:
https://bitshares.org/doxygen/structgraphene_1_1chain_1_1asset__global__settle__operation.html

you may need to manually construct your transaction:
http://docs.bitshares.eu/bitshares/tutorials/construct-transaction.html
Title: Re: how does globel settlle work?
Post by: alt on December 07, 2015, 03:07:28 pm
Maybe this helps:
https://bitshares.org/doxygen/structgraphene_1_1chain_1_1asset__global__settle__operation.html

you may need to manually construct your transaction:
http://docs.bitshares.eu/bitshares/tutorials/construct-transaction.html
I think it's the same with  rpc call global_settle_asset from the cli_wallet, right ?
this seems just open a switch, allow holders to ask for settle
but if the holders don't ask for a settlement, the short possition will still be there.
and do you know how to disable the global_settle_asset after I have enable it?
Title: Re: how does globel settlle work?
Post by: bytemaster on December 07, 2015, 07:50:29 pm
Global Settlement is for Prediction Markets and is the Equivalent of a Manual Black Swan that cannot be reset.
Title: Re: how does globel settlle work?
Post by: xeroc on January 12, 2016, 03:09:34 pm
Global Settlement is for Prediction Markets and is the Equivalent of a Manual Black Swan that cannot be reset.
@bytemaster: I tried to work out the PM mechanics and after publishing a price feed for an asset that has "is_prediction_market" flag set to true, it automatically set the "global_settle" flag (which is fine)
However, I could NOT settle
Code: [Select]
  "current_feed_publication_time": "2016-01-12T14:49:00",
  "options": {
    "feed_lifetime_sec": 1209600,
    "minimum_feeds": 1,
    "force_settlement_delay_sec": 10,
    "force_settlement_offset_percent": 0,
    "maximum_force_settlement_volume": 10000,
    "short_backing_asset": "1.3.0",
    "extensions": []
  },
  "force_settled_volume": 0,
  "is_prediction_market": true,
  "settlement_price": {
    "base": {
      "amount": 20000000,
      "asset_id": "1.3.7"
    },
    "quote": {
      "amount": 20000000,
      "asset_id": "1.3.0"
    }
  },
  "settlement_fund": 20000000
}

Instead, i can request settlement as often as I want .. just nothing happens ..

//edit: interestingly .. settle asset does not result in a transaction to be put on the chain ??? just a signed transaction .. no broadcast :(
//edit2: False alarm .. seems my cli wallet did something wrong .. All is fine and PMs are working great ... docs coming today
Title: Re: how does globel settlle work?
Post by: abit on January 12, 2016, 10:21:28 pm
All is fine and PMs are working great ... docs coming today
Great thanks for the efforts!  +5%