I'll be referring to Marketcoin throughout this as many issues are very similar.
Scaleability issues that must be addressed:
1) Every block must update the dividends per share of all bond types and this information must be tracked as far back as the oldest 'unspent' output. Dividend calculations are required for every input and must either query every prior block's divided table or there must be a lookup table based upon 'coinage'.
Current plan is for Marketcoin to have demurrage to help liquidity. This isn't too much of an issue because, like Bitcoin, it does not work against the purpose; to move value between currencies. It does, in fact incentivise this.
Demurrage can be calculated formulaically; if you made the dividends only come from the mining generation you could get around needing to lookup all transaction fees and calculate what is owed. On the other hand, keeping a list of transaction fees paid in every block wouldn't be that difficult; my understanding is the Bitcoin client keeps some of these types of details in memory already (one entry per block style lists). You could also use some clever 'something' that was able to be used to calculate aggregate fees over a period of time. Not sure accumulators would be of use here, such as are proposed with merged mining.
2) The number of potential trades / exchanges grows with O(N^2) of the number of currency units thus for 8 units, there are 56 possible short/long combos each of which requires 16 bytes / block 'forever'.
Marketcoin avoids this by only supporting currency markets where one currency is Marketcoin. Nice and linear. Anything possible here in that regard? Have BitShares themselves play this role?
3) Even storing just the 'unspent' outputs at under 50 bytes each would result in TB of data in short order assuming transaction volume similar to Bitcoin, but exchanges will probably have several orders of magnitude more trades than bitcoin experiences and therefore unspent outputs must be managed better than Bitcoin.
What's your calculation for this?
that's 50 bytes each block per dividend transaction? Even with a few thousand dividends you'd be using 100kb per block; which is a lot, granted.
Since 17th July 2010 there have been 5,300,000 trades on mtgoxUSD/BTC.
There have been 19 million transactions on the Bitcoin Network, and 242000 blocks.
242,000 * 100kb = 24 GB.
Fair enough, I can see your point here, won't even both using the other stuff.
Does the finite blockchain size idea help here? I mean you'd still need a bunch of those outputs but if they can somehow be rolled up as time passes it might make them easier to deal with.
What about dividends once a day, ever 144th block, or something?
Conclusion:
Transaction fees must be based more upon the net gain in unspent outputs rather than the total size of the transaction. We can 'forget' all of the inputs after enough proof of work, but the outputs we will pay for forever.
We want to motivate people to combine dust and this can be done in two ways, reduced trx fees *and* not paying dividends below a certain threshold.
We must recover old transactions and force people to keep all outputs 'current' to limit the amount of 'dividend history' that must be maintained. At the very least, any dividends that go unclaimed for more than 1 or 2 years could be 'forfeited' and thus all outputs must be spent every 2 years or they lose their dividends. Though a more 'pro-active' approach of 'taxing' 2+ year old outputs and paying them out as dividends would serve to keep all outputs current and recover value lost to lost private keys. This 'tax' can be thought of as an 'inactivity fee' that banks charge accounts and as a means of reimbursing the network for holding on to your unspent output for a very long time which has significant costs when you factor in the total number of nodes that must replicate and index that output.
That's really messy; I would think using them like TX fees would be nicer; allow someone to spend more than the outputs they list and dividends are calculated at verify-time. All you need is the last time the address was used and the numbers of the blocks between and a lookup table to the fees; then you can calculate the dividend easily I would think.
The chain must support 'cross-chain' trading to allow parallel BitShare chains to develop that enable trading in a wider range of currencies, stocks, and commodities as well as higher volumes than could ever be supported by a single chain. Thus when the transaction fees get too high on one chain, the market can create a new parallel chain that complements the existing chain. Because every chain enables trading any asset type it is easy to synchronize value between the chains with only a subset of nodes performing arbitrage roles.
You could always just let Marketcoin do that for you... it will anyway if BitShares takes off.
While BitShares is the only proposal that I know of to have a dividend component, the unspent output scalability issue as well as the O(N^2) trading pairs and higher transaction volumes will mean that any block-chain based approach will need to have an efficient mechanism to 'go-parallel'.
Addressing these scalability issues is a critical component.
Perhaps leverage Marketcoin or a fork of it to 'build in' interoperability between chains; chains which can fork to parallelise (as you'll only need the chains you're interested in) but do things like separating groups of markets later down the line, some on this chain, some on that chain. This can help control the overall size. You might also be able to link in finite blockchains to end up with little parallel blockchain worms crawling through time. But they can talk to each other. Almost like running SPV in the other chains and full in your chain. That would be enough. Merged mining them would be interesting, but with the accumulator thing you're aware of it might be feasible.