Open xeroc opened 7 years ago
On the testnet I get
Skipping buyback processing selling 1.3.329 for {........}
Account 1.2.3564 'special-account' attempted to pay fee by using asset 1.3.0 'TEST', which is unauthorized due to whitelist / blacklist
Interestingly, this error comes from evaluator.cpp
Which makes me believe that it is not necessarily an issue with markets
but rather with whitelisting, but the CORE asset doesn't use a whitelist.
Who can shed some light on this?
//edit: found it. It is indeed caused by allowed_assets
which is a list curated by markets
See is_authorized_asset.hpp and account_evaluator.cpp.
Not knowing anything about the internal architecture, I would think the easiest way to resolve this is to add CORE
to allowed_assets
:
obj.allowed_assets->emplace( asset_id_type() );
@xeroc I'm not clear about the intent of this issue.
Are buyback accounts used anywhere except for STEALTH? Are there real-life use-cases that we don't support? Would a documentation change "fix" the problem with CORE
in allowed_assets
?
Are buyback accounts used anywhere except for STEALTH? Are there real-life use-cases that we don't support? Would a documentation change "fix" the problem with
CORE
inallowed_assets
?
There are real-life use cases we may want to support. A buyback account can be created with the extensions available in account_create_operation
. The idea (and implementation) is to have an account where I send profits and the blockchain to use those funds to buy back some defined assets (asset per account creation) from internal markets. That however fails due to the issue described in the OP.
@OpenLedgerApp would be a prime example for this. They want to use profits to buy back OBITS. and instead of doing that manually, they could just send profits to a buyback account for OBITS.
We do it manually for OBITS. We would like to implement a similar mechanism in our proposal - https://github.com/bitshares/bsips/pull/134
We are welcome for discussion.
Currently, a buyback account can be created using an
account_create
operation with anextension
like this:Problems are
owner
andactive
to be thenull-account
X
with assetsA
,B
, ... which is possible already, but the operation fails to pay for the fee becauseBTS
/TEST
are not part ofmarkets
. If it was, the core asset would be used to buy backX
.Proposal: Allow transfers of
CORE
to a special account to pay for the order creation fee IFFCORE
is not listed inmarkets
.Discuss!