Author Topic: New to BitsharesX - some questions  (Read 13144 times)

0 Members and 1 Guest are viewing this topic.

jakub

  • Guest
Can we add this to the Market_Peg article on the wiki? It would fit perfectly!

Anyway, I am going to ref this thread on the reddit BitShares FAQ

pls for the great explanation

I've improved my text about Alice and Bob and published it in a new thread:
https://bitsharestalk.org/index.php?topic=7628.msg101320#msg101320

So If you find it better than the original you may want to update the link on reddit.
Also, I've added a new chapter describing the market peg - it might be a bit controversial but I am open to your comments on that.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
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

If the price of bitUSD went up relative to BTSX he will end up with less;
alternatively if the price went down he will end with more.
... in both cases as he is supposed to.
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline bytemaster

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline GaltReport

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
« Last Edit: August 25, 2014, 04:01:23 pm by GaltReport »

jakub

  • Guest
I've amended the last section of my original text about Alice and Bob.
https://bitsharestalk.org/index.php?topic=7278.msg99599#msg99599

It got a bit more complex but I hope it's more accurate this time.

Offline bytemaster

Lets assume initial price 1 USD == 1 BTSX
Bob starts with 200 BTSX
Alice starts with 100 BTSX.

Alice pays 100 BTSX
Bob  pays 100 BTSX
Alice receives 100 USD
Bob receives   -100 USD and 200 BTSX held as collateral.
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
Bob covers, and gets 200 BTSX 

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
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline GaltReport

Now that I am at a keyboard I can go into a tad more detail.   When Bob wants to get his collateral back, he must buy USD using OTHER BTSX.  Then once he has USD he can pay off his loan and get 100% of the collateral back.    This was a simplifying implementation because in theory it would be legit to use the collateral.   I like to think of this as a Hard & Soft collateral requirement.   Hard collateral cannot be touched.  Soft collateral is not "required" but is generally wise for a user to keep around.

In the event that price goes against the short, then the Hard collateral is used.

OK, I understand. Soft and Hard collateral distinction is now clear to me.
But what happens to the btsx that originally belonged to Alice? (I called it "the frozen btsx" in the text). Where does it go when Bob whats to exit by covering manually? It surely does not belong to Alice because she already sold it and it does not belong to Bob because he never paid for it. I thought that for the duration of the deal between Bob and Alice the system itself owns it and the system will use it to buy back the bitUSD when the deal is over.

It goes to Bob.   At the time of the original deal between A&B they each put in  "$100" of value in the form of BTSX.   Alice received $100 BitUSD and bob received "$200 of BTSX" which was placed in collateral.  The $200 belongs to bob only if hey pays off $100 BitUSD.

Why does Bob get $200 of BTSX? 

Oh, that was his collateral?  He's getting it back. Never mind!  :-[
« Last Edit: August 25, 2014, 03:27:54 pm by GaltReport »

Offline bytemaster

I tend to disagree.

1.What is so complicated with a short position period (+ explanation the so called 'soft collateral')

2. Generally in CFD's the margin is recalculated constantly. Which means it can go down. In BTSX this is not done. This is significant difference in my view. In similar context also profit and losses are recalculated (taken daily).
Maybe I am being too technical, but anyway my 0.0002 BTSX

Users can "recalculate their margin constantly" by "covering and re-shorting". 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
I tend to disagree.

1.What is so complicated with a short position period (+ explanation the so called 'soft collateral')

2. Generally in CFD's the margin is recalculated constantly. Which means it can go down. In BTSX this is not done. This is significant difference in my view. In similar context also profit and losses are recalculated (taken daily).
Maybe I am being too technical, but anyway my 0.0002 BTSX
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline bytemaster


Everything but the futures contract is fantastic.  It is more of a margin call.
What about "contract for difference"? As understood here:
http://en.wikipedia.org/wiki/Contract_for_difference
I'm not sure if there exists such thing as "margin call contract". Contract for difference looks to me as the best analogy. We could then refer people to the explanation offered by wikipedia.

BM, what about this? Is contract for difference a good analogy instead of futures contract?

Yes, contract for difference with automated execution.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

jakub

  • Guest

Everything but the futures contract is fantastic.  It is more of a margin call.
What about "contract for difference"? As understood here:
http://en.wikipedia.org/wiki/Contract_for_difference
I'm not sure if there exists such thing as "margin call contract". Contract for difference looks to me as the best analogy. We could then refer people to the explanation offered by wikipedia.

BM, what about this? Is contract for difference a good analogy instead of futures contract?


jakub

  • Guest
Now that I am at a keyboard I can go into a tad more detail.   When Bob wants to get his collateral back, he must buy USD using OTHER BTSX.  Then once he has USD he can pay off his loan and get 100% of the collateral back.    This was a simplifying implementation because in theory it would be legit to use the collateral.   I like to think of this as a Hard & Soft collateral requirement.   Hard collateral cannot be touched.  Soft collateral is not "required" but is generally wise for a user to keep around.

In the event that price goes against the short, then the Hard collateral is used.

OK, I understand. Soft and Hard collateral distinction is now clear to me.
But what happens to the btsx that originally belonged to Alice? (I called it "the frozen btsx" in the text). Where does it go when Bob whats to exit by covering manually? It surely does not belong to Alice because she already sold it and it does not belong to Bob because he never paid for it. I thought that for the duration of the deal between Bob and Alice the system itself owns it and the system will use it to buy back the bitUSD when the deal is over.

It goes to Bob.   At the time of the original deal between A&B they each put in  "$100" of value in the form of BTSX.   Alice received $100 BitUSD and bob received "$200 of BTSX" which was placed in collateral.  The $200 belongs to bob only if hey pays off $100 BitUSD.
So when Bob wants to cover manually he needs to use his own btsx to buy back the bitUSD but when the unwinding is finished he'll be fully compensated for this because his hard collateral will be fully released.

OK, I think I now get it. Thank you, bytemaster.

I'll amend the text to reflect this.

Offline bytemaster

Now that I am at a keyboard I can go into a tad more detail.   When Bob wants to get his collateral back, he must buy USD using OTHER BTSX.  Then once he has USD he can pay off his loan and get 100% of the collateral back.    This was a simplifying implementation because in theory it would be legit to use the collateral.   I like to think of this as a Hard & Soft collateral requirement.   Hard collateral cannot be touched.  Soft collateral is not "required" but is generally wise for a user to keep around.

In the event that price goes against the short, then the Hard collateral is used.

OK, I understand. Soft and Hard collateral distinction is now clear to me.
But what happens to the btsx that originally belonged to Alice? (I called it "the frozen btsx" in the text). Where does it go when Bob whats to exit by covering manually? It surely does not belong to Alice because she already sold it and it does not belong to Bob because he never paid for it. I thought that for the duration of the deal between Bob and Alice the system itself owns it and the system will use it to buy back the bitUSD when the deal is over.

It goes to Bob.   At the time of the original deal between A&B they each put in  "$100" of value in the form of BTSX.   Alice received $100 BitUSD and bob received "$200 of BTSX" which was placed in collateral.  The $200 belongs to bob only if hey pays off $100 BitUSD.   
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

jakub

  • Guest
Now that I am at a keyboard I can go into a tad more detail.   When Bob wants to get his collateral back, he must buy USD using OTHER BTSX.  Then once he has USD he can pay off his loan and get 100% of the collateral back.    This was a simplifying implementation because in theory it would be legit to use the collateral.   I like to think of this as a Hard & Soft collateral requirement.   Hard collateral cannot be touched.  Soft collateral is not "required" but is generally wise for a user to keep around.

In the event that price goes against the short, then the Hard collateral is used.

OK, I understand. Soft and Hard collateral distinction is now clear to me.
But what happens to the btsx that originally belonged to Alice? (I called it "the frozen btsx" in the text). Where does it go when Bob whats to exit by covering manually? It surely does not belong to Alice because she already sold it and it does not belong to Bob because he never paid for it. I thought that for the duration of the deal between Bob and Alice the system itself owns it and the system will use it to buy back the bitUSD when the deal is over.

jakub

  • Guest
Pretty good read!
Until you hit  point 4. (although in 3. Alice is not actually short btsx; )

On p.4 on:
-We cannot use futures contracts to try to explain a short position!
-if anything short position is a more basic term than futures contract.

This kind of puts us in an never ending position to try to explain something with something even more complicated. i.e. We get to p.4, now we have to write another article explaining how futures work; having skipped the short position explanation we will inevitably run into something needing explanation with something even more involved.

Plus, there is not much too complicated to Bob's position... he is just short bitUSD.
Futures contract analogy will definitely be removed. I'll amend it as soon as I fully understand bytemaster's response regarding what happens when Bob wants to cover manually.