Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - theoretical

Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 ... 34
91
Who is being quoted here?

Quote
Alice has BitBTC and wants to exchange it for BTC. Bob has BTC (as well as a little bit of BitBTC already) and wants to exchange it for (more) BitBTC. There is a special BitBTC/RealBTC exchange on the BitShares system. Since the BitShares blockchain cannot actually hold real BTC, the bid orders for BitBTC on this BitBTC/RealBTC exchange are actually requests to buy the BitBTC with real BTC and with some BitBTC provided as a surety bond to ensure payment of the real BTC in a timely manner.

Let's say Alice places an ask order for 2 BitBTC at a price of 0.99 BTC/BitBTC and the ask order also has her BTC address (1A...). Bob sees this ask order and matches it with his bid order for 1.5 BitBTC at a price of 0.99 BTC/BitBTC. His bid order includes 0.15 BitBTC to be used as part of the surety bond (let's pretend that the market requires that 10% of the BitBTC quantity of the bid must be posted as the surety bond). Bob's bid order also includes his BTC address (1B...) from which he is expected to send the BTC payment to Alice's Bitcoin address.

Once these two orders are matched, Bob's 0.15 BitBTC joins Alice's 1.5 BitBTC and gets locked as collateral in a special escrow contract. At this point, Alice will still have an ask order for 0.5 BitBTC at a price of 0.99 BTC/BitBTC in the order book. This escrow contract requires a delivery confirmation to occur within 24 hours for the entire collateral to be send to Bob. The delegates monitor the Bitcoin blockchain for a total transfer of at least 1.485 BTC (1.5 BitBTC * 0.99 BTC/BitBTC = 1.485 BTC) from 1B... to 1A... between the time the orders were matched until 24 hours after that. If that condition is met, the delegates will sign off on the delivery confirmation for that escrow contract. Once a super majority of the active delegates have signed off on the delivery confirmation of the escrow contract (prior to the 24 hour expiration time), the delivery will be confirmed and all the collateral (1.65 BTC) will be sent to Bob. If this does not happen prior to the 24 hour expiration time, then all the collateral will instead go to Alice.

Bob has to put some BitBTC up so that attackers who want to just cause damage to BitBTC sellers are discouraged. If Alice is forced to lock up some BitBTC for 24 hours without getting payment for the promised trade, she will at least be rewarded with 10% profit after the 24 hours. If Bob trusts the delegates to do their job, he should be confident that he will get back his surety bond and will also get the 1.5 BitBTC he was promised as long as he delivers the 1.485 BTC from his 1B... address to Alice's 1A... address within 24 hours (it is best to not leave it to the last hour to ensure the delegates have enough time to sign off on the delivery confirmation).

This algorithm sounds a lot like https://github.com/drltc/bitbond-proposal/blob/master/btc-trade.md which I brought up back in September.

92
isn't that implied by the name "BitUSD"? I thought it was...

My understanding is that the description is intended for things like gold, silver or gas, where it can be used to describe which of multiple available price metrics are considered normative.

93
General Discussion / Re: [ANN] Our New Website Is Live!
« on: February 19, 2015, 05:10:50 pm »
Pls remove the rate of bitcny/cny,bitusd/usd,etc. on the topside of front page. I think its very misleading, not to mention where you grasped this data in the first place.

I never wanted to it display BTS vs BitBTC or USD vs BitUSD.

I thought showing BTC : BitBTC and USD : BitUSD was a great idea.  Market pegged BitAssets are the main thing we have that other altcoins don't.  Showing that the peg works, front and center on our website, is a concise statement of our value proposition and our product's identity.  Of course we can maybe do a better job of explaining what the data means and where it's coming from, maybe in hover text or a link when you click on it.

Just showing the price of BTS : BTC -- you can go to coinmarketcap.com and see that kind of chart for hundreds of altcoins.  A BTS : BTC price graph doesn't say anything about what makes BitShares special.

94
TLDR, ticket in OP is still under discussion.

Some history.  A feature which has been on our road-map for some time is relative orders, where people can place a bid or ask at a given percentage of the feed, like "I want to buy at 95% of the feed and I want to sell at 105% of the feed," without having to run scripts and spam the blockchain with a ton transactions.

I was tasked with implementing relative orders (more specifically, rehauling bytemaster's implementation to use percentages of the feed instead of absolute difference from the feed, and thoroughly testing it in preparation for release).

During the testing, I found certain fundamental architectural limitations of our matching algorithm prevented us from properly matching relative orders.  The same limitations also prevent certain combinations of existing order types from matching correctly in certain circumstances, which subsequently occurred on the main network.  A community contributor (pmconrad) advised us of this, which I already suspected due to what I knew about the architecture, and confirmed in testing.

My solution was to embark on a significant refactoring of our market engine to make orders execute the way we always intended them to.  I had hoped to have it ready for initial testing this week, however I've been hugely distracted upgrading my own delegate for the 0.6.x hardfork.

bytemaster thinks I am being overly optimistic about the timetable for my refactoring, and thus is looking for a change that will fix the problems but be much less expensive (in terms of developer time).  This ticket is the solution he's hit upon.

What we need to do is sit down and discuss the options, which will happen just as soon as I finish dealing with my obstreperous delegate VPS.

95
General Discussion / Re: Looking for Stuff to Do
« on: February 12, 2015, 04:16:18 pm »
I notice that you guys for all your grand technical know how, suck at documentation.

The problem is that since our ability to get paid depends on BTS price which has been dropping like a rock, we feel under immense pressure to spend all our efforts on things that will improve the user experience, and cut anything else -- including documentation.

Would I be able to do this in the code and the wiki?

My personal preference for documentation is version controlled Markdown files.  I would suggest you document stuff in the much neglected https://github.com/BitShares/bitshares/tree/develop/docs and submit pull requests (please make pull requests against develop, not master).

I am working on a Python script which will enable easy writing of tests (one of the main problems I've been working on since I joined the project is that our current testing frameworks are deficient and our test coverage is spotty).  It should be ready for release sometime in the next week or so.  I'll be writing guides over the weekend about how to get involved in testing.

Unfortunately I know exactly what you mean about having difficulty as a newcomer, I had some of the same problems when I was a community member.

96
General Discussion / Re: Overall Plan and Schedule
« on: February 09, 2015, 12:10:46 am »
how about a calendar

The internal working calendar for core development is available at https://github.com/bitshares/bitshares/milestones

97
General Discussion / Re: Simple Binary Prediction Market Discussion
« on: February 07, 2015, 08:11:14 pm »
I thought some more and I'm thinking we'll have to worry a bit about additional interesting things that happen if, instead of having a bunch of agents doing one-shot deals with the market maker, we have a bunch of standing orders that will execute whenever the price (tries to) move past a given value.

Suppose there's a buy order for A at $0.40.  The market maker's current price for A is $0.41 and current price for B is $0.45.  Someone places a buy order for a large quantity of B at $0.50.  Buying B will push up the price of B and push down the price of A, but once the price of A hits $0.40, the order for A starts to execute, putting a downward pressure on B which will fight the upward pressure from the buy order.

In other words, the buy order for A creates a floor at $0.40 below which the value of A cannot fall until the order is totally filled.  Once the price hits this floor, it becomes harder for the guy buying B to raise the price (less price movement per quantity bought).

We can classify the assets as reactive, active or inactive based on the price of the top-of-book order relative to the market maker's price.  Inactive order isn't matched by the market maker (buying more cheaply than the market maker's offering).  Active order is matched by the market maker with nonzero quantity (i.e. buying strictly greater than the market maker's current price).  Reactive order is exactly matched by market maker's price, it "executes at zero quantity" which means in practice it doesn't execute.  But when an active order executes, every reactive order will execute and oppose the price forces exerted by the active order on themselves and the active order (but will push in the same direction as the active order on inactive prices!)

I'm trying to figure out how we end up implementing this without needing numerical integration.  It might be possible; I'll have to think about it some more.  OTOH maybe numerical integration is fine, especially if we smooth out the discontinuities a little (e.g. instead of having the boundaries be vertical cliffs, make them instead very steep slopes 0.1% wide with smooth curve-in and curve-out, which are less "confusing" to the integrator).

98
General Discussion / Re: Simple Binary Prediction Market Discussion
« on: February 07, 2015, 03:55:58 pm »
I don't know if understand your preorder idea. If the orders are placed but don't execute how will the market maker adjust the price?

The market maker won't adjust the price until it opens its doors.

If it doesn't adjust the price doesn't that mean all preorder buyers will be forced to buy at a price of 0.33 BitUSD/{A,B,C} for all three assets?

Yes, but only the first $1 (actually, the math effectively uses infinitesimal fractions, so it's more like 1 satoshi) will execute at that price.  If people only buy A and B at that price, then A and B will start to rise and C will start to fall.  Then eventually either A or B will be pushed to a price that exceeds what people are willing to pay (or buy orders for them will run out of money).  Likewise C may fall cheap enough that buy orders for C become active (there may be takers for C willing to pay $0.05 or $0.03 or $0.001).

But what if the market's prior expectation of the probabilities for the three outcomes is not uniform?

What I mean by the market maker being "dumb" is that his prior expectation for the probabilities is always uniform.  Then he updates those prices based on the total of what he's bought and sold and how much money he has left to help pay out winners (if someone buys a million tickets when the market maker only has $1000, the tickets might cost $0.9997 each and most of the payout will be the buyer getting his own money back, but the market maker does "help" by adding $1,000,000 - $999,700 = $300 to the pool).

That means people only buy the assets corresponding to outcomes with better than uniform probabilities at a nice discount price (granted at the cost that 5% of their orders will instead be forced into a speculative asset which gets its value from the outcome being contrary to the market's expectation of the outcome immediately prior to the outcome being known to the blockchain).

Yes, this is true -- but the discount quickly vanishes after only a small fraction of the orders are filled, because the market maker's funds dwindle.

That brings up another question. Won't the market always adjust to make the true outcome most favorable faster than a super majority of the judges can put the outcome into the blockchain?

Yes.  If everyone saw on TV that Ron Paul won, but it'll be a few days before the official result comes in and the judges input it into the blockchain, then everybody'll be buying C at $0.99 and trying to unload A or B at $0.001.  The $0.01 discount on C would be basically because some people with C might want the convenience of cashing out now instead of in a few days, and they want it so bad they're offering to give 1% of their payout to somebody else if that's what it takes to make it happen.  The A and B assets would probably be completely illiquid -- whoever ended up with them is stuck with the assets and their $0 payout, because the supply of fools willing to buy assets known to be worthless is usually quite limited, and all the people willing to sell to them at any price will quickly part them from their money.

In other words, while we're watching who various states went for on TV, people will be trying to buy the winner before he's all the way in the $0.90 range and sell the loser before he's totally worthless.  They'll be trading to contrarians, people trying to sell an overvalued lead horse and trying to pick up shares in the underdog on the cheap.  In the course of those madly gyrating market conditions, somebody will end up with all those A and B shares and be unable to unload them, their orders will go unfilled and they'll end up with worthless assets.  Traders who prefer a calmer style could simply pick their horse at more stable prices earlier in the week, then simply hold the shares until it's all over.

So isn't the market maker pretty much always going to lose?

Yes.  Which is why in the paper he suggests it be funded by someone who derives value from having the prediction, because they can expect a loss from funding the market maker.

I say the market maker should be funded by equity investors, and everyone who places a pre-order becomes an equity investor in the amount of 5% of their order.  Everyone who places a pre-order gets a piece of the action when the market maker has their dumb initial position with A, B, C all at $0.34.  The +EV of that piece cancels out the -EV of investing in someone who only makes money when a free market doesn't work.  It has to cancel because there's nowhere else for the money to go!

99
General Discussion / Re: Simple Binary Prediction Market Discussion
« on: February 07, 2015, 03:35:49 am »
Also, I know that now that we understand it, some of us (me at least) are feeling all fired up to implement this.  But I want to do some refactoring of the market engine this weekend, and we might want to hold off because what I'm doing will make writing the bookie easier (at least the market part).

100
General Discussion / Re: Simple Binary Prediction Market Discussion
« on: February 07, 2015, 03:31:21 am »
I spent some time looking into it.  Bookie stands to lose in some cases, but how much does he stand to gain?

If asset X wins, the bookie's leftover funds are the difference between his cash reserves and the float of asset X.  So the biggest win for the bookie is if the least popular option ends up winning.  In other words, the bookie's betting against the market; the bookie will make a profit when the market is wrong!

In the paper he talks about the bookie being altruistically funded by someone who derives value from knowing the prediction.  E.g. a newspaper wanting a poll result to sell papers, a business wanting a prediction to help place investments, etc.

I think a better way is to have the bookie funded by orders themselves.  I.e. have a preorder period, let the market open happen some time after the asset's been defined.  In the preorder period, orders can be placed but don't execute (in fact they can't execute because the bookie is initially the only seller of all the assets, so the market has to be closed until he's funded).  Then at some defined point in time, the market opens -- 5% is taken from every order and used to fund the bookie operations.  I think the 5% should not be a fee, the users should get an equity position in the bookie, which will make bank if the decision has a float much lower than the bookie's cash reserves.  So all funds used to buy A, B, and C, except for normal transaction fees (and maybe some functionality-specific fees), will be returned to holders of A, B and C.

101
General Discussion / Re: Simple Binary Prediction Market Discussion
« on: February 07, 2015, 03:06:43 am »
Spreadsheet is way clearer than the paper.  Basically the DAC runs a bookie who always goes by more or less the current odds, except early on when there's not much action, he prices everything equally.  So if the bookie initially has $100 and you can bet on A = Democratic President, B = Republican President, C = Somebody else, he'll sell you a ticket that pays $1 if A for $0.34, $1 if B for $0.34, and $1 if C for $0.34.

Of course we know things about elections that the bookie doesn't, namely that his price for C is way out of line with the odds.

But the bookie knows he's dumb, so he's set it up so you can only buy $1 at a time, and then you have to let him incorporate the information "somebody bought a ticket on A for $1" into his price setting algorithm before anyone can buy another ticket.  So if you get a ticket for A, then the price of A might rise to $0.36, while B and C drop -- if you want a second ticket on A, you'll have to pay more.  So eventually the big run of people buying A+B to make a Dutch book on the bookie will end up pushing the odds of C where it belongs (and an impoverished bookie).

If someone tries to buy a million tickets on A (or A+B or any combination) when there's not much other action, he'll end up paying $0.99 each (or more!) and end up merely getting his own money back.

With the math in the paper, the tickets are infinitesimally small, but that's the idea.

102
What I've wanted to do for a long time is implement UIA with custom feed authority.  Let anyone register a market-based UIA and let the issuer specify a feed authority, an account or set of accounts that can set the feed value.  Shorts and longs then bet against each other on the feed.  Then have a process for transitioning that to a delegate-based feed when the market is big enough.

Let good feed ideas enter the system without having to convince a majority of delegates.  Anyone with a feed and an idea should be able to put it out there, and people who like it can trade on it as long as they can find a counterparty.  As long as the DAC collects fees from the whole business and delegates aren't overburdened, we should enable people who want to trade BitLTC or BitDOGE or BitFloridaSwampland.  The current system is bottlenecked on the delegates having to all run a feed script for every market-based asset.

Yes, relying on un-accountable non-delegates to provide the feed requires centalization and trust -- perhaps too much centralization and trust -- but people will know up front that those are the rules for MBUIA and should invest accordingly.

But we have to balance between getting 1.0 out and dreaming up new features.  If we keep on adding new features, then the Big Release will be really awesome but it won't happen 'til 2025 and Ethereum, Ripple and everybody else will have eaten our lunch.

103
General Discussion / Re: Economics of subsidized mining pool
« on: February 05, 2015, 09:06:26 pm »
But the other well-established pools are not going to wait there and do nothing. They will do all it can to compete and pull the miners back.  And they are very competitive.

No, the key is we have a marketing budget and are willing to operate the pool at a loss to advertise BTS.  I'd surprised if there are lots of other pools (especially big ones) who can convince a partner to give them money to allow them to operate at a loss, since it doesn't make sense for them to do so.

And a bigger pool would have to spend more to match a small pool operating at a loss.  E.g. if our pool has $1000 / day volume and we're spending $50 / day to subsidize +5%, then a much larger pool earning $10,000 a day would have to pay $500 / day just to match us.  And then when half of our miners leave and we're only doing $500 / day volume, with the fixed-budget approach we're now suddenly offering 10%.

104
General Discussion / Economics of subsidized mining pool
« on: February 05, 2015, 04:30:55 pm »
For those who haven't been following, the following changes are planned:

- minebitshares.com will pay out in BitUSD
- minebitshares.com will eliminate its pool fee
- The payout will be subsidized ("juiced") +5% by our marketing budget

Essentially, we're allowing people to merge-mine the juice, but only if they use our pool and accept BitUSD payouts.

If our target pool volume is $1000 / day, that works out to $30,000 / month new capital, for which the budget would be funding "juice" at +5% which would be $1500 / month or $50 / day (comparable to a traditional marketing campaign).

I think it would be better to simply split $50 / day among all miners who show up.  If the pool volume is more less than $1000 / day, then they get better than +5% returns.  Since our pool volume is tiny at the moment, this would lead to fantastic returns for people who switch early which would be a great boost to our marketing (we might get several people saying "switch to this pool, I did and quadrupled my returns OMG").  More importantly, if we exceed our target, then we can save a lot of money.  If we hit $2000 / day, then our budget would still be capped at $50 a day and the miners simply get 2.5% instead.

Offering a fixed juice budget is basically a no-reserve single-price auction for the capital inflow, which allows the market to efficiently discover the "right" juice percentage.  Which in theory should be pretty close to zero, i.e. if we're the only pool willing to operate at a loss, we should be able to capture the entire market.

Offering a fixed juice percentage of +5% is still buying capital inflow, but like any scheme where you have a price that doesn't respond to market signals, it's likely the price will be too high (we'd be paying more than we need to, exceeding the target and busting the budget) or too low (we could be offering a higher return and attracting more people while remaining within the budget).

105
General Discussion / Re: Simple Binary Prediction Market Discussion
« on: February 05, 2015, 03:31:13 am »

Paper on LMSR at http://hanson.gmu.edu/mktscore.pdf

Wow, this is good stuff.

Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 ... 34