0 Members and 1 Guest are viewing this topic.
if( ask_amount_usd < bid_amount_usd ) { // then we have filled the ask pay_asker += ask_amount_usd; loan_amount += ask_amount_usd;
if( ask_amount_bts < bid_amount_bts )
do this:buy 100,000,000 usd with 1btsshort 100,000,000 usd with 1btsthen I get 100,000,000 usd, 2bts will be margin call
I think something is not correct, but i can't write with english.Quote from: alt on February 16, 2014, 03:20:13 pm拿 bts /usd 市场看,假如现有很多买单了10000 usd 0.01 bts/usd800 usd 0.009 bts/usd800 usd 0.008 bts/usd.....我先挂一个买单100,000,000 usd 0.00000001 bts/usd排在最末尾然后我挂一个 short 操作按 0.000000001 bts/usd 价格发行 1000,000,000 usd是不是所有买单都能成交?大家都拿到了 bitusd,我自己也拿到了 100,000,000 bitusd。然后下一次,我的 short 会被强制平仓,损失所有抵押的 1bts。最终结果是 我会有1bts 抵押损失,留下大量 bitusd 空头,及 100,000,000 bitusdQuote from: alt on February 16, 2014, 03:33:23 pm应该改撮合算法。对short 撮合算法应该按 bts 数量判断是否完成。比如我 1bts 发行 100000 usd,只要我收到 1bts 就结束,最终结果不一定能发行 100000 usd,可能 100 usd 就结束了。结果是2 bts 抵押 100 usd。Quote from: alt on February 16, 2014, 03:43:55 pm在系统刚运行,市场上没任何买单时,还是会有漏洞。比如我自己做了唯一的买单是 1bts 1亿美金,唯一的 short 也是这个价。那我就是牺牲2个bts,拿到1亿美金。程序可以限制 short 撮合算法必须在足够买单之后才能启动。
拿 bts /usd 市场看,假如现有很多买单了10000 usd 0.01 bts/usd800 usd 0.009 bts/usd800 usd 0.008 bts/usd.....我先挂一个买单100,000,000 usd 0.00000001 bts/usd排在最末尾然后我挂一个 short 操作按 0.000000001 bts/usd 价格发行 1000,000,000 usd是不是所有买单都能成交?大家都拿到了 bitusd,我自己也拿到了 100,000,000 bitusd。然后下一次,我的 short 会被强制平仓,损失所有抵押的 1bts。最终结果是 我会有1bts 抵押损失,留下大量 bitusd 空头,及 100,000,000 bitusd
应该改撮合算法。对short 撮合算法应该按 bts 数量判断是否完成。比如我 1bts 发行 100000 usd,只要我收到 1bts 就结束,最终结果不一定能发行 100000 usd,可能 100 usd 就结束了。结果是2 bts 抵押 100 usd。
在系统刚运行,市场上没任何买单时,还是会有漏洞。比如我自己做了唯一的买单是 1bts 1亿美金,唯一的 short 也是这个价。那我就是牺牲2个bts,拿到1亿美金。程序可以限制 short 撮合算法必须在足够买单之后才能启动。
Quote from: bytemaster on February 15, 2014, 05:15:30 amToday I fixed some minor bugs, added support for reading a configuration file for bts_wallet and focused on updating the documentation which generated a whole host of new TODO items for me. You can view the latest BitShares X wallet and JSON-RPC documentation here: http://invictus.io/bitsharesx_wallet_docs.htmlThis documentation is a work in progress and I am missing many calls. According to this documentation, the feature to display transaction history seems missing.
Today I fixed some minor bugs, added support for reading a configuration file for bts_wallet and focused on updating the documentation which generated a whole host of new TODO items for me. You can view the latest BitShares X wallet and JSON-RPC documentation here: http://invictus.io/bitsharesx_wallet_docs.htmlThis documentation is a work in progress and I am missing many calls.
I just identified an missing feature that people will probably want / complain about if I don't fix. Right now you cannot use your collateral to buy BitUSD to cover your position. You must use additional funds to buy the BitUSD then use the BitUSD to recover your collateral. While I am sure market participants could work around and manage the requirement to have extra BTS around so they can cover their position, we may want to resolve this issue. From where I sit this may require a new output type (bid with collateral) and thus this change is non-trivial to implement. This is probably a 2-3 day task in its own right.
When you cover your position those BitUSD are destroyed... but if you lack enough collateral to cover it all then some BitUSD will be left in circulation despite your position being closed.
What is wrong with destroying coins? The value has to go somewhere... either the miner or everyone.