issue for collateral with non BTS

Started by alt, December 08, 2015, 02:08:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alt

Quote from: abit on December 15, 2015, 11:29:05 PM
Quote from: alt on December 12, 2015, 01:45:34 PM
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

abit

Quote from: alt on December 12, 2015, 01:45:34 PM
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

abit

@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

alt

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

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 >>>

alt

Quote from: svk on December 08, 2015, 08:34:35 AM
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

svk

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

xeroc

Quote from: alt on December 08, 2015, 02:10:20 AM
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)

Quote from: alt on December 08, 2015, 02:16:11 AM
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

Quote from: alt on December 08, 2015, 03:50:37 AM
"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?

alt

"max_supply" not work
this issue is for all MPA, even can set this parameter to 1, the limit for supply didn't work

alt

GUI is totally incorrect for mpa collateral with non BTS, include page balance, borrow, market , fee calculate(transfer/trade)...

alt

#2
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.

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

alt

I am testing for private MPA which  collateral with non BTS(bitCNY) now
some issue about this will post at this thread.