Author Topic: how does globel settlle work?  (Read 2320 times)

0 Members and 1 Guest are viewing this topic.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
All is fine and PMs are working great ... docs coming today
Great thanks for the efforts!  +5%
BitShares committee member: abit
BitShares witness: in.abit

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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
« Last Edit: January 12, 2016, 04:08:12 pm by xeroc »

Offline bytemaster

Global Settlement is for Prediction Markets and is the Equivalent of a Manual Black Swan that cannot be reset.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
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?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
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

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
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?