I think i've solved the optimization layer. Every time a transaction is registred, the system registers how much the node should give as dividend, and also how much each node in that node's swarm should recieve from that dividend. Each node then keeps track of how much dividends they've recieved. This database-structure makes it simple.
Here's a database-example,
Then, once that's implemented, and you receive a payment and give a dividend on it, the full dividend goes to the node who's accumulated the most dividends. And then someone else in the swarm pays a dividend, the system scans his swarm and finds the one with most accumulated dividends, and the full dividend goes to it.
This is played out over and over again. Each node sends just one dividends transactions, but every node still pays and receives as much as if every node sent to every node. It's a brilliant solution.
I've been working on this problem since November. It's the only problem I hadn't solved.
March 13, 2015
I've implemented a sketch of the opitmization layer on http://connect.basicincome.co so that you can get a feeling for it, learn the concept, assimilate my knowledge and my innovation. Here's the code-structure, https://github.com/resilience-me/basicincome_co-server/blob/master/subscribe.js.