Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: Vitalik Buterin on November 04, 2013, 04:42:26 PM



Title: Mastercoin suggestion: Contracts for Difference
Post by: Vitalik Buterin on November 04, 2013, 04:42:26 PM
Currently, Mastercoin has a feature in the works of encoding bets on the blockchain. For example, A and B can make a bet with each other where A and B can both put 5 MSC into a pool such that all 10 MSC will go to A if eToro Inc says that the value of gold in USD exceeds 1300 at the end of Oct 31, otherwise the 10 MSC will go to B. One interesting use case of on-blockchain bets that this mechanism does not adequately address, however, is hedging. Suppose that Joe, an average business owner, wants to use Mastercoin to take advantage of its financial features, but is too scared about the price volatility of MSC. He has 50 MSC in the system, but wants to have his currency exposure entirely in USD. Say 1 MSC = 40 USD now for simplicity. With bets, the one strategy that Joe has is to make staggered bets at every dollar - bet $50 that MSC will be below 39 USD, $50 that MSC will be below 38 USD, and so forth, and the same up to some threshold. For every dollar MSC falls, Joe would lose 50 USD, but he would also win one additional bet and thus gain 50 USD back; the exact opposite would happen if the value of MSC goes up by some number of dollars.

Contracts for difference are a much easier way of doing this. Essentially, Joe and Speculator Sam both put 10 MSC into a pool where, on Oct 31, the pool would pay Joe 10 MSC + 1.25 MSC for every USD that the value of MSC drops. Thus, if the value of MSC in USD drops to $39, Joe loses 50 USD from the value of MSC dropping, but he would also gain 1.25 MSC ~= 50 USD from the contract for difference. If MSC goes up to 41 USD, the opposite would happen. Obviously, if MSC goes up or down by a large enough ratio the contract would reach a point where either Joe or Sam is entitled to the entire 20 MSC (in our example, at $32 or $48). At this point, the CFD would automatically force-liquidate, giving the correct party all of the funds, at which point the loser would be required to make a new CFD if they want to return to the same level of exposure.

This would replicate much of the functionality of self-issued currencies; I think the two models could exist side by side and we'll see which model becomes more popular.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 04, 2013, 10:25:28 PM
Currently, Mastercoin has a feature in the works of encoding bets on the blockchain. For example, A and B can make a bet with each other where A and B can both put 5 MSC into a pool such that all 10 MSC will go to A if eToro Inc says that the value of gold in USD exceeds 1300 at the end of Oct 31, otherwise the 10 MSC will go to B. One interesting use case of on-blockchain bets that this mechanism does not adequately address, however, is hedging. Suppose that Joe, an average business owner, wants to use Mastercoin to take advantage of its financial features, but is too scared about the price volatility of MSC. He has 50 MSC in the system, but wants to have his currency exposure entirely in USD. Say 1 MSC = 40 USD now for simplicity. With bets, the one strategy that Joe has is to make staggered bets at every dollar - bet $50 that MSC will be below 39 USD, $50 that MSC will be below 38 USD, and so forth, and the same up to some threshold. For every dollar MSC falls, Joe would lose 50 USD, but he would also win one additional bet and thus gain 50 USD back; the exact opposite would happen if the value of MSC goes up by some number of dollars.

Contracts for difference are a much easier way of doing this. Essentially, Joe and Speculator Sam both put 10 MSC into a pool where, on Oct 31, the pool would pay Joe 10 MSC + 1.25 MSC for every USD that the value of MSC drops. Thus, if the value of MSC in USD drops to $39, Joe loses 50 USD from the value of MSC dropping, but he would also gain 1.25 MSC ~= 50 USD from the contract for difference. If MSC goes up to 41 USD, the opposite would happen. Obviously, if MSC goes up or down by a large enough ratio the contract would reach a point where either Joe or Sam is entitled to the entire 20 MSC (in our example, at $32 or $48). At this point, the CFD would automatically force-liquidate, giving the correct party all of the funds, at which point the loser would be required to make a new CFD if they want to return to the same level of exposure.

This would replicate much of the functionality of self-issued currencies; I think the two models could exist side by side and we'll see which model becomes more popular.

Terrific idea Vitalik. This is powerful stuff - even if the Backed Currencies feature of Mastercoin completely fails (it's a super experimental feature), CFDs can totally make up for it in being a vehicle for people to directly invest in currencies, with the only risk they're exposing themselves to is the risk that the feed generator (eToro in this case) is lying ... but without any risk to the underlying assets.

Recommend Reading: http://en.wikipedia.org/wiki/Contract_for_difference

A CFD is always a contract between two parties - one of them is going long on a particular asset (USD in Vitalik's example), and the other one is going short on the same asset. The mastercoin blockchain serves as the mediator and makes sure each party has sufficient funds committed.

You could have several CFDs for the same asset pairs - there would be bids and asks, with varying margins (discount/overcharge over the real price of a USD). At any time there would be both bids and asks (parties desiring short and long positions on an asset). It is highly beneficial for market players to maintain correct positions on a CFD marketplace, because it's essentially free money - you can decide your own margin, which will be enough to cover any potential risk you encounter. So, with a large enough market, a new party desiring to buy or sell a CFD will always find a counterparty with a relatively low margin.

I believe this is The Missing Link - a surefire way to implement any kind of asset on mastercoin, in a way that requires the minimum amount of trust (just in the price feed - maybe in the future we'll be able to distribute that away as well). Backed Currencies were our previous route to achieving this goal, and they might still work, but CFDs will definitely work (we'll implement both of course).


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: dacoinminster on November 04, 2013, 10:34:54 PM
Heck yes. Doing CFDs as a MasterCoin feature is a fantastic idea. The user experience is (probably) not as simple as it would be for escrow-backed currencies, but unlike those currencies, there isn't any doubt about whether this would work, or for how long.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 04, 2013, 10:38:43 PM
Heck yes. Doing CFDs as a MasterCoin feature is a fantastic idea. The user experience is (probably) not as simple as it would be for escrow-backed currencies, but unlike those currencies, there isn't any doubt about whether this would work, or for how long.

BTW you could even have meta features based on it: I could basically entrust a certain amount of mastercoins to "any CFD that meets certain criterias". This way, even if the duration of the contract runs out, and my counterparty can withdraw their funds ... my CFD will automatically pop up to find the next counterparty, and I won't have to manually find another one.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: dacoinminster on November 04, 2013, 10:47:58 PM
BTW you could even have meta features based on it: I could basically entrust a certain amount of mastercoins to "any CFD that meets certain criterias". This way, even if the duration of the contract runs out, and my counterparty can withdraw their funds ... my CFD will automatically pop up to find the next counterparty, and I won't have to manually find another one.

So, if somebody maxes out one CFD, they automatically switch to another one with equivalent terms?

Whoa. Mind blown.

Of course, you can't be sure that there will always be a counter-party available for a given set of terms, but still, that failure scenario is very easy to understand.



Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 04, 2013, 10:51:09 PM
BTW you could even have meta features based on it: I could basically entrust a certain amount of mastercoins to "any CFD that meets certain criterias". This way, even if the duration of the contract runs out, and my counterparty can withdraw their funds ... my CFD will automatically pop up to find the next counterparty, and I won't have to manually find another one.

So, if somebody maxes out one CFD, they automatically switch to another one with equivalent terms?

Whoa. Mind blown.

Of course, you can't be sure that there will always be a counter-party available for a given set of terms, but still, that failure scenario is very easy to understand.



Well, there will be a lot of incentive for people to offer CFDs at competitive rates.
So if I see that over time the margin for CFDs is always in the 0-1% range, if I buy a meta-CFD with a margin of 2%, it will always find a match (of course it will not cost me 2%, but rather the best the market can offer up to 2%).


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: Luckybit on November 04, 2013, 11:14:19 PM
Heck yes. Doing CFDs as a MasterCoin feature is a fantastic idea. The user experience is (probably) not as simple as it would be for escrow-backed currencies, but unlike those currencies, there isn't any doubt about whether this would work, or for how long.

BTW you could even have meta features based on it: I could basically entrust a certain amount of mastercoins to "any CFD that meets certain criterias". This way, even if the duration of the contract runs out, and my counterparty can withdraw their funds ... my CFD will automatically pop up to find the next counterparty, and I won't have to manually find another one.

These are some excellent ideas. Mastercoin could very well trigger a financial singularity and that is why I'm invested.

What is a list of features we could build on top of CFDs?

The feature you mention about any CFD which meets certain criteria, reminds me of something Mike Hearn was talking about with contracts. I endorse that idea, care to explore it further?

Dacoinminster you might want to take a look at this.
Sahai-Waters CPE ABE
http://www.youtube.com/watch?v=mD4L7xDNCmA#t=1311
http://eprint.iacr.org/2008/290.pdf


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 04, 2013, 11:25:37 PM
All in due time. Too many features, too little time :)

Vitalik and me just put the idea out there, the next step would be to formalize it.

FYI, my top priority task right now is putting Willett's whitepaper in a format that's easy to fork on github.
Once that's done we can start specifying such features more precisely on top of the whitepaper itself.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: Vitalik Buterin on November 05, 2013, 05:43:52 AM
Here's some formalization:

1. CREATE_CFD_OFFER(privkey, price_ticker, deadline, baseline, upside, downside, ratio)

 Creates an offer to make a contract for difference, in which address(privkey) would receive UPSIDE - (PRICE - BASELINE) * RATIO at DEADLINE, where PRICE is the value of PRICE_TICKER at DEADLINE. Sends a payment of UPSIDE to a protocol-managed escrow, awaiting someone to accept the offer.

2. CANCEL_CFD_OFFER(offer_txid)

Self explanatory

3. MATCH_CFD_OFFER(privkey, offer_txid)

Accepts a given offer, and sends a payment of DOWNSIDE to a protocol-managed escrow.

Example:

Joe has 50 MSC (where 1 MSC is currently 40 USD), and wants to create an escrow with Speculator Sam to balance out his exposure against the USD. Joe makes the transaction:

CREATE_CFD_OFFER(Joe's privkey, eToro-USD, Nov 31 23:59, 40, 10, 10, 1.25)

This moves 10 MSC from Joe to the escrow. Speculator Sam matches the escrow.

Case 1: MSC drops to 38 USD by Nov 31.

Joe receives 10 - (38 - 40) * 1.25 = 12.5 MSC from the escrow fund, and Sam receives 7.5 MSC. Joe lost 100 USD from the MSC price going down, but gains 2.5 * 38 = 95 USD, essentially cancelling out the downside.

Note that he does have a tiny quadratic loss, but I think it's okay to leave that in there since it's relatively small; if it does become a problem we can always change the formula to UPSIDE - (PRICE - BASELINE) * RATIO / PRICE * BASELINE to account for this.

Case 2: MSC goes up to 43 USD by Nov 31.

Joe receives 10 - (43 - 40) * 1.25 = 6.25 MSC, and Sam gets the other 13.75 MSC.

Case 3: MSC drops to 32 USD on Nov 20.

The escrow fund triggers a liquidation, giving Sam 10 - (32 - 40) * 1.25 = 0 MSC, and Joe the full 20 MSC. Joe now needs a new CFD, just in case MSC keeps dropping.

Case 4: MSC goes up to 48 USD on Nov 12.

I'm sure you can figure it out for yourself :)

The idea is that on top of this the GUI designers would build a good interface, perhaps segregating CFDs by leverage and duration and even limiting to specific ones to promote standardization. It would essentially work like Bitfinex or any other leveraged trading exchange. Meni also made an argument that this mechanism would require people willing to speculate on MSC at 2x leverage; if this becomes problematic, the market will self-correct and put CFDs at a premium in the 2x leverage speculator's favor, at least until some people arbitrage away the difference by taking half their money into fiat and half into 2x leveraged CFDs.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 05, 2013, 02:10:03 PM
I advise everyone to take a look at this comparison I just drew up between BitShares and Mastercoin CFDs (https://bitcointalk.org/index.php?topic=325425.0).
The two features sound terribly similar.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: StarenseN on November 05, 2013, 02:12:43 PM
following...


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: marcelus on November 08, 2013, 03:00:27 AM
subbed


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: cunicula on November 08, 2013, 08:19:09 PM
Since this is for a short-term contract I agree that the proposed CFD scheme is feasible. With CFD, you are forced to settle the position at an expiration period.

This is very different from a pegged MastercoinUSD. With USD I can keep them in my wallet as long as I feel like.
I would also argue that this makes CFD much less useful to the average person.

But it's still a great idea. Nice to see this making progress instead of languishing because of misguided commitment to a flawed implementation.  


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: cunicula on November 08, 2013, 08:26:14 PM
I advise everyone to take a look at this comparison I just drew up between BitShares and Mastercoin CFDs (https://bitcointalk.org/index.php?topic=325425.0).
The two features sound terribly similar.
Here in lie three key differences distinguishing master CFDs from BitPonzi:

1) With CFDs, you are forced to settle the position at an expiration period. This prevents unsustainable accumulation of debt which is central to BitPonzi.
2) With CFDs, there is no magical shower of interest payment. This removes the incentive for unsustainable accumulation of debt which is central to BitPonzi.
3) With CFDs, (I believe) there is an external data stream reporting prices. This means that prices aren't selected by magic. (again failure to employ magical thinking in your algorithm is a distinguishing feature from BitPonzi.) [You do face a challenge in dealing with potential data feed manipulation, however. ]


Again, I'm glad to see this new development. Capacity for change is essential to long-term success. This is why I have never let loose the rabid rabbit on Mastercoin and hope I never feel the need to.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: markm on November 09, 2013, 12:13:10 AM
I think that back when we discussed longcoins and shortcoins ideas it turned out that it is possible to not need a data feed.

Basically at any moment when either party saw a price somewhere that made them prefer that price, they could escape the longcoin/shortcoin position to cash in wherever it was that they thought would for them be a better deal.

It thus needed no oracles aka data feeds, since it is no one else's business but your own why it is that you exercised, or even whether you were in fact going to actually be able to get the better deal that had lured you into exercising.

Why should anyone but you need to know how much you are going to go sell something for elsewhere? If in fact you do know of some obscure marketplace where you can get a better price than others who only know of some well known markets not the lucrative markets you know of isn't it in your best interest not to reveal what price the asset is worth on some market somewhere but simply to close your position and go make your sale without telling everyone "oh by the way, right now gold is going for $XXXX.XX over at such and such a place" ?

I do not recall offhand the details of the setup that allowed people this freedom from third party claims about what things are worth, but isn't it in general better in a supposedly free market to be able to decide for yourself whether exercising or not is profitable for you, taking into account what prices you with your possibly extraordinary contacts and knowledge of markets can get, than to let some third party dictate how much your stuff is worth based on some oracle or market or feed that they themselves happen to prefer to use for making their own decisions as to what the current value of things is to them?

In the context of whether something is worth a meatspace dollar or not for example, if you yourself happen to find a buyer who is willing to pay a meatspace dollar for something shouldn't that be sufficient, shouldn't you be able to just sell the thing to that buyer for a dollar without having to reveal to the people you are doing long and short stuff with that you do know of an opportunity to get a dollar and maybe even reveal to them who what where you (or maybe anyone in general who knew of the opportunity) could go get a dollar at this particular moment?

Basically such a system even allows both the long position person and the short position person to totally dis-agree about the current value of a thing, while allowing both of them the freedom to go cash in at the value they believe they can get for it, whether or not the other party could get that same amount for it or not.

This could even go to totally personal opportunities, "oh my uncle will give me a hundred bucks for this first dollar I ever earned by trading, so I don't care that you believe it is only worth a dollar I am going to sell it for a hundred dollars too bad for you your uncle isn't so generous" type situations. When you want out of the position you get out, no one need know how much you got or hoped to get for the stuff you backed out of / withdrew from  the long/short situation. No need for an oracle or feed telling everyone "by the way so and so's uncle will buy one for a hundred right now" etc.

The end result though was like a contract for difference except both parties got what they could get for a thing without any need to know what the other party or a third party arbiter/oracle/feed claimed a thing was worth.

(You sell your stuff where you think best for you, other chap sells his where he thinks best for him.)

It thus seemed like a pretty good setup, but I think the reason it never got pursued was that it had no leverage into it, and back when we were discussign it everyone was all about leverage, they wanted basically what the teenager's site that had died with everyone's funds was providing, an ability to bet small to win huge on changes in prices e.g. of bitcoins compared to dollars or dollars compared to bitcoins etc.

The longcoin/shortcoin approach I think basically needed collateral, so in those days with that audience all of whom wanted something for nothing without collateral it was anathema.

-MarkM-


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: prophetx on November 11, 2013, 11:34:42 PM
I agree with the third party dependency issue.  It exposes the system to manipulation like with LIBOR. 

Also I do not believe what is described in the OP meets the formal definition of a CFD - at least not the one used in the finance industry.   I only interned at an ibank and decided it wasn't for me so I am certainly no expert.

But I think what the OP (kind of) and Markm is describing here is this:

http://en.wikipedia.org/wiki/Covered_warrant

These things get really complex and there are people out there who have spent decades building trading systems and various financial derivatives. 

It would be good to involve people with this experience and get their input before a spec is written since they ultimately would be the users of this.

Perhaps they will want to invest in the development...


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 12, 2013, 04:41:22 AM
FYI I asked Peter Surda to look at the project ages ago (which means 3 days ago in "real time").
He hasn't replied yet, I'll ping him in a few days.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: adpinbr on November 12, 2013, 03:18:31 PM
wouldnt such a proposition require more a larger amount of mastercoin to stabilize your position than said position is worth?


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 13, 2013, 07:06:03 AM
wouldnt such a proposition require more a larger amount of mastercoin to stabilize your position than said position is worth?

The size of assets the Mastercoin economy can support is of course tied to the value of MSC.
If MSC drops then the contract would be liquidated.
Nobody would be "cheated", they would just get a shorter term contract than what they would have hoped for.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: adpinbr on November 13, 2013, 08:21:08 AM
wouldnt such a proposition require more a larger amount of mastercoin to stabilize your position than said position is worth?

The size of assets the Mastercoin economy can support is of course tied to the value of MSC.
If MSC drops then the contract would be liquidated.
Nobody would be "cheated", they would just get a shorter term contract than what they would have hoped for.

Even if mastercoins were worth 1 trillion dollars (I see your smile Ron), people would not tie up wealth in order to secure wealth, If speculators choose to use this instrument than fine, I am sure its a nice feature, but I do not see how it makes economic sense to use such a proposition in order to reduce volatility in MSC. If you want to reduce volatility in another currency just hold it, and if you want to reduce volatility in a derived currency we already have the escrow proposition?


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 13, 2013, 08:22:19 AM
wouldnt such a proposition require more a larger amount of mastercoin to stabilize your position than said position is worth?

The size of assets the Mastercoin economy can support is of course tied to the value of MSC.
If MSC drops then the contract would be liquidated.
Nobody would be "cheated", they would just get a shorter term contract than what they would have hoped for.

Even if mastercoins were worth 1 trillion dollars (I see your smile Ron), people would not tie up wealth in order to secure wealth, If speculators choose to use this instrument than fine, I am sure its a nice feature, but I do not see how it makes economic sense to use such a proposition in order to reduce volatility in MSC. If you want to reduce volatility in another currency just hold it, and if you want to reduce volatility in a derived currency we already have the escrow proposition?

I'll ping Peter Surda again, maybe he explain my thoughts better (or prove me wrong).


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 13, 2013, 08:25:45 AM
I want to add a $500 bounty for someone qualified in Economics to research and document this properly.

Added a ticket, verifying the amount with the board.

https://trello.com/c/EAWWSd1n/40-economic-research-why-does-msc-have-value

Quote
How much would be a suitable bounty for this feature? $500?

We need someone with a solid economics background (Peter Surda caliber) to research and explain why MSC has value.

A good feature to investigate is the CFD feature. CFDs and backed currencies "need" MSC to have value, and thus I believe their adoption will _cause_ MSC to have value.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: Vitalik Buterin on November 14, 2013, 04:03:44 PM
I think that back when we discussed longcoins and shortcoins ideas it turned out that it is possible to not need a data feed.

Basically at any moment when either party saw a price somewhere that made them prefer that price, they could escape the longcoin/shortcoin position to cash in wherever it was that they thought would for them be a better deal.

It thus needed no oracles aka data feeds, since it is no one else's business but your own why it is that you exercised, or even whether you were in fact going to actually be able to get the better deal that had lured you into exercising


You absolutely do need a price feed, centralized or decentralized somehow (eg. proof of stake voting), in order to do any of this. The problem is that the network has no way of "knowing" about the real world; there is no term in cryptographic functions to represent physical US dollars. Thus, we have the following problem. Suppose that you had some kind of instrument that reflected the price of USD without relying on any kind of price feed. Now, suppose that due to a market fluctuation the price of this instrument drops to 0.99 USD. Presumably, people would buy up this instrument seeing it as undervalued, and thus raise the price back up to 1 USD - that's the self-fulfilling prophecy for which the designers hope. However, the problem with self-fulfilling prophecies is that they go both ways. What if the price of this instrument drops to 0.96 USD, and some investors get a different idea: that the price drop is a sign that the link between the instrument and the USD is broken, and it will only drop further? Then, they sell, and the price of the instrument might drop to 0.93 USD, then 0.9 USD, then more and more people will realize this fact, and the price of the instrument will drop further. Unlike Bitcoin, however, it will likely never recover. Bitcoin can restabilize at a lower price target, and many times did. The USD instrument cannot stabilize at anything but 1 USD, so if it's not at 1 USD it goes to zero.

So these "magic"-based price targeting mechanisms will undoubtedly be stable for a while, but the first black swan event will wipe half of them out in an instant. This is why you need external, hard data on prices.

Quote
LIBOR-style manipulation

If people think this is a concern I could write a spec for proof of stake voting on price feeds to require larger collusions to significantly manipulate prices.

Quote
Also I do not believe what is described in the OP meets the formal definition of a CFD - at least not the one used in the finance industry.   I only interned at an ibank and decided it wasn't for me so I am certainly no expert.

How is it not a CFD? It seems to follow the examples here (http://en.wikipedia.org/wiki/Contract_for_difference#Example_1_-_an_Equity_based_CFD_trade) pretty closely. In any case, it may be different in some technicality, but precise definitions aren't important; what is important is what it lets you easily have an arbitrary position in a market with an arbitrary margin if you can find a counterparty.

Quote
BTW you could even have meta features based on it: I could basically entrust a certain amount of mastercoins to "any CFD that meets certain criterias". This way, even if the duration of the contract runs out, and my counterparty can withdraw their funds ... my CFD will automatically pop up to find the next counterparty, and I won't have to manually find another one.

This is interesting; we could definitely do it.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: cunicula on November 14, 2013, 04:14:56 PM
You absolutely do need a price feed, centralized or decentralized somehow (eg. proof of stake voting), in order to do any of this.

If people think this is a concern I could write a spec for proof of stake voting on price feeds to require larger collusions to significantly manipulate prices.


Agree about the above. Vitalik, you might want to look at this thread from September. You seem to be thinking a long similar lines.

https://bitcointalk.org/index.php?topic=297147.0 (https://bitcointalk.org/index.php?topic=297147.0)

I discuss a proof-of-stake based price feed that is extremely resistant to gaming/collusion.
The goal in this case is cryptoUSD rather than contracts for difference.

I use floating interest rates (possibly negative) to make sure a) there is always demand for cryptoUSD holdings AND b) there is a limitation on cryptoUSD issuance so the system can't get overleveraged. Essentially the value of cryptoUSD issued is approximately a fixed single digit  percentage of the backing coins market cap. Rather than using escrows, the entire outstanding coin stock is used as backing. This is much more stable.

Been to busy to work on it for the last couple months, but I'm still hoping to get back to it with a more comprehensible exposition and some refinements. 



Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: cunicula on November 14, 2013, 04:17:50 PM
To develop some basic literacy on exchange rate issues and managed currencies, I suggest that everyone in the thread go through this series of web lectures on "Foreign Exchange Markets and the Balance of Payments." When he says Euro, you say MastercoinEuro and when he says swiss franc, you should say mastercoin.

http://www.youtube.com/playlist?list=PL9178E8F59734DA26

I know it sounds pedantic to recommend this, but seriously you 100% need to know this stuff.

Also, just because you have understand things from an investing point of view doesn't mean you understand it completely. Here, we are really thinking about things from the point of view of government (designing an algorithmic policy that stabilizes the currency).


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: vokain on November 14, 2013, 04:19:15 PM
To develop some basic literacy on exchange rate issues and managed currencies, I suggest that everyone go through this series of web lectures on "Foreign Exchange Markets and the Balance of Payments." When he says Euro, you say MastercoinEuro and when he says swiss franc, you should say mastercoin.

http://www.youtube.com/playlist?list=PL9178E8F59734DA26

I know it sounds a little pedantic to recommend this, but seriously you 100% need to know this stuff.

I, for one, appreciate it :) Ever learning


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on November 15, 2013, 09:06:40 AM
I would love to do it, thanks for the recommendation.
Don't see myself manufacturing the time to do this in the near future however.


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on December 12, 2013, 04:58:56 PM
Following an interesting discussion last night, I flushed out some of our joint thoughts about this into a wiki article about CFDs (http://wiki.mastercoin.org/index.php/Contracts_for_Difference). Everyone, please feel free to contribute and correct any foolish assumptions or mistakes I made there :)


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: bonbon on January 17, 2014, 09:56:05 PM
Eli5 or you lost me completely


Title: Re: Mastercoin suggestion: Contracts for Difference
Post by: ripper234 on January 20, 2014, 11:46:53 AM
ELI5:

You an me enter into a contract.
We both deposit 100 MSC.
Let's say 1 MSC = 15 USD.

The contract states that either of us can liquidate the contract at any time (other liquidation conditions are also available, this is just an example).
When liquidation happens, I get $1500 worth of MSC, and you get the rest.

Example 1:
1 MSC is worth 10 USD when liquidation occurs.
I get 150 MSC.
You get 50 MSC.

Example 2:
1 MSC is worth 30 USD when liquidation occus.
I get 75 MSC.
You get 125 MSC.

Example 3:
1 MSC is worth 150 USD
I get 10 MSC
You get 190 MSC

Example 4:
The price of MSC gets to 8 USD. The contract is automatically liquidated by the protocol, to ensure it has enough funds.

I get 187.5 MSC
You get 12.5 MSC

Example 5:
The price of MSC quickly drops to 7 USD without a prior price point at 8 USD.

I get 200 MSC = 1400 USD (100 USD less than I should)
You get 0.

The contract can include margins to protect against this - you can set it to auto-liquidate at 9-10 USD or require a larger security from the other party.