Is the following, with my edits, still correct?
Lets assume initial price 1 USD == 1 BTSX
Bob starts with 200 BTSX
Alice starts with 100 BTSX.
Alice places an order to buy 100 USD with 100 of her BTSX
Bob places an order to sell (short) 100 USD with 100 of his BTSX as collateral
Alice and Bob's orders are matched as follows:
Alice receives her 100 USD
Bob receives -100 USD (he owes 100 USD) and 200 BTSX (his and Alice's 100 BTSX) held as collateral.
Alice now has 100 USD, Bob now has a -100 USD debt and 300 BTSX (200 BTSX of which is collateral)
arbitrary time passes...
Bob buys 100 USD from Alice for another 100 BTSX (not his collateral)
Bob now has 100 USD and -100 USD backed by 200 BTSX collateral
Bob covers, and gets is 200 BTSX collateral back (unfrozen)
Final balance:
Alice 100 BTSX
Bob 200 BTSX
If the price had changed during this exchange then Bob will end up with more or less BTSX