Can someone explain how does Bitshares market pegged assets work? I'm reading up on Bitshares and they say they have market pegged assets that are linked to USD and Gold (BitUSD and BitGold)

They say it holds a stable price and fluctuates somehow to make sure you still have that exact value. What I'm assuming they mean is that if you have 100 BitUSD that is equal to $100 USD. And if BitUSD dropped in value to say $90, your bitUSD will fluctuate to 110 or something to compensate the change. So the coins/asset are the #'s that are actually moving not the value.

Now the question I have is say if you have 1000 BitUSD and you want to cash out to USD. Who is going to be the one giving you actual dollars? Sure if you put in $1000 USD and purchased 1000 BitUSD. Say if you wanted to sell that 1000BitUSD now, who is going to buy that back from u at $1000?

This is what I'm confused about on the Market Pegged Assets.
Abstractly spoken, what you have in the current BitAsset 1.0 implementation is that in the market two parties meet that have different estimations for the future price.

Let's define the price to be the price of a bitAsset (i.e. bitUSD) denominated in BTS (base base currency in the BitShares network). For example 0.1 BTS per bitUSD. We need to clarify this here, because every market in BitShares can also be flipped, i.e. we can trade BTS:USD or USD:BTS.

Going Short

Let's say Mark thinks the price (i.e. 0.1BTS per bitUSD) will go up in the future while Nanny expects the price to drop soon. Nanny wants to a bet for this and goes short on bitUSD. Going short on a bitAssets means, that you lend it from the network (i.e. the network creates them for you) and sell it to a buyer (here, Mark). 

The collateral

In order to go short, you need to lock up some of your funds (here BitShares) as collateral, you can see this pretty much as a security that you will be able to give back your lent bitUSD eventually. The total collateral is 200% the amount your short payed by both parties of the trade. This means that:


In order to short 1 bitUSD, the amount of BTS worth 2 USD has to be locked up.
The shorter pays half of the collateral and the buys pays half.
If you want to short-sell 1 bitUSD you will have to lock away 1 USD worth of BTS and will not get anything from the trade.


Price movment

If the price (say to 0.09BTS per bitUSD) goes down then the market moved according to Nanny expectations and she should make a profit from the prediction. How is this achieve? As a short-seller, she has to give back the lent bitUSD eventually, so she can decide to do this at a price of 0.09 BTS/USD. This means she needs to buy bitUSD cheaper from the market than she sold it earlier in the short-sell. With the bought bitUSD, she can close her short order (i.e. cover) and give back the lent USD which will free up the collateral, which, considering that she had to buy bitUSD with BTS, should leave her a profit of 10%.

However, if the price goes up she can do one out of three things:


Wait for the 30 day short limits to arrive. The Network will put a buy order for bitUSD and close here order automatically giving her what is left from the collateral
Wait for the price to go up even further and risk a margin call. This will be triggered from the network if the collateral is only 150% (in contrast to the 200%). The network will force (i.e. it does this automatically) you to buy up bitUSD on the market and close the order.
The short seller can decide to cover on her own buy buying up bitUSD and closing the order herself.


All of these options will make the short-seller a loss as the prediction was wrong.

Market Peg

In the end, the market peg is achieved by a social consensus in such that 1 bitUSD should be worth 1 USD. Hence, trading against the peg should make you lose money because someone else will make a profit from trading towards the peg. Wouldn't you want to trade if someone offered you $1 for $90c?