-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CFDs: partial matches don't move proportionally less #191
Comments
We'll need extensive testing of any new algorithm we implement. It's not an option to make the price movement equal to the proportional change in the price feed's value, I don't think: that wouldn't be a CFD. It's also not an option to match two [whole] CFDs with different (effective) leverages. I'm not sure that partial matches for CFDs are very valuable. |
You can't have asymmetric leverages, or you could troll the book with very low leverage CFDs, I think. |
@JahPowerBit and @xnova, thoughts? |
Ouziel: 'We should probably force |
Not allowing partial matches is far from ideal and would have fairly dire consequences to liquidity. Hopefully there is a way around that. |
@MattCounterparty, I think that 0229f63 would make it possible. Not sure, though. (Ouziel can check.) |
Could one do this: bet(1): --wager=WAGER --counterwager=COUNTERWAGER --leverage=LEVERAGE and two bets are matched if: for bet2, --leverage(bet2) >= counterleverage(bet1), and and whatever wager in the bet match is the lesser of the two wagers determines the total possible gains on the bet match? This last part in particular seems unnecessary to me, however given the p2p, fully collateralized nature of CFDs in Counterparty (as opposed to margin-based CFDs with a market maker, as in traditional finance) it may be for the best? |
I haven't posted on here because there is nothing technical to respond to. |
@cityglut, that's an incomplete solution. |
If we consider that wager is always equals to counterwager, then after thought, we can make the matching even better, because all bets on the same feed_address and and same leverage can partial matches with others.. and the exposure will be the same for both side (bear_escrow=bull_escrow). |
@JahPowerBit I did not propose any such thing like initial_quantity. You are misunderstanding entirely. @PhantomPhreak please quit wasting time with patches that are basically more broken than the original, and answer my question regarding CFD's it seems to me that you have a mathematically inadequate notion of what a CFD is and this is preventing the discussion from making headway. |
@MattCounterparty, partial matches for CFDs are much less important than they are for Binary Bets, because, as Ouziel points out, @JahPowerBit, that sounds right! Very nice. (Then can we just force |
I'll leave it to you guys as you're the experts. My only concern when looking at this thread was that bets matching less frequently in a young p2p ecosystem will be bad for overall liquidity making it harder to get a feed site up to critical mass, which is going to prove to be fairly difficult under the best circumstances anyway. Thanks for all the work you guys do. |
@matt, liquidity is probably our number one concern after just getting the thing to work. ;) |
@PhantomPhreak , |
I've temporarily disabled CFDs on mainnet while this issue remains open. |
I read more closely you first fix: 0229f63 |
The first fix seems sensible (but I'm in no way an expert). I mostly want to chip in on this little comment by @JahPowerBit: Odds are necessary to allow a market maker to make a profit. @PhantomPhreak: Any ETA for CFDs on the mainnet? |
@Frozenlock I his statement would sound better if instead of "risk" he said "value at risk". If you place a 20-unit bet @ leverage of 1 (=5040 in CP speak) and I place a bet of 1 unit @ leverage of 20, I shouldn't be able to win your 20 units, but only 1 (because that's how much I put at risk). This also seems to be what @citiglut argued for above. |
Ah! My mistake then. |
Turns out I completely misunderstood how |
This is something that would best be handled by the new contracts system. |
The way that credits and debits are calculated now, a whole bet and 1/10th of that bet both have the same exposure to movements in the value of the broadcast it tracks. The latter, then, will liquidate well before the former, instead of at the same time, as it probably should.
The naive solution is to make the leverage proportional to the fraction of the bet that was matched. Then, however, the two bets don't experience the same leverage. (This problem may be worked around with something like this: 0229f63.)
It's possible that the only way around this is to forbid partial matches.
See #190, and branch
cfd2
.The text was updated successfully, but these errors were encountered: