Crowd fund Swarm Redistribution by using Swarm Redistribution with Resilience Foundation as the only human

in #res-currency8 years ago (edited)

Update: New contract deployed,
https://medium.com/@resilience_me/swarm-redistribution-live-experiment-round-2-52b461de9a48#.12qow4cwa

Update: This campaign is closed, and I’ve developed a new Swarm Redistribution contract, which has lower gas costs,
https://gist.github.com/resilience-me/1500caf64411db16e375630dfc17b1ea

I built a crowd-funding campaign for project Resilience. It’s swarm redistribution except I am the only human in the system. It’s a chance to try out the dividend pathway idea, and to experience how a smart-contract on Ethereum can be used for “programmable money” and for building a Swarm Redistribution system.

https://etherscan.io/address/0x95c2906debbb9203ff7007f26c2f00a936c77b5d#code.

buyViaJohan() lets you exchange ETH for RES, and also creates a dividend pathway from Johan to you. You can then transfer that RES for your payment, and the receiver can exchange it for ETH without exchange tax, or continue to use the RES within the Resilience system, growing dividend pathways each time it is exchanged which, if Johans account is connected to the dividend pathway web, pays tax to his “Resilience Foundation” and funds the project.

To view the total “basic income” which Johan has received, look up totalBasicIncome[JohanNygren]

Transfer(), buy(), sell(), and buyViaJohan() show up as events, which you can see if you use Ethereum Wallet.

Ethereum wallet mis-calculates the gas costs, so add a bit of extra gas per transfer.

Ethereum has a gas limit, and so, there is a limit to the size of dividend pathway swarms which the swarmRedistribution() function can handle. This poses no risk to those who hold RES, as the sell() function can always be used to withdraw RES if an accounts swarm reaches a max-size.

The smart-contract is not entirely bug tested, but as long as sell() works, then it should be risk free, except for the gas cost for sell() which is roughly 0.005 ETH. Below are a few public tests, done on the Ropsten test net.

Tested on the Ropsten test net

buyViaJohan() https://testnet.etherscan.io/tx/0xad7370974b14f07fa155e249a0623e390db353a699337a892a62d53550d01399

transfer() https://testnet.etherscan.io/tx/0xe39aa065d373efadca7efd7664eebd89a9759ca7468d58af60ee303f7b6f6567

sell() https://testnet.etherscan.io/tx/0x9b2c3b0840996b867f2c3743a3639965d24ce26921c911fe61e08714d8747925

Update

Had a typo in the closeCampaign() function. Have updated that, published a new SwarmRedistribution contract, and updated the link at the top of this post.

The old contract is available on https://etherscan.io/address/0x8e66ffe69b3f8d78f2a696e40c02f7454c0a01d9#code

Update

Another bug fixed. This one risked loss of ETH.

I have closed the previous contract with closeCampaign(), and deployed an updated one.

The old contract is available on https://etherscan.io/address/0xf77ac34cd0ed42f2b5d8cfcf4fa0f4bb1b80b9d8#code

Update

First buyer of RES, used buyViaJohan() to form a dividend pathway from me to them.

https://etherscan.io/tx/0x89ed412cc79278da1d673b71f01bc2c4ab4689b7bfb956902e5491aa12bc1e2a

Update

changeJohanNygrensAddress() breaks the contracts predictability since its possible to change address for the human account. I’ve updated the contract and removed that function. Here is the new one https://etherscan.io/address/0x95c2906debbb9203ff7007f26c2f00a936c77b5d#code.

The previous one is now closed, and only sell() can be called, the isOpen modifier will cause a throw on the other functions.

The RES holder which had 2 RES has withdrawn their RES,
https://etherscan.io/tx/0xb71f645c0d22d39901d52944aa8d42953a6e0318e0c1770e77a00302dbc3d185

Here is the old contract, https://etherscan.io/address/0x6846b938f9be9f1eeeb9bfd853636c805f8f54d3#code

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63466.72
ETH 2683.95
USDT 1.00
SBD 2.80