Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - abit

Pages: 1 ... 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 ... 299
136
General Discussion / Re: New testnet tag test-5.0.0
« on: September 19, 2020, 10:32:44 pm »
AMM is live on testnet.

CLI tutorial in Chinese: https://bitsharestalk.org/index.php?topic=32631.msg343919#msg343919

Any capable node admin is able to review the source code and decide whether to run the code.

137
中文(Chinese) / Re: 测试网版本 test-5.0.0
« on: September 19, 2020, 02:49:43 pm »
AMM 流量池相关操作 ( cli_wallet 命令 和 API )

1. 建池

op code: 59

参数
Code: [Select]
fee                     手续费,测试网默认手续费 50 TEST
account                 账号,格式 1.2.x
asset_a                 资产A,格式 1.3.x
asset_b                 资产B,格式 1.3.x
share_asset             权益资产(即LP TOKEN),格式 1.3.x
taker_fee_percent       交易手续费,整数表示,单位是万分之一
withdrawal_fee_percent  提现手续费,整数表示,单位是万分之一

注:
* 资产 A 的 ID 必须小于资产 B 的 ID
* 建池必须绑定权益资产,只有权益资产持有人才能绑定,且自动成为池主
* 权益资产必须预先建好,不能是AB之一,必须是普通UIA,不能有存量

比如:

abit-test 建池,交易对 TEST/CONTEST.BTC ,权益资产 CONTEST.LP1

sign_transaction { "operations": [[59,{ "fee": { "amount": 5000000, "asset_id": "1.3.0" }, "account": "1.2.3833", "asset_a": "1.3.0", "asset_b": "1.3.1515", "share_asset": "1.3.1560", "taker_fee_percent": 12, "withdrawal_fee_percent": 50 }]] } true


1.1 检查操作结果

可以用 get_account_history 命令查看帐户操作历史,比如
Code: [Select]
get_account_history abit-test 10

结果示例
Quote
40057890 2020-09-19T14:28:06 liquidity_pool_create_operation abit-test fee: 50 TEST   result: {"new_objects":["1.19.0"],"updated_objects":["1.3.1560"],"removed_objects":[]}

格式为:块号 时间 操作 帐号 手续费 结果

结果里 new_objects 里 1.19.x 就是池 ID ,可以通过 get_object 命令查看
updated_objects 里的 1.3.1560 表示权益资产 ID
Code: [Select]
>>> get_object 1.19.0
[{
    "id": "1.19.0",
    "asset_a": "1.3.0",
    "asset_b": "1.3.1515",
    "balance_a": 0,
    "balance_b": 0,
    "share_asset": "1.3.1560",
    "taker_fee_percent": 12,
    "withdrawal_fee_percent": 50,
    "virtual_value": "0"
  }
]

结果说明:
id 池 ID
asset_a 资产A
asset_b 资产B
balance_a 余额A
balance_b 余额B
share_asset 权益资产
taker_fee_percent       交易手续费,整数表示,单位是万分之一
withdrawal_fee_percent  提现手续费,整数表示,单位是万分之一
virtual_value 恒定乘积 = balance_a * balance_b

用 get_asset CONTEST.LP1 命令也可以看到里面有一项 "for_liquidity_pool": "1.19.0"
表示该资产是不是一个 LP TOKEN ,以及对应的池ID是多少
Code: [Select]
>>> get_asset CONTEST.LP1
{
  "id": "1.3.1560",
  "symbol": "CONTEST.LP1",
  ...
  "for_liquidity_pool": "1.19.0",
  ...

2. 删池

op code: 60

参数
Code: [Select]
fee                     手续费,测试网默认手续费 0 ,也就是免费
account                 账号,格式 1.2.x
pool                    池 ID ,格式 1.19.x

注:
* 只有池主才可以删
* 只有空池才可以删
* 删后对应的权益资产可再利用

比如:

abit-test 删除 CONTEST.LP1 对应的池

sign_transaction { "operations": [[60,{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "account": "1.2.3833", "pool": "1.19.0" }]] } true


2.1 检查操作结果

可以用 get_account_history 命令查看帐户操作历史,比如
Code: [Select]
get_account_history abit-test 10

结果示例
Quote
40057890 2020-09-19T14:28:06 liquidity_pool_delete_operation abit-test fee: 0 TEST   result: {"new_objects":[],"updated_objects":["1.3.1560"],"removed_objects":["1.19.0"]}

格式为:块号 时间 操作 帐号 手续费 结果

结果里 removed_objects 里 1.19.x 就是池 ID ,表示已删除
updated_objects 里的 1.3.1560 表示权益资产 ID

3. 批量查询 API

* 按资产A查所有池 get_liquidity_pools_by_asset_a (asset_a, limit, start_id)
* 按资产B查所有池 get_liquidity_pools_by_asset_b (asset_b, limit, start_id)
* 按交易对查询池列表 get_liquidity_pools_by_both_assets ( asset_a, asset_b, limit, start_id)
* 按权益资产批量查询池 get_liquidity_pools_by_share_asset( [assets], subscribe )

注:
* limit和start_id 用于翻页。limit最大值默认101,是节点运行参数之一,可调节。
* subscribe 用于订阅通知


4. 充值,即将交易资产存入池中,换取对应的权益资产

op code: 61

参数
Code: [Select]
fee                     手续费,测试网默认手续费 0.1 TEST
account                 账号,格式 1.2.x
pool                    池 ID ,格式 1.19.x
amount_a                资产A数量,标准金额格式(数量+币种)
amount_b                资产B数量,标准金额格式(数量+币种)

注:
* 空池只有池主才可以充,非空池任何人都可以充
* 空池充值确定初始兑换比例
* 非空池充值时,资产按比例进池,按比例得到权益资产,多的充值会退还
* 池上限由权益资产(LP TOKEN)的最大供应量来调节

比如:

abit-test 往 CONTEST.LP1 池 充值 100 TEST 和 0.1 CONTEST.BTC

sign_transaction { "operations": [[61,{ "fee": { "amount": 10000, "asset_id": "1.3.0" }, "account": "1.2.3833", "pool": "1.19.0", "amount_a": { "amount": 10000000, "asset_id": "1.3.0" }, "amount_b": { "amount": 10000000, "asset_id": "1.3.1515" } }]] } true


4.1 检查操作结果

可以用 get_account_history 命令查看帐户操作历史,比如
Code: [Select]
get_account_history abit-test 10

结果示例
Quote
40058486 2020-09-19T15:00:33 liquidity_pool_deposit_operation abit-test fee: 0.10000 TEST   result: {"paid":[{"amount":10000000,"asset_id":"1.3.0"},{"amount":10000000,"asset_id":"1.3.1515"}],"received":[{"amount":10000000,"asset_id":"1.3.1560"}],"fees":[]}

格式为:块号 时间 操作 帐号 手续费 结果

结果里 paid 数组表示实际付款金额, received 数组表示得到的数量

也可以用 list_account_balances 命令查余额,此处略。

用 get_object 1.19.0 命令检查池信息


5. 提现,即将权益资产归还给池,换取所对应权益的交易资产

op code: 62

参数
Code: [Select]
fee                     手续费,测试网默认手续费 5 TEST
account                 账号,格式 1.2.x
pool                    池 ID ,格式 1.19.x
share_amount            权益资产数量,标准金额格式(数量+币种)

注:
* 按所支付的权益资产占比计算对应的交易资产,扣除提现手续费后支付给提现者
* 提现手续费存留于池中,最后一个提现的不扣手续费

比如:

abit-test 从 CONTEST.LP1 池 提现 100 LP1

sign_transaction { "operations": [[62,{ "fee": { "amount": 500000, "asset_id": "1.3.0" }, "account": "1.2.3833", "pool": "1.19.0", "share_amount": { "amount": 1000000, "asset_id": "1.3.1560" } }]] } true


5.1 检查操作结果

可以用 get_account_history 命令查看帐户操作历史,比如
Code: [Select]
get_account_history abit-test 10

结果示例
Quote
40058679 2020-09-19T15:11:30 liquidity_pool_withdraw_operation abit-test fee: 5 TEST   result: {"paid":[{"amount":1000000,"asset_id":"1.3.1560"}],"received":[{"amount":995000,"asset_id":"1.3.0"},{"amount":995000,"asset_id":"1.3.1515"}],"fees":[]}

格式为:块号 时间 操作 帐号 手续费 结果

结果里 paid 数组表示实际付款金额, received 数组表示得到的数量

也可以用 list_account_balances 命令查余额,此处略。

用 get_object 1.19.0 命令检查池信息


6. 交易,即用A资产换B资产或者用B资产换A资产

op code: 63

参数
Code: [Select]
fee                     手续费,测试网默认手续费 1 TEST
account                 账号,格式 1.2.x
pool                    池 ID ,格式 1.19.x
amount_to_sale          卖出数量和币种,标准金额格式(数量+币种)
min_to_receive          最少买入数量和币种,标准金额格式(数量+币种)

注:
* 池上限由权益资产(LP TOKEN)的最大供应量来调节

比如:

abit-test 往 CONTEST.LP1 池 卖 20 TEST,希望最少获得0.01 CONTEST.BTC

sign_transaction { "operations": [[63,{ "fee": { "amount": 100000, "asset_id": "1.3.0" }, "account": "1.2.3833", "pool": "1.19.0", "amount_to_sell": { "amount": 2000000, "asset_id": "1.3.0" }, "min_to_receive": { "amount": 1000000, "asset_id": "1.3.1515" } }]] } true


6.1 检查操作结果

可以用 get_account_history 命令查看帐户操作历史,比如
Code: [Select]
get_account_history abit-test 10

结果示例
Quote
40058783 2020-09-19T15:17:06 liquidity_pool_exchange_operation abit-test fee: 1 TEST   result: {"paid":[{"amount":2000000,"asset_id":"1.3.0"}],"received":[{"amount":1631296,"asset_id":"1.3.1515"}],"fees":[{"amount":0,"asset_id":"1.3.0"},{"amount":3269,"asset_id":"1.3.1515"}]}

格式为:块号 时间 操作 帐号 手续费 结果

结果里 paid 数组表示实际付款金额, received 数组表示得到的数量, fees 表示交易手续费

也可以用 list_account_balances 命令查余额,此处略。

用 get_object 1.19.0 命令检查池信息


138
中文(Chinese) / Re: 测试网版本 test-5.0.0
« on: September 19, 2020, 01:21:18 pm »
测试网升级出块正常。

139
General Discussion / Re: BitShares 5.0 (2020-09-30)
« on: September 18, 2020, 04:02:03 am »
The other change removing voting from liquid BTS is a huge and fundamental change to the functioning of BTS and should not be introduced without consensus. The previous change with stake multiplier already gives an (excessive in my view) increase in voting strength to stakers.

The removal of voting for collateral was a special case as far as I'm concerned - it was giving disproportionate voting power to a group that had every reason to corrupt the system during bear markets.
The new changes in 5.0 are necessary too. It's rolled out because the previous changes are insufficient for protecting the platform since corruption evolved.

141
General Discussion / New testnet tag test-5.0.0
« on: September 18, 2020, 03:51:49 am »
New testnet tag test-5.0.0 created: https://github.com/bitshares/bitshares-core/releases/tag/test-5.0.0
Activation time 2020-09-19 13:00:00 UTC.
For more info please check https://github.com/bitshares/bitshares-core/milestone/31?closed=1

UPDATE:

AMM is live on testnet.

CLI tutorial in Chinese: https://bitsharestalk.org/index.php?topic=32631.msg343919#msg343919

142
General Discussion / Re: BitShares 5.0 (2020-09-30)
« on: September 16, 2020, 06:24:39 pm »
AMM is a strong addition - can we see an overview of how it will work? (I.e. is it deployed on testnet or anything?)

Can we get an overview of each of the changes and why they are proposed? List copied below for clarity.

Release Notes: BitShares Core 5.0.0

Add extended history tracking for select accounts.
Extended operation history for accounts selected by ID or by registrar
Implement Automated Market Maker (AMM) aka Liquidity Pool
Implement liquidity pool
Remove voting power from liquid BTS and tickets
Remove liquid vp
Not only these. As of writing there are 59 closed issues and merged pull requests in the same milestone: https://github.com/bitshares/bitshares-core/milestone/31?closed=1 .

143
General Discussion / BitShares 5.0 (2020-09-28)
« on: September 16, 2020, 12:48:41 am »
The plan is to activate BitShares 5.0 on 2020-09-30.

The key feature in BitShares 5.0 is Automated Market making (AMM) aka liquidity pooling & mining. Code is here: https://github.com/bitshares/bitshares-core/issues/2260

All changes: https://github.com/bitshares/bitshares-core/milestone/31

Poll workers for the changes:

1.14.289 - "Poll---AMM Featured BTS 5.0 Update---Yes"
1.14.290 - "Poll---AMM Featured BTS 5.0 Update---NO"

Please vote.

144
中文(Chinese) / 计划9月30日上线BTS 5.0
« on: September 16, 2020, 12:41:55 am »
5.0 版本主推流量池自动做市挖矿(AMM)功能,代码已开发完成,详见 Github https://github.com/bitshares/bitshares-core/pull/2261

整个版本的完整更新内容见 https://github.com/bitshares/bitshares-core/milestone/31

145
Stakeholder Proposals / Re: [Witness Proposal] witness.hope
« on: September 14, 2020, 12:25:00 pm »
witness name : witness.hope
API node : wss://bts.8a8e.com:8889

Introduction :
Hello members of Bitshares . I am witness.hope,  five years web developers , from Beijing.  I hope to help bitshares network more safe and stable .

Main Witness Server
CPU Cores: 8
RAM:  32G
Disk SPACE : 500G
Connection: 2 Gps

Backup Witness Server
CPU Cores: 8
RAM: 32G
Disk SPACE: 500G
Connection: 2 Gbps

Full API Node:
CPU Cores :8
RAM:  32G
Disk Space : 500G SSD
Location : Beijing
Connection: 10Mbits

My plan for witness:
* Follow community consensus and implement voting results.
* Produce blocks  stable to help  the blockchain network safe.
* Feed price correctly :  Zapata's bitshares-pricefeed script will be used for feeding price .I can handle Price threshold(BSIP76) and Loopholes protection(BAIP2) properly . Although pricefeed work is not witness' job at present ,I am always ready.
* Maintain a better connection API  . Stable and easy to use .
Welcome.

Why witness nodes has 2G connections but API node only 10M? Actually API nodes need higher bandwidth than producing nodes to work.

Please try a testnet witness too. Register your account at https://test.xbts.io/

147
let's measure the engagement based on the expenses incurred on the selected list of fees.

...

BitShares distinguishes 68 different types of fees, there is a lot to choose from.

In this approach, Voting Power comes directly from building BitShares and its active use. I can't imagine anything more pure.
All the data is on chain. Perhaps you can analyze the data to prove your ideas.

I didn't check the data, but I assume that the known scammers and "bad actors" paid a quite big part of fees. On the other hand, when rules change, it's expected that behaviors would change too, so it needs iterations to find suitable rules and it needs time and efforts.

By the way, IMHO, it's the most natural that business owners decide how their businesses would operate. They may listen to users, but will never let the users decide.

148
中文(Chinese) / Re: 强清开始收费
« on: August 29, 2020, 11:21:47 am »
也发一篇英文的?

150
I think this is the biggest problem DPOS has to deal with in the real world and we can observe all of this, so it deserves the most attention. Neither the BSIP83 nor what we have at the moment solves this problem.

Even when using a stake, a fractional reserve can be used. You surely remember when poloniex had 300 million in a cold wallet and 300 million in a hot wallet. You also remember that their BitShares wallet was kept in maintenance for many months, and it was the same with Steemit. Each of these exchanges is able to put in the "Stake" such amount of tokens, which is able to significantly disturb the functioning of the management structure, especially if we introduce a multiplier.

That's where the lock-forever multiplier comes into play. CEX's may lock up stake, but likely won't lock up a lot of stake forever. In the meanwhile it relies on the good people to act and fight against the bad behaviors -- at their own costs, lock up their own stake. It means we need many people (or stake) who are willing to sacrifice their own benefit for the good of the whole, who try to fix issues, but not people who will simply turn around when issues appear.

Ideally good people do good things and should get rewarded, and as you said,
Quote
CEX and large external capital, as well as inactive people, do not have the right to vote. why should they? Why should we allow them to meddle in our affairs?
The question is who gets to decide who are good and who are bad, if it's code to decide, how to define the rules so that good behaviors and bad behaviors can be identified, and bugs are avoided. It's not only what to do, but how to do.

Thank you for the discussion anyway. I wish we can find the solutions.

Pages: 1 ... 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 ... 299