Yes, technically my debt would be 5 bitUSD but if I understand it correctly, it works differently right now. My account would have 5 bitUSD and 10 bitUSD debt, in the case of margin call, whole 10 bitUSD would be settled and I would still have my 5 bitUSD in my account, wouldn't I?
Yes, exactly. Currently, you may have 5 bitUSD short position opened and 1000 bitUSD on your balance, and you can be margin called if BTS/USD price moves. This does not make sense to me at all.
Your proposal suggests "normal" and "margin" accounts - I'm not sure how difficult would it be to implement.
Not at all. This could be the same account, but you lock a fraction of BTS into "margin deposit". This means that you can't use these BTS other way than to settle margin position. This would define how much you can go below your current balance. Suppose, you have 1000 BTS and 10 bitUSD in your account. BitUSD is falling, you want to short. You lock 1000 BTS into margin deposit, and this allows you to sell 20 bitUSD at 100 BTS/bitUSD. Now you are 10 bitUSD short, covered with 2000 BTS collateral, and you have another 1000 BTS unlocked, which you can transfer, sell, or add to margin deposit and short 10 bitUSD more. Currently, bitshares allows you to achieve the same result either by going through more steps, or by adding more funds into your account.
I completely agree, this might be the first candidate for improvement. Would it require a hard fork? How to handle already-open positions? Could we implement it iteratively, e.g. handle collateral for bitUSD and bitCNY as one unit, it it's stable, add bitBTC, bitSILVER etc?
I have no idea what it would take to fix this. One thing I know for sure, that if you keep adding new features on top of old mistakes, you are going to end up with complete mess.