artwook / ledger

Permissioned Ledger
MIT License
0 stars 0 forks source link

Forced buyback or settlement on asset #9

Closed AlexChien closed 7 years ago

AlexChien commented 7 years ago

Asset Manager is able to perform forced buyback on asset registered and managed by it.

Asset manager will define total amount of fund to buy back asset

System should calculate buy back price based on the fund to buy back, supply in circulation, etc. System will move asset from user to asset manager and distribute purchasing fund to user.

Question: If system should automatically destroy these assets?

hackfisher commented 7 years ago

Question from last talk:

Do graphene have such built-in operations such as buy back? Other wise, maybe we need to draft some new operations in artwook.

AlexChien commented 7 years ago

You may investigate from here https://github.com/artwook/ledger/search?utf8=%E2%9C%93&q=buyback. I believe Graphene has some internal buyback functionality, just need to understand what it actually does and if it fits our needs

clar commented 7 years ago

I read the codes of the build-in buyback operation, from my understanding, we can't simply use it.

buyback 流程

  1. 创建buyback账户,指定回购的资产比如A (account_create_operation. extensions),(这里回购价格不做限制)
  2. 市场上有卖单出售资产A, 则回购账户自动生成买单,购买A,价格由市场卖方决定。
  3. 回购账户自动生成买单,发生在maintenance时候,是内置合约。create_buyback_orders()
  4. buyback 现在主要被用做强制分红,通过缩减供应/增加权益的方式。比如OBITS
  5. buyback 的资金来源应该是其它账户转入,生成的买单会尽量回购,直到消耗完。回购的资产A,应该还是保留在账户,没有销毁。

artwook buyback的问题

  1. 价格从哪里来,如果是市场决定,很可能会很高,或者买不到。
  2. 价格由mgr设定,强制清算用户的资产,是否有法律问题。 或者资产发行时候约定,比如当资产A的价格高于发行价20%的时候,发行人有权力强制回购。 。。。

Helpful links:

https://bitsharestalk.org/index.php/topic,20008.msg257082.html#msg257082

https://bitsharestalk.org/index.php/topic,20221.msg260411.html#msg260411

https://bitsharestalk.org/index.php/topic,21287.msg276724.html#msg276724

https://github.com/artwook/ledger/blob/edfdd371ce7ba408d5ac996c21291d8a848f85ad/libraries/chain/db_maint.cpp#L558

hackfisher commented 7 years ago

我们上次讨论的结论,从目前的需求出发,价格应该是由mgr设定,玖链审核签名。合规性方面的问题,应该是玖链需要去考虑的问题。

clar commented 7 years ago

ok,那么还是需要新加接口,设计一下流程。现在内置的不能直接复用。

clar commented 7 years ago

购买一个 可以被mgr任意设定回购价格 的资产,是有些奇怪的。 用户的角度来说,不太合理

hackfisher commented 7 years ago

Artwook的buyback流程牵涉到艺术品在链外线下的拍卖,不是纯链上,也不是去中心话的方式。正常的业务流程,mgr设定的价格应该是有一些材料依据的,玖链负责这些材料的审核,至于是否需要token holder来投票通过不是很确定,参考上市公司的回购,大股东提出回购之后,是需要通过董事会的。那么我们这里是否需要设定一个commitee votes(类似proposal),不是很确定? 不过这个是增加了一个条件,原型版本不加上也没有关系,后面再看需要。

最终这个需求最好玖链或project owner能参与进来决定,所以这个milestone不是很着急确定。

clar commented 7 years ago

嗯,这个需要po 来确定细节。 所以原型,我们可以仿照buyback,设计个forcebuyback账户,不过价格是固定的(可输入)的。

AlexChien commented 7 years ago

我在测试资产时,资产有一个permission设置,叫做发行人可以将资产收回,但是并未在UI中找到相关的操作入口,在cli_wallet中也似乎没有直观的看到。不知道具体是什么意思,我看文档是说,发行人有权从用户手里把资产取回。如果做相应补偿,那就是我们需要的回购了吧。找到相关代码的话,应该是有参考作用的。

2017-01-10 15 48 03

clar commented 7 years ago

创建资产的时候,可以设置 override_authority flag,发行人有权力 做任意的转账。只需要发行人的签名。

override_transfer_operation

确实可以把用户的资产转到管理人账户。我们可以在基于这个做,再做补偿。

hackfisher commented 7 years ago

There is another issue: Because the art assets could be placed in markets, so we need to cancel all the markets orders before force_buy_back.

hackfisher commented 7 years ago

Or, in another way, cancel all the markets related to the force_buy_back asset first.