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.


Topics - zhangweis

Pages: [1] 2
1
中文 (Chinese) / 大量强清的本质是bitCNY吸引力下降
« on: February 20, 2020, 02:18:27 am »
强清的本质是bitCNY吸引力下降,持有意愿不足。强清实际是在这种情况下帮助缩小bitCNY供应量。只要是CNY吸引力相对下降,最终都会(通过承兑或者强清套利及其它套利等)传导到强清或强平来缩小供应量。类似提高强清补偿之类的举措我觉得不会解决这个问题。
至于bitCNY为什么吸引力下降,我可以看到的有很多,比如0.22最低喂价,移动平均喂价等等。老实说,只要话语权还在CNY债务持有人一方,必然会导致CNY吸引力不断下降。前面我也看到有个帖子提到"目前看有两种折价,一是涨了折价,二是跌了折价。",涨了折价,跌了也折价,CNY持有人要么家里有矿,要么头铁,或者强清。
利益相关说明:本人CNY净头寸是持有CNY债务,但是同时持有BTS,CNY发展不好会影响全局,所以并不希望CNY贬值。

2
中文 (Chinese) / 持有BitCNY不如持有BTS
« on: November 20, 2019, 01:05:16 pm »
BitCNY现在的主要价值支撑就是强清(基本没有黄单,就算有也是0.22附近),在现在最低喂价的规则下,BitCNY在市场价0.22以下时,只能以0.22买入BTS。

比如你现在有0.22 BitCNY,只要BTS价格低于0.22,那它价值永远不会超过1BTS(因为只能通过强清买到1BTS)。所以,0.22以下时,持有0.22 BitCNY跟持有1BTS其实是一样的。但是,如果BTS价格高于0.22,0.22 BitCNY只能相当于0.22 RMB。所以比较理智的做法是快到0.22时,把BitCNY通过强清买成BTS。但是考虑到0.22以下持有BitCNY等价于持有BTS,而强清有时间延迟,就是你想换的时候往往已经来不及了。所以我看不到不把BitCNY换成BTS的理由

从充提的费率变化可以明显看到这点,比如现在的BTS市价是0.166,而喂价是0.22,所以BitCNY大概等于0.166/0.22大约是0.75RMB。28%的费率基本反映了这一事实。

很明显,现在的BitCNY持有人承担了低于0.22的价格损失,却同时损失了BTS高于0.22价格时候的利益的,那对应谁得到了这些利益呢?我认为是债仓持有人,因为他们就是BitCNY持有人的对手方。

3
Technical Support / Wrong public key recovered from signature?
« on: January 29, 2018, 09:47:03 am »
I have an account(dge0003) registered with key BTS6JicNdetyZf2kceu86Ms47iLNshty1rthKtnL7fSej7DtKyJNu as owner and active auths and I want to change the owners and active auths to 2/3 of [BTS6JicNdetyZf2kceu86Ms47iLNshty1rthKtnL7fSej7DtKyJNu, BTS5TEb4CkHWyMJq62WrPtQVtzZBSCXD6BhjUXrVfdSztStrViNgE, BTS7i8ePNeLCAxcWjaEeqsDFRZdSeMoF4gZmfe54EqrdX4AdQMY3k].
I made a transaction using bitsharesjs and signed with private key of BTS6JicNdetyZf2kceu86Ms47iLNshty1rthKtnL7fSej7DtKyJNu like below:
tr_buffer:
08866dc8fef83436705a010623000000000000007188cd290102000000000302bab5c458f5a10cf4ff5573de6c07b276c51bf48ae21b37f6b38dce80e97371c30100024a5a3c31e18bfd06c1f68df63699b94161c34f8dbb004c2f9dfef92f86bf06f5010003739244d3500d992386975496f722b946007e9843c4b678fa3887390fb5ee0a6d0100000102000000000302bab5c458f5a10cf4ff5573de6c07b276c51bf48ae21b37f6b38dce80e97371c30100024a5a3c31e18bfd06c1f68df63699b94161c34f8dbb004c2f9dfef92f86bf06f5010003739244d3500d992386975496f722b946007e9843c4b678fa3887390fb5ee0a6d010000000000
tx:
{"ref_block_num":34312,"ref_block_prefix":4177447021,"expiration":"2018-01-30T09:09:08","operations":[[6,{"fee":{"amount":"35","asset_id":"1.3.113"},"account":"1.2.681608","owner":{"weight_threshold":2,"account_auths":[],"key_auths":[["BTS6JicNdetyZf2kceu86Ms47iLNshty1rthKtnL7fSej7DtKyJNu",1],["BTS5TEb4CkHWyMJq62WrPtQVtzZBSCXD6BhjUXrVfdSztStrViNgE",1],["BTS7i8ePNeLCAxcWjaEeqsDFRZdSeMoF4gZmfe54EqrdX4AdQMY3k",1]],"address_auths":[]},"active":{"weight_threshold":2,"account_auths":[],"key_auths":[["BTS6JicNdetyZf2kceu86Ms47iLNshty1rthKtnL7fSej7DtKyJNu",1],["BTS5TEb4CkHWyMJq62WrPtQVtzZBSCXD6BhjUXrVfdSztStrViNgE",1],["BTS7i8ePNeLCAxcWjaEeqsDFRZdSeMoF4gZmfe54EqrdX4AdQMY3k",1]],"address_auths":[]},"extensions":[]}]],"extensions":[],"signatures":["200ad525ede016109cf8179a3b61cd73be43028f45ef06a89e46e969b9532cb7774887c8e7fce778e8b09c7926cd20de6fc985f1af81ffcd16c5a5ee55b62ad01d"]}
signature:
200ad525ede016109cf8179a3b61cd73be43028f45ef06a89e46e969b9532cb7774887c8e7fce778e8b09c7926cd20de6fc985f1af81ffcd16c5a5ee55b62ad01d

But when I broadcast the signed transaction, I got a strange error:
message: 'missing required active authority: Missing Active Authority 1.2.681608',
data:
{ code: 3030001,
name: 'tx_missing_active_auth',
message: 'missing required active authority'.......
It's the same with the online wallet like https://bit.btsabc.org
If I change the owners and active to 1 keys(not 3 keys), it works without any problem. Like below:
tr_buffer:5b8719e085e115f96e5a01065c00000000000000009fa529000101000000000102f8ab2052da99051dd75717aa74d240e5ea06a20ec5708e1703d61040c344818b010000000000
{"ref_block_num":34651,"ref_block_prefix":3783647257,"expiration":"2018-01-29T10:36:05","operations":[[6,{"fee":{"amount":"92","asset_id":"1.3.0"},"account":"1.2.676511","active":{"weight_threshold":1,"account_auths":[],"key_auths":[["BTS6n1Fnc4oz3Lg2KUdJubsVPRzEfsF7ouo7ppTjDnmJYdfkeFb8Q",1]],"address_auths":[]},"extensions":[]}]],"extensions":[],"signatures":["207718a70e97aa1629a1a2c93dc85215eae64dc8822477a90cf10f5553a0d9413f511b6268aaf445fe983aad0b89870d896156f0b88bf872e56b2e4e1f69a9855a"]}
sig: 207718a70e97aa1629a1a2c93dc85215eae64dc8822477a90cf10f5553a0d9413f511b6268aaf445fe983aad0b89870d896156f0b88bf872e56b2e4e1f69a9855a

I'm using wss://eu.openledger.info/ws as api point.


4
I'm working on a multi-sig related function and found it too limited for transaction expiration.
I checked the code and found GRAPHENE_DEFAULT_MAX_TIME_UNTIL_EXPIRATION is set to 1 day. This is way too short for me as the two parties in multi-sig need more than 1 day to cooperate on transaction signature.
How can I bypass this limitation?

5
中文 (Chinese) / 交易App想法及原型
« on: February 18, 2017, 03:40:52 am »
由于众所周知的原因,现在是BTS占领市场的好机会。传统中心化交易所的弊端从这段时间可以看得很清楚,而OTC价格变化慢,交易成本较高。
现在的在线钱包如果从交易的角度看是非常不好用的,存在一下问题:
访问不方便,由于网站在境外,访问较慢,websocket几乎更加不能连接,需要用户手动选择镜像ws,对用户非常不友好
没有手机App
界面和概念复杂
流程不清晰,不符合熟悉交易所的人的常识

总之就是很不像个交易所。所以一个适用于交易用户的App会对以上人群有很大帮助,我花了很短时间做了个原型,https://btsbotfund.com:8081/ 服务器在境外,第一次访问请耐心,未来会打包到App中,就不会有访问的问题了。
注册账户由于使用openledge,未免造成压力,可以点击“使用测试账户”

6
General Discussion / DCS(DiceShares renamed from JDS) testnet#2
« on: May 24, 2016, 05:02:38 am »
Original test post: https://bitsharestalk.org/index.php/topic,22454.0.html
White Paper:
https://docs.google.com/document/d/1r5SQcRGrmTRrNesETarMrkAZ-1gvJVbjL7sHStsTpHw/edit?usp=sharing

To join the testnet, you can:
- Directly open http://120.27.4.72:7000/ on browser with secret "record truth cost animal congress harsh obtain surround puppy rain town exit". Click dices menu item to play dices.
- Setup a node by cloning https://github.com/zhangweis/dcs.git and follow the instructions.

New features:
- RNG based on DPOS.
- Shuffle on every block so that delegate can only know its position 1 block ahead.
- UI optimization.

7
中文 (Chinese) / 重启JDS项目
« on: May 14, 2016, 02:19:45 pm »
我现在有比较多的时间可用,所以准备fork LISK代码重启JDS。具体见英文贴 https://bitsharestalk.org/index.php/topic,22454.0.html

8
General Discussion / JDS(Just Dice Shares) testnet
« on: May 14, 2016, 02:16:09 pm »
JDS is a decentralized dice blockchain. The purpose is to dice with generated random number fairly and quickly. All JDS holders will be the house. Players also need JDS to play dices.

Currently JDS is in very early stage and has a testnet running with development of several days. Only the dice transaction and jackpot part is finished and RNG part is not started.
To join the testnet, you can:
- Directly open http://120.27.4.72:7000/ on browser with secret "record truth cost animal congress harsh obtain surround puppy rain town exit". Click dices menu item to play dices.
- Setup a node by cloning https://github.com/zhangweis/jds.git and follow the instructions.

Initial token distribution is not planned yet.


JDS forks LISK which uses DPOS and Nodejs.
 - Consensus algorithm: DPOS
 - Block interval: 5 sec.
 - House edge: 1%
 - Max dice amount: 1% of all JDS
 - Dilution to pay dice payout if player wins
 - Burn dice amount if house wins

Rough plan:
 RNG (1-2 months)
 UI Optimization (1 week)

9
I remember it's mentioned somewhere that account id is used in transaction on blockchain instead of address. Suppose you're using a lightweight wallet and you want to transfer money to someone account. If the server cheats you by giving wrong account id, your money can go to somewhere else. In bitcoin (or BTS1.0), if I'm using address as transfer target, the worst the server can cheat is not broadcasting and I'm relatively safe.
I think it's better to use address on blockchain and for perfomance reason hash the address to an id for memory and code to use. This way it's still safe and with high performance.
I know if you're using account name, we need to trust the server for getting the account id or public key and it's similar with BTS 1.0. And account id as target has the benefit that changing active/owner key will not impact account's balance. But at least we should have an option to specify address as target in a transaction on blockchain.

10
General Discussion / Home made HTML+js based cold storage
« on: April 25, 2015, 11:28:48 pm »
I'm really eager to use cold storage for my BTS and BTA. I remember there's a solution to use multi-sig for cold storage but my requirement is to use chromebook for storing keys and signing tx.
So I've made 2 pages for that purpose based on bitshares-js. Currently only BTC addresses are supported for both the from address and to address. They're home made so it's not convenient and may have security issues. It's absolutely with no warrants. Use at your own risk. I have tested transferring some BTS and USD (amount < 1) between btc addresses and it works for btc address but not for BTS address. Please use with caution.
The source code can be found at https://github.com/zhangweis/bts-cold
1. Online one:
http://zero.btsjohn.com/bts-cold/createtx.html
This is to create the tx. You need to input the from BTC address and the to BTC address. You can also set the amount and BTS/USD. After that, just click "Create Trx.", a Json and hex for the tx will be generated. Copy the tx hex and go to step 2.


2. Offline one:
http://zero.btsjohn.com/bts-cold/sign.html
Paste the tx. hex, input your WIF private key and click "Sign". Wait a while and copy the generated signature hex. go back to page 1.


3. Generate signed tx.
On page 1, paste the signature hex and click "Signed Trx.". You'll signed_transaction json which you can use the cli to broadcast the tx to the network by using "network_broadcast_transaction {xxxxxxxx}"


It's really a prototype and I can see many improvements but after a whole sleepless night what I need is to rest.
Some areas to improve:
- Get balance from wallet.bitshares.org
- Some UI improvements.
- Broadcast the signed tx. using wallet.bitshares.org

11
Technical Support / Error compiling on raspberry pi 2 with salsa20.s.
« on: March 14, 2015, 12:04:30 am »
I tried gcc and clang with the similiar errors like below. I guess it's because salsa20.s doesn't support arm. What is this salsa20 for and can I make it work with arm? Can we turn it into C to make it compile or is there a way to bypass this?

[ 23%] Building C object libraries/fc/CMakeFiles/fc.dir/vendor/salsa20/salsa20.s.o
clang: warning: argument unused during compilation: '-std=c99'
clang: warning: argument unused during compilation: '-D NDEBUG'
clang: warning: argument unused during compilation: '-I bitshares/libraries/fc/include'
clang: warning: argument unused during compilation: '-I bitshares/libraries/fc'
clang: warning: argument unused during compilation: '-I bitshares/libraries/fc/vendor/cyoencode-1.0.2/src'
clang: warning: argument unused during compilation: '-I bitshares/libraries/fc/vendor/boost_1.51/include'
clang: warning: argument unused during compilation: '-I bitshares/libraries/fc/vendor/salsa20'
clang: warning: argument unused during compilation: '-I bitshares/libraries/fc/vendor/easylzma/src'
clang: warning: argument unused during compilation: '-I bitshares/libraries/fc/vendor/udt4/src'
bitshares/libraries/fc/vendor/salsa20/salsa20.s:279:5: error: unexpected token in operand
mov %esp,%eax
    ^
bitshares/libraries/fc/vendor/salsa20/salsa20.s:280:9: error: unexpected token in operand
and $31,%eax
        ^
bitshares/libraries/fc/vendor/salsa20/salsa20.s:281:10: error: unexpected token in operand
add $640,%eax
         ^
bitshares/libraries/fc/vendor/salsa20/salsa20.s:282:5: error: unexpected token in operand
sub %eax,%esp
    ^
bitshares/libraries/fc/vendor/salsa20/salsa20.s:287:6: error: unexpected token in operand
movl %eax,0(%esp)
     ^

12
General Discussion / 10% dilution = 650,000 BTS a day
« on: October 22, 2014, 08:31:25 pm »
2 billion bts * (1+20%) = 2.4 billion. 2.4 billion * 10% / 365 = 657,534 bts

That makes about 650,000 bts a day. To me, this has much much bigger impact than PTS, AGS, DNS merge.

Well, btc currently has about 10% dilution but it's also decreasing along the time.

If we have to pay high to delegates at the moment, at least we should decrease the rate along the time.

13
中文 (Chinese) / JDS赌王大赛计划草案
« on: October 11, 2014, 05:08:28 am »
https://bitsharestalk.org/index.php?topic=9758.msg128899#msg128899

计划从Dry run 3开始每个dry run一次骰子比赛。希望大家多帮我测试下,谢谢。可以用dry run 2先熟悉熟悉。

14
General Discussion / A cross-chain idea derived from escrow
« on: October 10, 2014, 11:50:40 pm »
I know very little about cross chain but it's interesting to think about. Forgive me if it's obvious, ridiculous or nonsense.

The idea works like escrow. Say A wants to trade with B for btsx with btc. A sends btsx to an escrow(C). C receives btsx and watch whether B has sent btc to A in specified time. If not, C sends btsx back to A. If yes, C sends btsx to B.

Here we can have the delegates(thus the btsx network) acting as escrow. That means btsx network need to know btc network. This is quite a burden and that's why it's not perfect. But at least btc network doesn't need to know anything about this. Maybe delegates can choose to directly use data from say blockchain.info.

The idea works like this:
A and B agrees on a crosschain transaction.
A sends a crosschain transaction (transferring 100 BTSX to B when a specified BTC transaction happens in 5 days).
B sees this transaction in btsx blockchain and is assured he can receive the btsx when btc transaction is done in time.
B sends btc to A as the transaction specified.
delegates see the btc transaction in 5 days, transfer the btsx to B.
if delegates don't see the btc transaction in 5 days, transfer the btsx back to A.

15
General Discussion / JDS Dry Run #2
« on: October 06, 2014, 04:33:02 pm »
Changes:

Improved UI:
It shows progress and how many blocks to get result for each dice in progress.

Improved security against delegates collusion:
The more amount you dice, the more blocks you have to wait for the jackpot. The block count calculation is roughly like below:
jackpot blocks = min(MAX_WAIT_BLOCKS,payout / delegate income)
MAX_WAIT_BLOCKS is currently set to 50.
Say, if you dice 100JDS with payout 20, and the delegate's income of the current block is 200, you'll need to wait for 10 blocks for the result.   
All the dices in the same block are sorted by payout and accumulated for the calculation of packout blocks.
Say we have 3 dices:[50@10, 100@2, 500@2].
We get payouts [500, 200, 1000] and they're sorted as [200,500,1000].
For 100@2, the accumulated amount is 200 and jackpot is 2 blocks.
For 50@10, the accumulated amount is 200+500=700 and jackpot is 4 blocks.
For 500@2, the accumulated amount is 200+500+1000=1700 and jackpot is 9 blocks.

The plan is to shuffle delegates after each block to improve security.

Original dry run info.:
https://bitsharestalk.org/index.php?topic=9393.0



Pages: [1] 2