BitShares Forum

Main => General Discussion => Topic started by: G1ng3rBr34dM4n on August 26, 2014, 04:08:59 pm

Title: So I clicked the "cover" button...
Post by: G1ng3rBr34dM4n on August 26, 2014, 04:08:59 pm
This may be a dumb question, but I have a feeling that other people are probably in the same boat.

I clicked the green cover button under open orders; result: It appears I now have more btsx..

Questions:
What did I do? (with regards to market mechanics)
Are there any negative effects I should expect in the future?
"Green" button means "press here", right?
What do I need to know about margin orders?

I'm working to further my understanding of margin calls and could use a good overview / ELI5

Title: Re: So I clicked the "cover" button...
Post by: bitmeat on August 26, 2014, 05:07:12 pm
BUMP.

What does the COVER do? Does it execute at market prices? Or does it cover at the margin?

Can one put a limit cover order?!?
Title: Re: So I clicked the "cover" button...
Post by: jakub on August 26, 2014, 05:11:00 pm
You might find this helpful:
 https://bitsharestalk.org/index.php?topic=7628.msg101320#msg101320 (https://bitsharestalk.org/index.php?topic=7628.msg101320#msg101320)
Title: Re: So I clicked the "cover" button...
Post by: bytemaster on August 26, 2014, 05:12:04 pm
Cover transfers USD from your account to the MARGIN position canceling out some or all of the USD owed.  If the USD owed goes to 0, then the BTSX is transferred back to your account.

No market operations occur during a manual cover.
Title: Re: So I clicked the "cover" button...
Post by: bitmeat on August 26, 2014, 05:16:35 pm
Cover transfers USD from your account to the MARGIN position canceling out some or all of the USD owed.  If the USD owed goes to 0, then the BTSX is transferred back to your account.

No market operations occur during a manual cover.

Thank you! That makes sesne. So you manually purchase, then cover it.

I noticed in the UI that after I select an amount to cover it becomes the amount shown in the margin, even though that's not the correct total I have.
Title: Re: So I clicked the "cover" button...
Post by: theoretical on August 26, 2014, 05:22:54 pm

Is there any way to make a market order to cover?  If I'm short BitUSD, there's no economic reason I shouldn't be able to use the collateral to issue a Buy order at any price lower than the margin call (and if the order is filled, the BitUSD cover the position).

And there's an excellent reason to have this functionality:  If someone's entire wallet consists of short positions and they have no BTSX outside of collateral, it allows them to liquidate in an orderly fashion instead of being subjected to a margin call.  Even when not at the keyboard.
Title: Re: So I clicked the "cover" button...
Post by: bytemaster on August 26, 2014, 05:27:27 pm

Is there any way to make a market order to cover?  If I'm short BitUSD, there's no economic reason I shouldn't be able to use the collateral to issue a Buy order at any price lower than the margin call (and if the order is filled, the BitUSD cover the position).

And there's an excellent reason to have this functionality:  If someone's entire wallet consists of short positions and they have no BTSX outside of collateral, it allows them to liquidate in an orderly fashion instead of being subjected to a margin call.  Even when not at the keyboard.

There is a small economic reason.... it means those who are "short" actually hold more BTSX than their position indicates so they can cover at market prices.  We have a way to cover "at market" for a 5% fee... but it isn't available via the RPC calls.
Title: Re: So I clicked the "cover" button...
Post by: G1ng3rBr34dM4n on August 26, 2014, 06:22:19 pm
Cover transfers USD from your account to the MARGIN position canceling out some or all of the USD owed.  If the USD owed goes to 0, then the BTSX is transferred back to your account.

No market operations occur during a manual cover.

I'm still not quite sure what's going on here, so I'll keep asking questions...

What triggers a cover to pop up in my open order window?  I noticed last night after I bought some bitUSD and held, I never had a cover "opportunity" (is that the correct perspective?) pop up.

...the gears are turning, but I haven't quite connected the dots yet and I'm working to struggle through this before googling for answers.
Title: Re: So I clicked the "cover" button...
Post by: G1ng3rBr34dM4n on August 26, 2014, 06:22:37 pm
You might find this helpful:
 https://bitsharestalk.org/index.php?topic=7628.msg101320#msg101320 (https://bitsharestalk.org/index.php?topic=7628.msg101320#msg101320)

 +5%!  I'll read through this as soon as I can.
Title: Re: So I clicked the "cover" button...
Post by: bytemaster on August 26, 2014, 06:29:55 pm
Cover transfers USD from your account to the MARGIN position canceling out some or all of the USD owed.  If the USD owed goes to 0, then the BTSX is transferred back to your account.

No market operations occur during a manual cover.

I'm still not quite sure what's going on here, so I'll keep asking questions...

What triggers a cover to pop up in my open order window?  I noticed last night after I bought some bitUSD and held, I never had a cover "opportunity" (is that the correct perspective?) pop up.

...the gears are turning, but I haven't quite connected the dots yet and I'm working to struggle through this before googling for answers.

Owning BitUSD has no need to cover... only if you SHORT BitUSD do you have to worry about covering.
Title: Re: So I clicked the "cover" button...
Post by: liondani on August 26, 2014, 06:33:36 pm
in general when SHORTing
Title: Re: So I clicked the "cover" button...
Post by: G1ng3rBr34dM4n on August 26, 2014, 06:41:04 pm
Cover transfers USD from your account to the MARGIN position canceling out some or all of the USD owed.  If the USD owed goes to 0, then the BTSX is transferred back to your account.

No market operations occur during a manual cover.

I'm still not quite sure what's going on here, so I'll keep asking questions...

What triggers a cover to pop up in my open order window?  I noticed last night after I bought some bitUSD and held, I never had a cover "opportunity" (is that the correct perspective?) pop up.

...the gears are turning, but I haven't quite connected the dots yet and I'm working to struggle through this before googling for answers.

Owning BitUSD has no need to cover... only if you SHORT BitUSD do you have to worry about covering.

Hmm.  Either I clicked something without knowing I was shorting, or I found a bug.

Let me describe what happened (looking back at my transaction history for reference): 

I didn't short anything today.

What happened?!

Title: Re: So I clicked the "cover" button...
Post by: G1ng3rBr34dM4n on August 26, 2014, 06:44:36 pm
Cover transfers USD from your account to the MARGIN position canceling out some or all of the USD owed.  If the USD owed goes to 0, then the BTSX is transferred back to your account.

No market operations occur during a manual cover.

I'm still not quite sure what's going on here, so I'll keep asking questions...

What triggers a cover to pop up in my open order window?  I noticed last night after I bought some bitUSD and held, I never had a cover "opportunity" (is that the correct perspective?) pop up.

...the gears are turning, but I haven't quite connected the dots yet and I'm working to struggle through this before googling for answers.

Owning BitUSD has no need to cover... only if you SHORT BitUSD do you have to worry about covering.

Hmm.  Either I clicked something without knowing I was shorting, or I found a bug.

Let me describe what happened (looking back at my transaction history for reference): 
  • This morning I bought $500 bitUSD as I noticed the price of BTSX going down (price was at 21.998 btsx/bitUSD)
  • I placed a sell order for $500 bitUSD at the price of 25 btsx/bitUSD.
  • I then thought "eh, it probably won't hit 24 btsx so I'll cancel"
  • Meanwhile, a cover popped up under my open orders for $100 bitUSD - I wasn't sure what initiated that.
  • I cancelled the sell order
  • I immediately (within a block confirmation - ish) clicked on cover
  • wam bam, thank you sam - I now had another 4,399.9 btsx

I didn't short anything today.

What happened?!


AHA!  I think I realized what may have happened.  I have 2 computers right now running the same wallet (one at home, one at work).  Last night I opened a short on my home computer (I believe it was for $100 bitUSD at 22btsx/bitUSD... which makes total sense when this would have posted the cover) but the separate clients didn't sync my open orders (are they supposed to?)
Title: Re: So I clicked the "cover" button...
Post by: bytemaster on August 26, 2014, 06:53:25 pm
Separate clients will not sync open orders because they do not know about the keys.   I do not recommend operating the same wallet on two machines. 
Title: Re: So I clicked the "cover" button...
Post by: G1ng3rBr34dM4n on August 26, 2014, 06:56:13 pm
Separate clients will not sync open orders because they do not know about the keys.   I do not recommend operating the same wallet on two machines.

Noted. Thank you!
Title: Re: So I clicked the "cover" button...
Post by: GaltReport on August 26, 2014, 07:00:40 pm
So, I shorted some BitUSD and partially covered most of it so I won't have to worry abut a margin call.  I now see a margin entry in my open orders that shows a PRICE (BTSX/BITUSD) of 57.50 along with a quantity and my collateral.

What does this mean and specifically what does the 57.50 BTSX/BITUSD price mean?

Edit: Based on the fact that it now shows 115.00 BTSX/BITUSD price after I covered some more, I am guessing that is the BTSX price at which I will get an actual margin call?  So this entry is not an actual margin call?

Title: Re: So I clicked the "cover" button...
Post by: xeroc on August 26, 2014, 07:07:42 pm
Separate clients will not sync open orders because they do not know about the keys.   I do not recommend operating the same wallet on two machines.
Oh .. again sth. learn ... could you elaborate on how the order keys are generated if they are not derived from the account key?
Title: Re: So I clicked the "cover" button...
Post by: bytemaster on August 26, 2014, 08:37:10 pm
Separate clients will not sync open orders because they do not know about the keys.   I do not recommend operating the same wallet on two machines.
Oh .. again sth. learn ... could you elaborate on how the order keys are generated if they are not derived from the account key?

They are derived from the account key in sequential order, but one wallet doesn't know that the other wallet generated a new key.   We could add a feature to forward generate your private keys and have the wallet automatically increment its counter when it sees one of your keys in the blockchain.  This is not implemented and is not 100% reliable because you could generate keys for private accounts and then post an order.   We would have to have a "look ahead" function.   
Title: Re: So I clicked the "cover" button...
Post by: G1ng3rBr34dM4n on August 26, 2014, 09:07:29 pm
What happens when you have a margin order you can't cover?
Title: Re: So I clicked the "cover" button...
Post by: bytemaster on August 26, 2014, 09:14:54 pm
What happens when you have a margin order you can't cover?

The collateral is used to purchase the BitUSD for sale. If there is any change, 5% is taken as a fee and 95% returned to owner.