Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitasset data #672

Open
GhazarArm opened this issue Feb 2, 2017 · 9 comments
Open

Bitasset data #672

GhazarArm opened this issue Feb 2, 2017 · 9 comments

Comments

@GhazarArm
Copy link

I have created a new bit asset data, but can't use

@xeroc
Copy link
Contributor

xeroc commented Feb 2, 2017

You'll need to be more precise if you want people to answer you request.
Why can't you use it?

Also, the official bitshares repo is no bitshares/bitshares-core

@GhazarArm
Copy link
Author

I use "create_asset" method and create market-issued asset.
When I use "issue_asset" method for issue new shares of an asset, method returns me
"
....
10 assert_exception: Assert Exception
!a.is_market_issued(): Cannot manually issue a market-issued asset.
....
"

Thanks for your feedback.
Ghazar.

@abitmore
Copy link
Contributor

abitmore commented Feb 2, 2017

@GhazarArm market-issued asset can only be issued by the market but not the owner. Firstly you need to set price feeds for the asset, then use the "borrow_asset" command to create new tokens.
This is by design. For more info (e.g. how to use and etc), please discuss / ask in the forum.

@GhazarArm
Copy link
Author

GhazarArm commented Feb 3, 2017

I use publish_asset_feed() method to set price feed for the asset.

"
publish_asset_feed hayq MCORE {"settlement_price": {"quote": {"amount": 1000000, "asset_id": "1.3.0"}, "base": {"amount": 8563, "asset_id": "1.3.474"}}, "core_exchange_rate": {"quote": {"amount": 8563, "asset_id": "1.4.474"}, "base": {"amount": 1050000, "asset_id": "1.3.0"}}} true

"
And get this error

"
10 assert_exception: Assert Exception
fc::to_uint64( s.substr( 0, first_dot ) ) == SpaceID && fc::to_uint64( s.substr( first_dot+1, second_dot-first_dot-1 ) ) == TypeID: Space.Type.0 (1.3.0) doesn't match expected value 1.4.474
{"TypeID":3,"SpaceID":1,"var":"1.4.474"}
th_a object_id.hpp:208 from_variant

{"var":"1.4.474"}
th_a  object_id.hpp:210 from_variant

"

How to set price feeds ?

@xeroc
Copy link
Contributor

xeroc commented Feb 3, 2017

The asset id in quote in core_exchange_rate is wrong .. it should be 1.3.xxx not 1.4.xxx

@GhazarArm
Copy link
Author

GhazarArm commented Feb 3, 2017

I tried it

publish_asset_feed hayq MCORE {"settlement_price": {"quote": {"amount": 1000000, "asset_id": "1.3.0"}, "base": {"amount": 8563, "asset_id": "1.3.474"}}, "core_exchange_rate": {"quote": {"amount": 8563, "asset_id": "1.3.574"}, "base": {"amount": 1050000, "asset_id": "1.3.0"}}} true

10 assert_exception: Assert Exception
feed.settlement_price.base.asset_id == feed.core_exchange_rate.base.asset_id:
{}
th_a asset_ops.cpp:141 validate

{"publishing_account":"hayq","symbol":"MCORE","feed":{"settlement_price":{"base":{"amount":8563,"asset_id":"1.3.474"},"quote":{"amount":1000000,"asset_id":"1.3.0"}},"maintenance_collateral_ratio":1750,"maximum_short_squeeze_ratio":1500,"core_exchange_rate":{"base":{"amount":1050000,"asset_id":"1.3.0"},"quote":{"amount":8563,"asset_id":"1.3.574"}}},"broadcast":true}
th_a  wallet.cpp:1246 publish_asset_feed

I don't understand how to get price_feed in publish_asset_feed()?

@xeroc
Copy link
Contributor

xeroc commented Feb 3, 2017

Either your asset id is 1.3.574 or 1.3.474 not both

@GhazarArm
Copy link
Author

GhazarArm commented Feb 6, 2017

I put in
borrow_asset account_name 3000 asset_name 300 true
and get this error

...
exception: unspecified
10 assert_exception: Assert Exception
enable_black_swan: Black swan was detected during a margin update which is not allowed to trigger a blackswan
{}
th_a db_update.cpp:250 check_for_blackswan

{}
th_a  db_market.cpp:547 check_call_orders

...
0 exception: unspecified
10 assert_exception: Assert Exception
enable_black_swan: Black swan was detected during a margin update which is not allowed to trigger a blackswan
{}
th_a db_update.cpp:250 check_for_blackswan

{}
th_a  db_market.cpp:547 check_call_orders

{"o":{"fee":{"amount":2000000,"asset_id":"1.3.0"},"funding_account":"1.2.18","delta_collateral":{"amount":30000000,"asset_id":"1.3.0"},"delta_debt":{"amount":30000,"asset_id":"1.3.4"},"extensions":[]}}
th_a  market_evaluator.cpp:275 do_apply

{}
th_a  evaluator.cpp:51 start_evaluate

{}
th_a  db_block.cpp:662 apply_operation

...

How to fix that?

@xeroc
Copy link
Contributor

xeroc commented Feb 7, 2017

you need more collateral to borrow that asset!

pmconrad pushed a commit to pmconrad/graphene that referenced this issue Apr 12, 2018
pmconrad pushed a commit to pmconrad/graphene that referenced this issue Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants