Note on "branching schemes" and the Resilience protocol

in res-currency •  8 years ago  (edited)

The dividend pathways build on top of one another, so as long as tax is being contributed, new pathways grow, driven by the promise of getting something back. I compared it with a pyramid scheme a while back, as a sort of "positive pyramid scheme" (Waters, 2016) where pyramid schemes are "decentralized wealth transfer systems".

I call the dividend pathway webs "branching schemes" from that, and they're conceived to be an ever-ongoing, fractal system that is based on whatever it is that makes people invest in pyramid schemes (since whatever that is it seems to work pretty well. )

Using smart contracts to build a swarm redistribution network

Dividend pathways can be implemented in a smart contract on Ethereum with the ERC20 standard using just a few lines of code.

function transfer(address _to, uint256 _value) {

            /* Calculate tax */
            uint256 taxCollected = _value * taxRate / 1000;
            
            /* Verify Proof-of-Individuality */
            bool isHuman = proofOfIndividuality.verifyPOI(msg.sender);

            /* Create the dividend pathway */
            dividendPathways[_to].push(dividendPathway({
                from: msg.sender,
                amount: _value,
                timeStamp: now,
                isHuman: isHuman
            }));

            /* Distribute the tax as credit to the swarm tree */
            swarmRedistribution(_to, now, taxCollected);

            /* Add and subtract new balances */

            balanceOf[msg.sender] -= _value;
            balanceOf[_to] += _value - taxCollected;

            /* Notifiy anyone listening that this transfer took place */
            Transfer(msg.sender, _to, _value);
}

The timeStamp makes the pathways branch out in chronological branching schemes.

When pushing the tax into the pathways as how blood flows through veins or capillaries, filter by timestamps at each intersection.

function iterateThroughSwarm(address _node, uint _timeStamp, uint _taxCollected) internal {
            for (uint i = 0; i < dividendPathways[_node].length; i++) {

                    uint timeStamp = dividendPathways[_node][i].timeStamp;
                    if (timeStamp <= _timeStamp) {

                            address node = dividendPathways[_node][i].from;

                            if (
                                    dividendPathways[_node][i].isHuman == true &&
                                    inHumans[node] == false
                            ) {
                                    humans.push(node);
                                    inHumans[node] = true;
                            }

                            if (dividendPathways[_node][i].amount - _taxCollected > 0) {
                                    dividendPathways[_node][i].amount -= _taxCollected;
                            } else removeDividendPathway(_node, i);

                            iterateThroughSwarm(node, timeStamp, _taxCollected);
                    }
            }
}
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I know the research there may not be applicable to Ethereum but I figured I'd share it because it's techniques may be relevant to a future version of your the Resilience concept. The protocol itself eventually can be evolved algorithm by algorithm, just as automatic algorithm invention shows the concept. My current research topics include "program synthesis", "synthetic diversity" and "automatic algorithm invention" all which can provide benefits. The benefit of program synthesis is you can have what for lack of a better description I will call an automated programmer. The users, group, or individual would specify their requirements by describing what they want the computer to do and the computer automagically codes it up. This might not produce very efficient code but for something like protocol synthesis or synthetic diversity perhaps it would work? Synthetic diversity is useful for security purposes where if you have hackers trying to break your protocol by having slight mutations you would be able to know they might be able to break or attack one but another mutation might actually be immune if they try the exact same attack over and over (which usually is the case). Automatic algorithm invention you are aware of already, it allows the computer or machine intelligence to evolve an algorithm solution to fitness. It's a way for example to deal with situations where no precise calculation can give you a perfect fit and where the trial and error approach becomes necessary in which case the most fit is an approximation due to there being no known optimal solution. Vision is a lot like that for instance and has to be evolved but so is for instance camouflage or designs for aerodynamics or ergonomics. As far as I know, no one is seriously researching these topics in crypto space because when I Google for instance "program synthesis Ethereum" I find nothing, or "synthetic diversity blockchain" I find nothing. Okay not nothing, but only one article.

References

  1. http://hplusmagazine.com/2015/01/06/automatic-algorithm-invention-cartesian-genetic-program/
  2. https://en.wikipedia.org/wiki/Program_synthesis
  3. http://www.darpa.mil/program/clean-slate-design-of-resilient-adaptive-secure-hosts

Food for thought, distributed protocols can be evolved using the same genetic programming methods as is behind dividend pathway idea. In the sense that mutations in a protocol result in synthetic diversity and the fittest protocol survives.

Example from this quote:

"Genetic Programming
An interesting alternative to distributed protocol synthesis relies on genetic programming [28, 29]: given an initial protocol template specified in a protocol description language and correctness requirements, if the model checker finds that the protocol does not satisfy the requirements, the tool tries multiple mutations of the abstract syntax tree of the protocol description, ranks the resulting versions by estimating how close they are to satisfying the requirements using state-space analysis, and iterates by probabilistically selecting a variant with weights proportional to ranks. The success of such a technique crucially depends on finding the suitable ranking function. This technique has been used to generate multiple variants of shared memory mutual exclusion algorithms and the leader election protocol [28, 29]. We believe that this approach is complementary to the one we have described and combining the two is a promising direction for future research."

Look up distributed protocol synthesis. Genetic programming you probably are aware of already.
Reference
https://www.cis.upenn.edu/~alur/Sigact17.pdf