Author Topic: issue for collateral with non BTS  (Read 3965 times)

0 Members and 1 Guest are viewing this topic.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I have a question
if fee pools for each asset is fund by BTS
then core_exchange_rate should always be a price for exchange between this asset and BTS right?

if this is correct, there is a problem, I can't publish asset feed's core_exchange_rate with price for BTS

@alt FYI the new release v2.0.151215 introduced a workaround for this issue. See https://github.com/bitshares/bitshares-2/releases/tag/v2.0.151215. Hopefully other issues will be fixed eventually.
thanks, this seems fixed this issue

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4667
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
I have a question
if fee pools for each asset is fund by BTS
then core_exchange_rate should always be a price for exchange between this asset and BTS right?

if this is correct, there is a problem, I can't publish asset feed's core_exchange_rate with price for BTS

@alt FYI the new release v2.0.151215 introduced a workaround for this issue. See https://github.com/bitshares/bitshares-2/releases/tag/v2.0.151215. Hopefully other issues will be fixed eventually.
BitShares committee member: abit
BitShares witness: in.abit

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4667
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
@alt: Good catch. I submitted an issue on Github for you which links to this thread: https://github.com/cryptonomex/graphene/issues/480
BitShares committee member: abit
BitShares witness: in.abit

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I have a question
if fee pools for each asset is fund by BTS
then core_exchange_rate should always be a price for exchange between this asset and BTS right?

if this is correct, there is a problem, I can't publish asset feed's core_exchange_rate with price for BTS
Code: [Select]
unlocked >>> publish_asset_feed nathan BETA {"settlement_price":{"quote":{"amount":128,"asset_id":"1.3.1"},"base":{"amount":1,"asset_id":"1.3.2"}}, "core_exchange_rate":{"quote":{"amount":5000,"asset_id":"1.3.0"},"base":{"amount":1,"asset_id":"1.3.2"}}, "maintenance_collateral_ratio": 1001, "maximum_short_squeeze_ratio": 1001} true
publish_asset_feed nathan BETA {"settlement_price":{"quote":{"amount":128,"asset_id":"1.3.1"},"base":{"amount":1,"asset_id":"1.3.2"}}, "core_exchange_rate":{"quote":{"amount":5000,"asset_id":"1.3.0"},"base":{"amount":1,"asset_id":"1.3.2"}}, "maintenance_collateral_ratio": 1001, "maximum_short_squeeze_ratio": 1001} true
10 assert_exception: Assert Exception
feed.settlement_price.quote.asset_id == feed.core_exchange_rate.quote.asset_id:
    {}
    th_a  asset_ops.cpp:142 validate

    {"publishing_account":"nathan","symbol":"BETA","feed":{"settlement_price":{"base":{"amount":1,"asset_id":"1.3.2"},"quote":{"amount":128,"asset_id":"1.3.1"}},"maintenance_collateral_ratio":1001,"maximum_short_squeeze_ratio":1001,"core_exchange_rate":{"base":{"amount":1,"asset_id":"1.3.2"},"quote":{"amount":5000,"asset_id":"1.3.0"}}},"broadcast":true}
    th_a  wallet.cpp:1219 publish_asset_feed
unlocked >>>

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
The GUI assumes all collateral is in BTS for now, but should be easy to update that.
can you put this in your plan?
I want to create a smart coin collateral with non BTS

Offline svk

The GUI assumes all collateral is in BTS for now, but should be easy to update that.
Worker: dev.bitsharesblocks

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
update_asset: can't update the asset without parameter core_exchange_rate, and core_exchange_rate must include  asset BTS,
infact the core_exchange_rate update here is useless, it's depend on feed price.
transactions fees have to be paid in BTS .. independent of what the assets is.
The core exchange rate describes the price at which people can trade their asset to BTS from the asset's fee pool automatically on tranfers .. hence people can pay the fee in BETA (unless the pool is empty)

GUI is totally incorrect for mpa collateral with non BTS, include page balance, borrow, market , fee calculate(transfer/trade)...
Yhea .. thought that would happen. The webdevs may not have known about the possibility at all .. though I think this can be fixed

"max_supply" not work
this issue is for all MPA, even can set this parameter to 1, the limit for supply didn't work
Ui .. interesting .. @bytemaster?

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
"max_supply" not work
this issue is for all MPA, even can set this parameter to 1, the limit for supply didn't work

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
GUI is totally incorrect for mpa collateral with non BTS, include page balance, borrow, market , fee calculate(transfer/trade)...

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
update_asset: can't update the asset without parameter core_exchange_rate, and core_exchange_rate must include  asset BTS,
infact the core_exchange_rate update here is useless, it's depend on feed price.
Code: [Select]
unlocked >>> get_asset BETA
get_asset BETA
{
  "id": "1.3.2",
  "symbol": "BETA",
  "precision": 4,
  "issuer": "1.2.17",
  "options": {
    "max_supply": "1000000000000000",
    "market_fee_percent": 0,
    "max_market_fee": "1000000000000000",
    "issuer_permissions": 511,
    "flags": 16,
    "core_exchange_rate": {
      "base": {
        "amount": 1,
        "asset_id": "1.3.2"
      },
      "quote": {
        "amount": 128,
        "asset_id": "1.3.1"
      }
    },
    "whitelist_authorities": [],
    "blacklist_authorities": [],
    "whitelist_markets": [],
    "blacklist_markets": [],
    "description": "",
    "extensions": []
  },
  "dynamic_asset_data_id": "2.3.2",
  "bitasset_data_id": "2.4.1"
}
unlocked >>> update_asset BETA null {"flags": 0, "issuer_permissions": 511, "core_exchange_rate": {"base": {"amount": 1,"asset_id": "1.3.2" }, "quote": { "amount": 128$ "asset_id": "1.3.1" }}}  true
update_asset BETA null {"flags": 0, "issuer_permissions": 511, "core_exchange_rate": {"base": {"amount": 1,"asset_id": "1.3.2" }, "quote": { "amount": 128, "asset_id": "1.3.1" }}}  true
10 assert_exception: Assert Exception
core_exchange_rate.base.asset_id.instance.value == 0 || core_exchange_rate.quote.asset_id.instance.value == 0:
    {}
    th_a  asset_ops.cpp:216 validate

    {"symbol":"BETA","new_issuer":null,"new_options":{"max_supply":"1000000000000000","market_fee_percent":0,"max_market_fee":"1000000000000000","issuer_permissions":51
1,"flags":0,"core_exchange_rate":{"base":{"amount":1,"asset_id":"1.3.2"},"quote":{"amount":128,"asset_id":"1.3.1"}},"whitelist_authorities":[],"blacklist_authorities":[
],"whitelist_markets":[],"blacklist_markets":[],"description":"","extensions":[]},"broadcast":true}
    th_a  wallet.cpp:1107 update_asset
« Last Edit: December 08, 2015, 02:13:32 am by alt »

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I am testing for private MPA which  collateral with non BTS(bitCNY) now
some issue about this will post at this thread.