├── .DS_Store
├── README.md
├── biblios
├── Joel_Dietz_biblio.md
├── Nick_Szabo_biblio.md
├── blockchain.md
├── coding_best_practice.md
├── cryptolaw_biblio.md
├── dao_history.md
├── daos.md
├── extended_states.md
├── network_states.md
├── nomic.md
└── swarm_systems.md
├── fractal_renaissance.md
├── history.md
├── history_of_metamask.md
├── legal-contracts
└── social_contract_license.md
├── metaverse-constitution
├── my_work.md
├── old
└── hackathon_notes.md
├── projects.md
├── smart-contracts
├── asset-tokens
│ ├── dividend.sol
│ ├── mintable.sol
│ └── standard.sol
├── daos
│ ├── circles.sol
│ ├── democracy-dao.sol
│ ├── randao.sol
│ ├── slock-it-democracy-dao.sol
│ ├── swarm-basic-income-dao.sol
│ └── swarm-democracy-dao.sol
└── reputation
│ ├── iubex.github.sol
│ └── trustdavis.se
├── whitepaper.md
└── whitepapers
├── Game_of_MetaLife 0.33.pdf
├── Network_State_Whitepaper 0.2.5.pdf
├── Network_State_Whitepaper.pdf
├── dbrain.md
├── main.bib
├── main.tex
├── metalife.tex
└── metamonastery
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fractastical/distributed-governance/094f689f071ccb0c0498db19608de2b1debd0d5b/.DS_Store
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Evolving governance via the blockchain
2 | ======================
3 |
4 | The goal of this project is to be the definitive resource for attempts to build 'distributed governance' systems that affect the future of sovereignty, including but not limited to blockchains. It was started via converstions with Vitalik in 2014 that lead to the first reputational system and governance related whitepapers, as well as the Decentralized Autonomous Society which met appoximately 36 times in 2015-2018 (https://www.youtube.com/watch?v=iubsqehXUoY).
5 |
6 | ## Bibliographies
7 |
8 | [Most important works on blockchain](biblios/blockchain.md)
9 |
10 | [Most important works on crypto law](biblios/cryptolaw_biblio.md)
11 |
12 | [Most important works on network states ](biblios/network_states.md)
13 |
14 | [Most important works on swarm intellgence](biblios/swarm_systems.md)
15 |
16 | [Most important works on nomic](biblios/nomic.md)
17 |
18 | [Most important works on holonics](https://weco.io/p/1691)
19 |
20 | [Most important works on extended states of consciousness ](biblios/extended_states.md)
21 |
22 |
23 |
24 |
25 | ## History
26 |
27 | Early history on smart contracts includes the definitions of Nick Szabo, then implementation called 'Bitcoin' which had a 'governance only where necessary model.' Ethereum iterated on various particulars, esp. by embedding a form of smart contracts into the virtual machine of their blockchain. They did not, however, make this binding for any on-going decision making. That said, they have used these techniques as a polling technique.
28 |
29 | Since then several blockchains have attempted to implement governance as part of their core evolution mechanisms, including DASH, Tezos, and others. There was also a paper by Ralph Merkle on DAO Democracy (https://via.hypothes.is/http://fractastical.github.io/dao_democracy.html#annotations:8XjXGDG-EeaUHI8WMrZ4IA).
30 |
31 | Additionally they have followed diverse strategies regarding integration into the existing legal system. Partially due to the troubled history of early digital currencies (DigiCash, E-gold), the first generation of blockchains was built to be censorship resistant. As second generation blockchains have obtained legal scrutiny and attempted to integrate into legal systems they have at times questioned some of the design decisions behind the first generation (as per [current debate between Nick Szabo and Vlad Zamfir](https://twitter.com/VladZamfir/status/1089041262626390016)).
32 |
33 | The most recent version of this bibliography was created to inform this debate so that common terminology and historical references can be used as the space evolves.
34 |
35 |
36 | ## Critical terminology
37 |
38 | "Wet Code" - code that is interpreted by the mind (i.e. traditional legal systems)
39 |
40 | "Smart Contract" - code that is interpreted by a computer and bound by a pre-defined rule set
41 |
42 | "DAC" - Decentralized Autonomous Corporation, a term invented by Daniel Larimer in 2013 to define corporations that live on blockchains
43 |
44 | "DAO" - Decentralized Autonomous Organization, a term invented by Vitalik Buterin to describe a more generic version of the DAC that can pursue whatever interests it decide (i.e. not a pure profit motive)
45 |
46 | "DCO" - Decentralized Collaborative Organization, a term invented at the Harvard-MIT-Stanford summits by a team of scholars in order to render a DAO integratable into existing cooperative style law
47 |
48 | "Network State" - a political configuration having the properties of a network.
49 |
50 |
51 |
52 | [A brief list of my own experiments](my_work.md)
53 |
--------------------------------------------------------------------------------
/biblios/Joel_Dietz_biblio.md:
--------------------------------------------------------------------------------
1 | Writings by Joel Dietz
2 | ======================
3 |
4 | **2014**
5 |
6 | Lightpaper on Distributed Governance: https://github.com/fractastical/distributed-governance/blob/master/whitepaper.md
7 | Implementations: (Boardroom)
8 |
9 | Lightpaper on Reputation ("Green Ether") https://github.com/fractastical/etherea/blob/master/green_ether.md
10 |
11 | Swarm Manifesto
12 |
13 | Harvard Summit report
14 |
15 | **2016**
16 |
17 | Second Wave of Blockchain
18 |
19 | **2017**
20 |
21 | Network State Whitepaper (https://github.com/fractastical/distributed-governance/blob/master/Network_State_Whitepaper.pdf)
22 |
23 | Implementations (Swarm Fund, Breathe, Numundo, Black Sheep)
24 |
--------------------------------------------------------------------------------
/biblios/Nick_Szabo_biblio.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fractastical/distributed-governance/094f689f071ccb0c0498db19608de2b1debd0d5b/biblios/Nick_Szabo_biblio.md
--------------------------------------------------------------------------------
/biblios/blockchain.md:
--------------------------------------------------------------------------------
1 | Most important writings on blockchain
2 | ===
3 |
4 | Nick Szabo, Bit Gold
5 | https://nakamotoinstitute.org/bit-gold/
6 |
7 | Satoshi Nakamoto, Whitepaper
8 | https://bitcoin.org/en/bitcoin-paper
9 |
10 | Vitalik Buterin, Hard Problems in Cryptocurrency (2014)
11 | https://github.com/ethereum/wiki/wiki/Problems/89fd07ffff8b042134e4ca67a0ce143d574016bd
12 |
13 | Vitalik Buterin, Hard Problems in Cryptocurrency (2019)
14 | https://vitalik.ca/general/2019/11/22/progress.html
15 |
16 |
--------------------------------------------------------------------------------
/biblios/coding_best_practice.md:
--------------------------------------------------------------------------------
1 |
2 | Code Complete
3 |
4 | Pragmatic Programmer
5 |
6 | Fowler, Refactoring
7 |
--------------------------------------------------------------------------------
/biblios/cryptolaw_biblio.md:
--------------------------------------------------------------------------------
1 | Writings on Crypto Law
2 | ======================
3 |
4 | Over the course of the last decade there have been several opinions on the reconciliation between "smart contract" systems and existing bodies of law.
5 |
6 | This is complex because:
7 |
8 | (1) Smart contracts do not always work as described or desired, and thus it is easy to deviate from intent
9 |
10 | (2) Many of the implementation areas of blockchain go into areas that explicitly violate existing laws (e.g. various types of work)
11 |
12 | (3) Many of the design decisions of standard blockchains solutions are global in scope and emphasize being resilient against "interference" by regional jurisdictions rather than integrate into them.
13 |
14 | (4) Some of the "autonomous" possibilities of applications run contrary to the standard human first ideas of ethics
15 |
16 | (5) Clear decisions by regulatory authorities about how to treat the technology often lag the initial implementation by 3-5 years in the best case
17 |
18 | We present the most important work of the blockchain community on the trade of and possible integration points between existing legal systems and cryptographically secure ledgers.
19 |
20 | **1994**
21 |
22 | Nick Szabo, Smart Contracts
23 | http://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart.contracts.html
24 |
25 | **1998**
26 |
27 | Nick Szabo, Secure Property Titles with Owner Authority
28 | https://nakamotoinstitute.org/secure-property-titles/
29 |
30 | **2006**
31 |
32 | Nick Szabo, Wet Code
33 | http://unenumerated.blogspot.com/2006/11/wet-code-and-dry.html
34 |
35 | **2009**
36 |
37 | https://www.amazon.com/DAEMON-Daemon-Daniel-Suarez/dp/0451228731
38 |
39 | **2013**
40 | Larimer, DACs Revisited
41 |
42 | https://letstalkbitcoin.com/dac-revisited
43 |
44 | **2014**
45 | Vitalik Buterin, "DAOs, DACs, DAs and More: An Incomplete Terminology Guide,"
46 |
47 | https://blog.ethereum.org/2014/05/06/daos-dacs-das-and-more-an-incomplete-terminology-guide/
48 |
49 |
50 | **2015**
51 |
52 | Distributed Collaborative Organizations
53 |
54 | https://www.shareable.net/blog/interviewed-joel-dietz-on-distributed-collaborative-organizations
55 |
56 | First Coincenter
57 |
58 | Houman Shadab, "Empowering Distributed Autonomous Companies"
59 |
60 | https://lawbitrage.typepad.com/blog/2015/02/empowering-distributed-autonomous-companies.html
61 |
62 | **2017**
63 |
64 | SEC DAO ruling, (https://www.sec.gov/litigation/investreport/34-81207.pdf)
65 |
66 | Gav Wood on Alegality
67 |
68 | https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwi5ktLc68jgAhWI_p8KHYMDDbYQwqsBMAB6BAgGEAQ&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZh9BxYTSrGU&usg=AOvVaw27zMmK36fwv9MlWXZLsjYF
69 |
70 | PdF + cardoso papers
71 |
72 | http://www.hup.harvard.edu/catalog.php?isbn=9780674976429
73 |
74 | **2018**
75 |
76 | Coin Center Framework
77 |
78 | https://coincenter.org/entry/framework-for-securities-regulation-of-cryptocurrencies
79 |
80 | **2019**
81 |
82 | Vlad Zamfir For a new crypto legal system
83 |
84 | https://medium.com/cryptolawreview/against-szabos-law-for-a-new-crypto-legal-system-d00d0f3d3827
85 |
--------------------------------------------------------------------------------
/biblios/dao_history.md:
--------------------------------------------------------------------------------
1 | ##DAO History
2 |
3 | Reference by Larimer
4 | Reference by Vitalik
5 | Bitcoin foundation implements Blockchain voiting
6 | "The DAO"
7 | Ukraine vote?
8 |
--------------------------------------------------------------------------------
/biblios/daos.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | The original article by Vitalik
6 |
7 | https://blog.ethereum.org/2014/05/06/daos-dacs-das-and-more-an-incomplete-terminology-guide
8 |
9 |
10 | 2022 most comprehensive plan for MetaDAOs
11 |
12 | https://forum.makerdao.com/t/endgame-plan-v3-complete-overview/17427
13 |
--------------------------------------------------------------------------------
/biblios/extended_states.md:
--------------------------------------------------------------------------------
1 | 1] The original Robert Anton Wilson and Terrance McKenna era stuff which tends to be a bit vague overall despite references to machine elves and various sub-experiences, including McKenna's own chronicles of what the mushrooms told him. Possibly culminating with Leary and RAW's 8 Circuit model (https://en.wikipedia.org/wiki/Eight-circuit_model_of_consciousness)
2 |
3 | 2] The works of Wasson and others. whose primary thrust was tying them back to Eleusis. These have relatively sparse detailed documentation.
4 |
5 | 3] Erowid a great repository of entheogenic information but relatively light on Taxonomies.
6 |
7 | 4] the work of Strassman et al which is "scientific" but light on details of inner experiences and was basically unfinished.
8 |
9 | 4] The entities, a group of 14,000 people on Facebook categorizing entities they have found in DMT trips (https://www.facebook.com/groups/174694074873217)
10 |
11 | 5] Also concerning a sort of entity and inner catalogue, incluing breaking them down to "good" and "evil" meta-categories https://wiki.dmt-nexus.me/Hyperspace_lexicon
12 |
13 | 6] Mindstate / Psychonaut Wiki version of the same things which avoids taking ontological claims: https://www.youtube.com/watch?v=4zFB5TvqodQ Includes the effect index. https://www.effectindex.com/
14 |
15 | 7] Alien Information Theory (https://www.goodreads.com/en/book/show/43999264-alien-information-theory) one of the more comprehensive take by a biochemist on how cellular automata may 'create the reality we perceive." Effectively a grand theory based on DMT.
16 |
17 | 8] The output of the Qualia Research Institute and associated groups which tends towards a mathematical type approach and various neologisms like "Neural Annealing" by which they basically surmise that healing happens though certain types of neural stimulation that is especially available during these types of experiences. I especially liked their paper about hyperbolic geometries as it aligns well with other things we have going on the research front.
18 |
19 | 9] Alexander Shulgin's original writings including, Pihkal and Tihkal, and the recordings of the lecture series ‘The nature of drugs' + review (https://slatestarcodex.com/2016/08/11/book-review-pihkal)
20 |
21 | 10] The Antipodes of the Mind: Charting the Phenomenology of the Ayahuasca Experience by Benny Shanon. Probably the most exhaustive and comprehenisve of all of them from both an anthrpological and phenomenological standpoint.
22 |
23 |
--------------------------------------------------------------------------------
/biblios/network_states.md:
--------------------------------------------------------------------------------
1 | ## Books compiled from speakers in New Cities and Network States conference (https://lu.ma/ae66qgco) :
2 |
3 |
4 |
5 | Balaji, Network State: [https://www.amazon.com/Network-State-How-Start-Country-ebook/](https://www.amazon.com/Network-State-How-Start-Country-ebook/dp/B09VPKZR3G/)
6 |
7 | - Book that sparked a resurgence in the movement
8 |
9 | Tom Bell, Your Next Government
10 |
11 | - examines the growth in special jurisdictions
12 |
13 | Mark Frazier and Joe McKinney, Founding Startup Societies: A Step by step guide
14 |
15 | - Detailed list of dos and don'ts, including great cautions
16 |
17 | Joe Quirk (with Patri Friedman), Seasteading
18 |
19 | - Original book that set the stage for the seasteading vision
20 |
21 | Alain Bertaud, Order without Design: How Markets shape cities
22 |
23 | - examines the elements of where and how market dynamics evolve cities including where city planners need to step in
24 |
25 | Jane Jacobs, Economy of Cities
26 |
27 | - examination of why some cities grow and others don't
28 |
29 | Herzl, Jewish State
30 |
31 | - the situation of cryptocurrency enthusiasts is commonly compared to the Jews insofar as they have their own "religion" and are increasingly societal outcasts
32 |
33 |
34 | J. Storrs Hall, “Where is My Flying Car”
35 |
36 | Michael Huemer, “Justice Before Law”
37 |
38 | Jessica Flanigan, “Pharmaceutical Freedom”
39 |
40 | D. Levine & M. Boldrin, “Against Intellectual Monopoly”
41 |
42 | Bryan Caplan, “Open Borders”
43 |
44 | Hernando de Soto, “The Mystery of Capital”
45 |
--------------------------------------------------------------------------------
/biblios/nomic.md:
--------------------------------------------------------------------------------
1 | (thanks to Peter Suber for providing many of these)
2 |
3 |
4 | Gerard A.W. Vreeswijk, Emergent political structures in abstract forms of rule-making and legislation, 1995.
5 | http://pub.maastrichtuniversity.nl/178d0ed6-5a76-41c2-b004-44bfb1068dd1
6 |
7 |
8 | Clay Shirky, Nomic World: By the players, for the players, 2004.
9 | http://www.shirky.com/writings/nomic.html
10 |
11 |
12 | Michael Mussman, Programming a Deliberative Direct-Democracy: A Method of Open-Source Self-Governance, 2007.
13 | http://efficasync.blogspot.com/
14 |
15 |
16 | Andrew Sabl, Democratic Sportsmanship, Contested Games, and Political Ethics, 2008.
17 | http://www.academia.edu/713610/Democratic_Sportsmanship_Contested_Games_and_Political_Ethics
18 |
19 |
20 |
21 | L.M Goodman, Tezos: A Self-Amending Crypto-Ledger Position Paper, 2014.
22 | https://tezos.com/position-paper.pdf
23 |
--------------------------------------------------------------------------------
/biblios/swarm_systems.md:
--------------------------------------------------------------------------------
1 | ### Bibliography
2 |
3 | "Swarm intelligence (SI) is the collective behavior of decentralized, self-organized systems, natural or artificial"
4 |
5 | http://en.wikipedia.org/wiki/Swarm_intelligence
6 |
7 | Arquilla, John., and Ronfeld, David. **Swarming & the Future of Conflict**. Santa Monica,
8 | CA: RAND, 2005.
9 |
10 | Bonabeau, Eric; Doringo, Marco; Theraulax, Guy. **Swarm Intelligence: from Natural to Artificial Systems**. New York: Oxford University Press, 1999.
11 |
12 | Falkvinge, Rick. **Swarmwise: The tactical manual to changing the world**. CreateSpace, 2013.
13 |
14 | Godlin, Seth. **Tribes: We need you to lead us**. Penguin, 2008.
15 |
16 | Edwards, Sean J. A. **Swarming on the Battlefield: Past, Present, and Future**. Santa Monica,
17 | CA: RAND, 2000.
18 |
19 | Kelly, Kevin. **Out Of Control: The New Biology Of Machines, Social Systems, And The Economic World**. Basic, 2009.
20 |
21 | Levy, Pierre. **Collective Intelligence: Mankind's Emerging World in Cyberspace**. Basic, 1999.
22 |
23 | Miller, John; Page, Scott. **Complex Adaptive Systems: An Introduction to Computational Models of Social Life**. Princeton, 2007.
24 |
25 | Rolling Jr, James Haywood. **Swarm Intelligence; what nature teaches us about shaping creative leadership**. Palgrave Macmillan, 2013.
26 |
27 | Shirky, Clay. **Here Comes Everybody: The Power of Organizing Without Organizations**. Penguin, 2008.
28 |
29 | Surowiecki, James. **Wisdom of Crowds**. Anchor, 2005.
30 |
31 | Van Creveld, Martin. **The Transformation of War**. New York: Free Press, 1991.
32 |
33 | Wilson, Edward O. **The Insect Societies**. Cambridge: Harvard University Press, 1971.
34 |
--------------------------------------------------------------------------------
/fractal_renaissance.md:
--------------------------------------------------------------------------------
1 | This list was originally posted to the "intellectual deep web" email list to synthesize view points leading to a possible renaissance.
2 |
3 |
4 |
5 | 1. Unification and deepening of the diversity of the feminine and the masculine, allowing a multitude of manifestations of nurture, care, lifestyle, including creative tension and harmony.
6 |
7 | 2. Providing the facilitation and infrastructure related to multi-tiered industries allowing builders to build and traders to trade goods without impediment.
8 |
9 | 3. Vigorous defence of free peoples and democratic systems
10 |
11 | 4. Law and order based on facts and not special interests
12 |
13 | 5. Enthusiastic use of new technologies where they complement our lives and enhance our freedoms
14 |
15 | 6. A expansive mode of thinking and discourse without respect to taboos or pettifogging censors
16 |
17 | 7. A deep historical mode including engagement with past thought and the dialectics of becoming
18 |
19 | 8. A 21st century sacred mode emphasising immanentism and direct experience
20 |
21 | 9. Continuous hand of the scapel used to dissect the bodies held sacred and, in the cadaver, finding the hitherto undiscovered flows and fractals of life.
22 |
23 | 10. Embracing the vibrant energies of ecobiological sphere including those global systems necessary to all life
24 |
--------------------------------------------------------------------------------
/history.md:
--------------------------------------------------------------------------------
1 | History of all major blockchain experiments
2 | ==
3 |
4 |
5 | ###Bitcoin Foundation uses colored coins to vote
6 | Topic: Electing foundation board
7 | Mechanism: One member one vote
8 | Documentation:
9 | https://www.coindesk.com/bitcoin-foundation-blockchain-voting-system-controversy
10 |
11 | ###DASH
12 | Topic: Approving monthly spending
13 | Mechanism: One masternode (1000 DASH) one vote
14 | Documentation:
15 | https://app.dashnexus.org/proposals/leaderboard
16 |
17 |
18 | ###THE DAO
19 | Topic: Outbound spending (not tested)
20 | Mechanism: Stake based voting for funding proposals
21 | https://daowiki.atlassian.net/wiki/spaces/DAO/pages/1212573/DAO+mechanisms
22 | https://daostats.github.io/proposals.html
23 |
24 |
25 | ###Ethereum Foundation Carbonvote
26 | Topic: "To hard Fork or not to hard fork"
27 | Mechanism: Non binding stake based voting
28 |
29 | https://futurism.com/the-dao-heist-undone-97-of-eth-holders-vote-for-the-hard-fork
30 | http://carbonvote.com/
31 | https://hackernoon.com/notes-on-blockchain-governance-ob65o3pod
32 |
33 | ###MakerDAO
34 |
35 |
36 | ###DAOStack, Alchemy
37 |
38 |
39 | ###Aragon
40 |
41 |
42 | To add- dates, total financial value, numbers of votes cast.
43 |
44 |
--------------------------------------------------------------------------------
/history_of_metamask.md:
--------------------------------------------------------------------------------
1 |
2 | To whom it may concern,
3 |
4 | After taking a hiatus from crypto I began my formal re-entry early last year (early 2021) due to requests for me to be involved in NFT projects. My own opinions on crypto and web3 are somewhat mixed. First, I believe it has opened up a world of innovation that would not exist otherwise. Second, much like ICOs, the propensity for all sorts of scams, fraud, and dishonest behaviour is the norm rather than the exception in this space.
5 |
6 | Also I should state that I think of myself as a poet first, a game designer second, an intellectual historian third, and a technical wizard fourth. I have a wide breath of knowledge that often allows me to figure out where market opportunity exists and to be early in things that turn out to have large value (financial or otherwise).
7 |
8 | I was often asked during this period about my involvement with Metamask. Now that there are a few articles about this, I can state clearly what is agreed upon and disputed between Consensys and myself. First, all parties appear to agree that I had the idea for a Javascript browser extension wallet, that I assembled the initial team that worked on it, that I wrote the grant that gave the developers the initial capital they needed to develop it, and that “Metamask” was formally created by renaming a GitHub organisation that I started. What is disputed is : how I should refer to myself, whether or not I should be paid back for the expenses I incurred on behalf the project , and whether or not there is any common code or software licenses between the project I got funded and the one that Consensys absorbed.
9 |
10 | Personally, I have never referred to myself as the “founder” of this project because in my mind the founder is a person who works on it full time. This was an option at the time of the YCombinator application but I am generally happy about the path that the project took (i.e. Joe Lubin hiring Aaron Davis). That said, it is quite clear to me that I started the project, and I prefer to be referred to as “the artist who created Metamask” or “the founding architect of Metamask.” “Co-founder” may not be technically incorrect but it gives an emphasis that I do not like. Similarly I have never referred to myself as a ‘founder’ of Ethereum. I prefer “founding contributor” or “founding member.”
11 |
12 | With respect to the amount I am owed, it was originally only 10% out of the grant that I wrote, and this was, in my mind, a modest amount that was effectively only to reimburse me for my own costs that I had already incurred (which included going to Devcon 0, various sushi dinners for the team, etc). All and all this is not a lot of money but the principle of “fairness” and just recompense does not seem to be shared by any party other than myself, so I will let that be. Of course, like many people of that time I had to pay my expenses by selling cryptocurrency, so the slight seems larger relative to the opportunity cost.
13 |
14 | With respect to the common code, there seems to be some slight contradictions in the messages from Consensys staff in the last article on the subject (https://readthegeneralist.com/briefing/metamask). In short, there are three main phases of the project. There is the original phase in which there was no funding. There was the phase from which the funding was received from the Ethereum foundation. There was the phase after the project was absorbed into Consensys. With respect to the code (and other licenses which were in the GitHub repository), it is clear to me that some of the code continued between phase 1 and 2. To what extent the code and license that exists phase 3 is the continuation of phase 2 is not as clear to me. What the main dev seems to be claiming in his response to the journalist is that the code in Phase 1 and Phase 3 are completely different. But “Metamask” by his own admission was created in Phase 2 approximately around the time the funds were received from the Ethereum Foundation. So in that sense, it is misleading to claim that the code in Metamask (i.e. at the time of renaming) is completely different from that in Vapor (Phase 1), because it was exactly the same code in exactly the same GitHub repository, only the name had changed. In short, figuring out what if anything is the same from Phase 1 to Phase 3 (besides possibly removing annoying software licenses) is a tricky issue that could only be resolved by going through the source code itself. For better or worse, I lost access to this long ago and any claims made since then by Consensys employees have not been accompanied by evidence backing up those claims.
15 |
16 | In general, the ability to tell a historically accurate tale of the origins of this project has generally not been helped by Consensys, which has mostly ignored my requests for clarification (including specifics requests regarding shared terminology prior to any interviews) , did not provide information requested by journalists on the dates or terms of their acquisition of the project, and are withholding the more minute details of what source code was changed when. To my knowledge the only public statement of Consensys is in a podcast Joe Lubin states that I helped start it but doesn’t believe I should refer to myself as a co-founder .
17 | (https://podcasts.apple.com/fi/podcast/uponly-with-cobie-ledger/id1554387610?i=1000544495279, 19min). As already stated I agree with Joe and, despite my reservations above about dishonest people in crypto, don’t have particularly bad feelings about Consensys as an organisation.
18 |
19 | In short, at the time “Metamask” was created, it was simply the renamed GitHub organisation of a project I had created. I don’t go out of my way to talk about it because, like many things web3, it still seems at a fairly clunky stage of the technology and I am waiting for products that reach hundreds of millions of users and do so without moral hazard. I also find it a matter of poignant irony that when people ask about Metamask they some how expect me to be a crypto billionare, when rather the reverse is the case, I am an artist who lost money on financing early Ethereum projects and am probably cash flow negative related to what I would have made in other industries.
20 |
21 | If you want to find out more about things I’m really passionate about about ask me about my oracle deck, my cat poems, or my metalanguage for generating metaverses.
22 |
23 | Best,
24 |
25 | Joel Dietz
26 |
27 |
28 | ==== What follows is my version controlled reconstruction of the history of Metamask based on available facts as they have been released by the media ==
29 |
30 |
31 |
32 |
33 | 0. Joel co-founds Ethereum meetups in Silicon Valley and Ethercasts youtube channel (https://www.youtube.com/channel/UCruzgbuOs-7X9BINIGPAsrQ). Kumavis presents his atari-themed ethereum browser / serpent interpreter at one early meetup.
34 |
35 | 1. Joel goes to Devcon 0 in Berlin. Multiple people mention need for Javascript light wallet. Talks with Vitalik and Gav in office. They like idea. Vitalik gives name “Vapor” and said that Eth Grants would interested in funding.
36 |
37 | 2. Joel goes back to Silicon Valley. Converses with Martin Becze (https://github.com/wanderer) about project who is doing JS coding for the Ethereum Foundation. Starts writing project proposal. Recruits Kumavis who had already built a Javascript simulator . Kumavis said he would need funding to quit his job. Joel is currently also running bitcoin based crowdfunding platform at this time (Swarm) which is doing low volume, but project is listed there.
38 |
39 | 3. Joel, Martin and Kumavis apply to YCombinator and get interview (https://youtu.be/p135D4Tv1mM). YCombinator states they aren’t sure about the utility of such a product and don’t give funding with the comment, "Unfortunately, we've decided not to fund Vapor. We were impressed by the three of you and the demo we saw, but we weren't convinced that this would grow large among mainstream users.... We'd be happy to hear from you again if you figure out a clearer plan to get widespread adoption of smart contracts."
40 |
41 | 4. Kumavis begins serious work on building light client. Says his teammates at Apple might also be willing to leave apple to work on it. Joel and Martin finish the application to Eth grants (https://123mastery.com/wp-content/uploads/2020/10/VAPOR-Bursury-Application.docx), including a small carve out for design and reimbursements for Joel for costs he has incurred so far.
42 |
43 | 5. Joel is in frequent communication with Wendell Davis of the Ethereum Foundation who is managing the program and gives indication that the grant has been awarded.
44 |
45 | 6. ____ ? (There is now a well researched article that covers this period that includes input from Kumavis: https://www.readthegeneralist.com/briefing/metamask)
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | 7. Joel awakes to find the channels renamed and the GitHub organization renamed and himself removed from the GitHub organisation. Licenses indicating shared ownership of the project appear to also be removed.
58 |
59 | 8. Joel later finds out the new name of the project “Metamask” is now a Consensys project.
60 |
61 | 9. Joel writes emails to people from Consensys to find out what happened but no one responds (Dec 27, 2015, Sep 8, 2016).
62 |
63 |
64 | Some people also ask about the history of the fox. Basically Kumavis and myself (but esp. Kumavis) were Starfox fans and we thought it would be a cool 3d logo (I will note that there is a deeper history to the original choice of logo but if you want to know you should find some dream researchers in Toronto and see if they will tell you).
65 |
66 |
--------------------------------------------------------------------------------
/legal-contracts/social_contract_license.md:
--------------------------------------------------------------------------------
1 | # Social contract license
2 |
3 | The social contract license. To a certain extent, it is the direct descendent of the "social contract" philosophy that largely inspired the structure of the American Republic and other modern political systems.
4 |
5 | This codifies the statement of intent that is associated with the particular organization.
6 |
7 | In this case the statement of intent is:
8 |
9 | _________________ .
10 |
11 | To enforce this statement of intent, we have a new legal construct called a ["Distributed Collaborative Organization."] (https://www.scribd.com/doc/255347578/SWARM-Working-Paper-Distributed-Networks-and-the-Law). This consists of members who have agreed to the statement of intent. For financial or other types of contributions they may also receive some [cryptoequity] (http://p2pfoundation.net/Cryptoequity) that gives them a pro-rata right to participate in key decisions of the organization.
12 |
13 | Delegates are elected by people who are members of the organization via a cryptoequity voting system. They serve as a "board" of the organization and take care of ordinary operational decisions.
14 |
15 | This software may be freely used and modified by anyone consenting to this statement of intent so long as the license remains.
16 |
17 | Penalties for violations of this usage are not to exceed $1,000,000 per usage.
18 |
19 | Delegates are required by the terms of this license to make an open record of the decision making related to any enforcement mechanism.
20 |
21 | In the case, the governing body is:
22 |
23 | _________________ .
24 |
25 |
26 | Known implementations of this license include:
27 |
28 | https://github.com/fractastical/swarmbot
29 |
--------------------------------------------------------------------------------
/metaverse-constitution:
--------------------------------------------------------------------------------
1 | 1. This set of rules shall be called the “bylaws”
2 | 2. Bylaws can be updated once per month during the monthly founders consortium
3 | 3. Any potential update to the bylaws (including proposed new members) shall be submitted at least 3 days in advance of the monthly founders meeting
4 | 4. Voting shall take place in the three days prior to and during the founders
5 | 5. A majority of present members in the meeting shall determine the quorum (i.e. if there are 5 people present, the quorum shall be 3)
6 | 6. All votes will be recorded as addendums to this document in a public document in git format
7 | 7. Membership criteria is : “Executive or significant owner metaverse or related technology that can be used to create a private members area and/or puzzle as part of a scavenger hunt"
8 |
9 | Active members are:
10 | [ to be established at first meeting ]
11 |
12 | 8. A cross metaverse scavenger hunt is scheduled for the month of June.
13 | 9. Success shall be defined as the number of participants times how they rate their fun level from 1-10
14 |
15 |
--------------------------------------------------------------------------------
/my_work.md:
--------------------------------------------------------------------------------
1 | Related things I've done in roughly chronological order. Before all this was a software architect for 10+ years with programming awards from Google, Salesforce and Top Coder and degrees from Brown and Penn (https://everipedia.org/wiki/lang_en/joel-dietz) (https://developer.salesforce.com/index.php?title=Joel_Dietz_Success_Story&oldid=43428)(http://linkedin.com/joel.a.dietz)
2 |
3 |
4 |
5 | ### Cryptoeconomics
6 |
7 | - top cited piece on Google Scholar on Cryptoeconomics
8 | (https://scholar.google.com/scholar?hl=en&as_sdt=0%2C33&q=cryptoeconomic&btnG=)
9 |
10 | ### EtherCasts
11 |
12 | - Early dev education around Ethereum smart contracts
13 |
14 | - created first blockchain marriage contract and other sample dapps
15 |
16 | - ~3700 subscribers (https://www.youtube.com/user/EtherCasts)
17 |
18 | ### Ethereum SF
19 |
20 | - co-founded the Ethereum SF and Silicon Valley meetups and helped organize the first ~20 meetups (~4700 people on Meetup)
21 |
22 | - served as office manager for the Silicon Valley Ethereum office when it existed
23 |
24 | ### Decentralized Autonomous Society
25 |
26 | - Along with mutiple Ethereum Foundation employees and other blockchain enthusiasts created the first group dedicated to dicussing decentralized governance (https://www.youtube.com/watch?v=iubsqehXUoY)
27 |
28 | - ~35 real life meetups including talks by Ralph Merkle, etc
29 |
30 | - ~5200 members on Facebook (https://www.facebook.com/groups/579940655425355/) ~1200 meetup members
31 |
32 | ### Holon
33 |
34 | - Created first and only continuously operating "holon" , a co-living space based on holonic principles (https://techcrunch.com/video/love-nests-co-living-space-helps-birds-fly/) (now: www.meta-villa.com) which has run hundreds of events
35 |
36 | - Contributed to the intellectual discourses on these topics by writing the first distributed governance and reputation system whitepapers in 2014
37 |
38 | - Also periodicially involved in the Platform Cooperativism movement
39 |
40 | ### Swarm 1.0
41 |
42 | - Created first real world tokenization platform including its own blockchain based governance system
43 |
44 | - Included a lightwallet implementation supporting Bitcoin and Counterparty based colored coins
45 |
46 | - Conducted first vote where a major community decision was made via on a blockchain
47 |
48 | - Conducted first election where a non-profit foundation elected its board via a blockchain vote
49 |
50 | - Approximately ~1000 participants
51 |
52 | ### Metamask
53 |
54 | - attended DevCon 0 and with Martin Becze wrote the first ever accepted DevGrants grant for "Vapor," a javascript light client based via a browser extension
55 |
56 | - Got a YCombinator interview for this project ( https://youtu.be/p135D4Tv1mM )
57 |
58 | - Consensys later internalized Vapor and renamed it MetaMask
59 |
60 | - Now has 1.3M users
61 |
62 | ### Crypto Gifting
63 |
64 | - Ran a holiday charity drive encouraging prominent crypto people to donate to charity (https://sites.google.com/view/crypto-gifting-org
65 | )
66 |
67 | ### Swarm Fund
68 |
69 | - Advised this further iteration of Swarm
70 |
71 | - created distributed masternode system in which masternode holders elect a council of 5 members who operate the organization (~393 Masternodes) (https://masternodes.swarm.fund/#/)
72 |
73 | - organization later signed major partnerships with Siemens, etc and did a few token issuances (art token, masternode fund, etc)
74 |
75 |
76 | ### BTG Pactual / Tezos
77 |
78 | - worked with BTG Pactual team to introduce $1B of digital assets
79 |
80 | - Introduced BTG Pactual and Tezos teams and advised creation of $10mm real estate asset
81 |
82 |
83 | ### Sciath
84 |
85 | - ran deep research program on unique data sources that can be used for crypto trading
86 |
87 | - identified high value strategies and deployed behind an operational hedge fund
88 |
89 |
90 | ### Crypto Masters
91 |
92 | - recruited leading professors teaching technology, trading, and digital assets and packaged as online video education
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/old/hackathon_notes.md:
--------------------------------------------------------------------------------
1 |
2 | FRI
3 |
4 | 6:45pm. Arrived at venue directly from airport. Seems like most people are already in teams.
5 |
6 | 8pm - 10pm. Whiteboarding and watching live cast. Pinged victor tron to see if swarm could fit in.
7 |
8 | 11:20pm. Finished white boarding. Leaving venue for hotel (yoga person who offered me a room is not responding). Slightly disturbed that developer that agreed to participate in hackathon with has seemingly joined another team just before I arrived at the venue. Does not bode well for long term relationship.
9 |
10 | SAT
11 |
12 | 8:25am. Breakfast finished. official time=0
13 |
14 | *Starting notes:* Focused. Could have gotten here a bit earlier but took my time, making sure I had adequate energy. Stamina will be key here. Flight yesterday was fatiguing and noticing a bit of sniffles, which is concerning given health. Planning to take a 1pm yoga break, otherwise want to maximize time usage. Pushing notes to github. Got response from Viktor Tron and pinged him on Skype. Also pinged two other folks who mentioned they had possible land partners in Brazil — stable on the ground partners will be key for this project to succeed.
15 |
16 | Plan is to setup Aragon. See what LD contracts they have and compare to our previous implementation, then to see what can be done to tie together a swarm interface to actual objects that would be tied to the tokens.
17 |
18 | 8:45 Designer Martin is excited about idea and seems to want to join team.
19 |
20 | 9:06 Introduction finished. Formal kickoff.
21 |
22 | 9:15 Our own slack channel setup.
23 |
24 | 9:27 Github repo: https://github.com/fractastical/breathe.git
25 |
26 | 9:44
27 | TODO:
28 |
29 | MB: working on interface design off sample sketchies
30 |
31 |
32 | JD: figure out to how to embed images with ipfs/swarm
33 |
34 | JD: get aragon working -- bug report filed
35 |
36 | JD: go through Ethers tutorial (direct ICO?)
37 |
38 | JD: put together initial pieces into breate bootstrap
39 |
40 | JD: confirm rainforest acquisition partners
41 |
42 | JD: chat with Viktor Tron
43 |
44 | 11:19am
45 |
46 | Finalized initial status of partnership for two rainforest owners in Brazil that are amenable to partnership and initial terms, as well as statement of intent.
47 |
48 | 11:30am creation of dropbox with visual assets, etc.
49 |
50 | 11:35 chat with bogdan. he apparently thought there was a different conference track that i was going to be at which is why he ended up in another team. will rejoin at some point later today after he helps.
51 |
52 | 11:40 start with dropbox paper. Listed partners
53 |
54 | 12:04 idea: automated messaging bot that handles FAQ. Pinged World Land Trust. Hard time finding Breathe related domains
55 |
56 | 12:22 have both local ethers and Visual Code environments setup. Should be ready to start coding as soon as i'm done yoga.
57 |
58 | 5:17 back from yoga / haircut. Took longer than expected. Giving up on aragon for the moment (Error: PortDuplexStream - disconnected)
59 |
60 | 5:30 decided to use existing bootstrap template and use Gov as a service "GaaS". Neologism?
61 |
62 | 6:26. Registered ibreathe.io. Looked at some earth day buzz. Talked with proof-of-walk team.
63 |
64 | TODOS:
65 |
66 | Deploy existing work to ibreathe.io
67 |
68 | video script? maybe with slideshow
69 |
70 | swarm/ipfs
71 |
72 | 6:56. Login to AgroNow. Get screenshots. Add Partner section to front page. Ping Juan from IPFS to see if he can formally advise this project.
73 |
74 | 7:34pm Recorded a audio intro. Handed off to video editor friend who is going to mix it with some time lapse stock footage he has sitting around.
75 |
76 | Thinking about reputation, esp. of partners. Should we have some built in reputation engine at launch?
77 |
78 | 7:41pm just got video back. whee that was fast.
79 |
80 | 8pm tried to hire voice actor via fiverr.
81 |
82 | 10:17 been working with bogdan in adding rainforest images and documetning flow, updating IMPACT.
83 |
84 |
85 | 10:36 fatigue setting in.
86 |
87 | 11:41 problems swapping assets back and forth. designer has disappeared, no sign of returning.
88 |
89 | 11:59 need to make another todo list:
90 |
91 | make another attempt at image loading via IPFS (not working don't know why)
92 |
93 | add partner logos and
94 |
95 | 1:33am where did the time go? diet coke. lots of troubleshooting with geth stuff. Bogdan left around 12:50
96 |
97 | 2:20 mind getting a bit foggy. think i want to make a "certificate" for a purchase. also super hungry. conference organizers promised us pizza at midnight but it is nowhere to be seen.
98 |
--------------------------------------------------------------------------------
/projects.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | Counterparty. The people's financial platform. http://www.counterparty.co
4 |
5 | Ethereum. Turing complete state-aware language for smart contracts. http://www.ethereum.org
6 |
7 | Decentralized Autonomous Society. https://www.facebook.com/groups/579940655425355/
8 |
9 | Swarm. Decentralized crowdfunding. http://www.swarm.co
10 |
11 | Bitnation. Decentralized / voluntary governance https://docs.google.com/document/d/16HDB9AABa5rTOVFJj_8VLdOxgMguovLLAMviaTkZ1q4/edit
--------------------------------------------------------------------------------
/smart-contracts/asset-tokens/dividend.sol:
--------------------------------------------------------------------------------
1 | contract MyToken {
2 | /* Public variables of the token */
3 | string public name;
4 | string public symbol;
5 | uint8 public decimals;
6 |
7 | /* This creates an array with all balances */
8 | mapping (address => uint256) public balanceOf;
9 |
10 | /* This generates a public event on the blockchain that will notify clients */
11 | event Transfer(address indexed from, address indexed to, uint256 value);
12 |
13 | /* Initializes contract with initial supply tokens to the creator of the contract */
14 | function MyToken(uint256 _supply, string _name, string _symbol, uint8 _decimals) {
15 | /* if supply not given then generate 1 million of the smallest unit of the token */
16 | if (_supply == 0) _supply = 1000000;
17 |
18 | /* Unless you add other functions these variables will never change */
19 | balanceOf[msg.sender] = _supply;
20 | name = _name;
21 | symbol = _symbol;
22 |
23 | /* If you want a divisible token then add the amount of decimals the base unit has */
24 | decimals = _decimals;
25 | }
26 |
27 | /* Send coins */
28 | function transfer(address _to, uint256 _value) {
29 | /* if the sender doenst have enough balance then stop */
30 | if (balanceOf[msg.sender] < _value) throw;
31 | if (balanceOf[_to] + _value < balanceOf[_to]) throw;
32 |
33 | /* Add and subtract new balances */
34 | balanceOf[msg.sender] -= _value;
35 | balanceOf[_to] += _value;
36 |
37 | /* Notifiy anyone listening that this transfer took place */
38 | Transfer(msg.sender, _to, _value);
39 | }
40 |
41 | function dividend(uint256 _value) {
42 |
43 | // need to put in some for loop
44 | /* Add and subtract new balances */
45 | balanceOf[msg.sender] -= _value;
46 | balanceOf[_to] += _value;
47 |
48 | Transfer(msg.sender, _to, _value);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/smart-contracts/asset-tokens/mintable.sol:
--------------------------------------------------------------------------------
1 | /*
2 | This creates a digital cryptocurrency that is controlled by another contract.
3 | That contract–the "mint"-has the powers to create new tokens out of thin air,
4 | and freeze and unfreeze accounts, preventing them from sending these tokens.
5 |
6 | This contract is intended for educational purposes, you are fully responsible
7 | for compliance with present or future regulations of finance, communications
8 | and the universal rights of digital beings.
9 |
10 | Anyone is free to copy, modify, publish, use, compile, sell, or
11 | distribute this software, either in source code form or as a compiled
12 | binary, for any purpose, commercial or non-commercial, and by any
13 | means.
14 |
15 | In jurisdictions that recognize copyright laws, the author or authors
16 | of this software dedicate any and all copyright interest in the
17 | software to the public domain. We make this dedication for the benefit
18 | of the public at large and to the detriment of our heirs and
19 | successors. We intend this dedication to be an overt act of
20 | relinquishment in perpetuity of all present and future rights to this
21 | software under copyright law.
22 |
23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
26 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
27 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29 | OTHER DEALINGS IN THE SOFTWARE.
30 |
31 | For more information, please refer to
32 | */
33 |
34 | contract mintableToken {
35 | /* Public variables of the token */
36 | string public name;
37 | string public symbol;
38 | uint8 public decimals;
39 | address public issuer;
40 |
41 | /* This creates an array with all balances */
42 | mapping (address => uint) public balanceOf;
43 | mapping (address => bool) public frozenAccount;
44 |
45 | /* This generates a public event on the blockchain that will notify clients */
46 | event Transfer(address indexed from, address indexed to, uint256 value);
47 | event FrozenFunds(address target, bool frozen);
48 |
49 | /* Initializes contract with initial supply tokens to the creator of the contract */
50 | function mintableToken(uint256 initialSupply, string tokenName, uint8 decimalUnits, string tokenSymbol, address centralMinter) {
51 | /* if supply not given then generate 1 million of the smallest unit of the token */
52 | if (initialSupply == 0) initialSupply = 1000000;
53 |
54 | if(centralMinter == 0) centralMinter = msg.sender;
55 | issuer = centralMinter;
56 |
57 | /* Unless you add other functions these variables will never change */
58 | balanceOf[centralMinter] = initialSupply;
59 | name = tokenName;
60 | symbol = tokenSymbol;
61 |
62 | /* If you want a divisible token then add the amount of decimals the base unit has */
63 | decimals = decimalUnits;
64 | }
65 |
66 | /* Send coins */
67 | function transfer(address recipient, uint256 amount) {
68 | /* if the sender doenst have enough balance then stop */
69 | if (balanceOf[msg.sender] < amount /* has enough funds? */
70 | || balanceOf[recipient] + amount < balanceOf[recipient] /* Checks for overflows */
71 | || frozenAccount[msg.sender]) /* is frozen? */
72 | throw;
73 |
74 | /* Add and subtract new balances */
75 | balanceOf[msg.sender] -= amount;
76 | balanceOf[recipient] += amount;
77 |
78 | /* Notifiy anyone listening that this transfer took place */
79 | Transfer(msg.sender, recipient, amount);
80 | }
81 |
82 | modifier onlyIssuer {
83 | if (msg.sender != issuer) throw;
84 | _
85 | }
86 |
87 | function mintToken(address target, uint256 mintedAmount) onlyIssuer {
88 | balanceOf[target] += mintedAmount;
89 |
90 | Transfer(0, target, mintedAmount);
91 | }
92 |
93 | function freezeAccount(address target, bool freeze) onlyIssuer {
94 | frozenAccount[target] = freeze;
95 |
96 | FrozenFunds(target, freeze);
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/smart-contracts/asset-tokens/standard.sol:
--------------------------------------------------------------------------------
1 | /*
2 | This creates a public tradeable fungible token in the Ethereum Blockchain.
3 | https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs
4 |
5 | Unmodified this will create a cryptoasset with a fixed market cap
6 | wholly owned by the contract creator. You can create any function
7 | to change this contract, like allowing specific rules for the issuance,
8 | destruction and freezing of any assets. This contract is intended for
9 | educational purposes, you are fully responsible for compliance with
10 | present or future regulations of finance, communications and the
11 | universal rights of digital beings.
12 |
13 | Anyone is free to copy, modify, publish, use, compile, sell, or
14 | distribute this software, either in source code form or as a compiled
15 | binary, for any purpose, commercial or non-commercial, and by any
16 | means.
17 |
18 | In jurisdictions that recognize copyright laws, the author or authors
19 | of this software dedicate any and all copyright interest in the
20 | software to the public domain. We make this dedication for the benefit
21 | of the public at large and to the detriment of our heirs and
22 | successors. We intend this dedication to be an overt act of
23 | relinquishment in perpetuity of all present and future rights to this
24 | software under copyright law.
25 |
26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
30 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
31 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
32 | OTHER DEALINGS IN THE SOFTWARE.
33 |
34 | For more information, please refer to
35 |
36 | */
37 | contract MyToken {
38 | /* Public variables of the token */
39 | string public name;
40 | string public symbol;
41 | uint8 public decimals;
42 |
43 | /* This creates an array with all balances */
44 | mapping (address => uint256) public balanceOf;
45 |
46 | /* This generates a public event on the blockchain that will notify clients */
47 | event Transfer(address indexed from, address indexed to, uint256 value);
48 |
49 | /* Initializes contract with initial supply tokens to the creator of the contract */
50 | function MyToken(uint256 _supply, string _name, string _symbol, uint8 _decimals) {
51 | /* if supply not given then generate 1 million of the smallest unit of the token */
52 | if (_supply == 0) _supply = 1000000;
53 |
54 | /* Unless you add other functions these variables will never change */
55 | balanceOf[msg.sender] = _supply;
56 | name = _name;
57 | symbol = _symbol;
58 |
59 | /* If you want a divisible token then add the amount of decimals the base unit has */
60 | decimals = _decimals;
61 | }
62 |
63 | /* Send coins */
64 | function transfer(address _to, uint256 _value) {
65 | /* if the sender doenst have enough balance then stop */
66 | if (balanceOf[msg.sender] < _value) throw;
67 | if (balanceOf[_to] + _value < balanceOf[_to]) throw;
68 |
69 | /* Add and subtract new balances */
70 | balanceOf[msg.sender] -= _value;
71 | balanceOf[_to] += _value;
72 |
73 | /* Notifiy anyone listening that this transfer took place */
74 | Transfer(msg.sender, _to, _value);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/smart-contracts/daos/circles.sol:
--------------------------------------------------------------------------------
1 | // koeppelmann
2 | // via https://raw.githubusercontent.com/koeppelmann/circles/master/circles.sol
3 |
4 | contract Circles {
5 | mapping (address => AccountValues) public accounts;
6 | mapping (address => mapping (address => uint)) public balances;
7 | mapping (address => mapping (address => bool)) public trustees;
8 |
9 | struct AccountValues {
10 | uint created;
11 | uint spend;
12 | uint trustee_reward;
13 | }
14 |
15 | function Circles() {
16 | }
17 |
18 |
19 | function addAcount() {
20 | accounts[msg.sender].created = block.timestamp - 2592000; //date 1 month back
21 | accounts[msg.sender].spend = 0;
22 | accounts[msg.sender].trustee_reward = 2592000 * 2 / 6;
23 | }
24 |
25 |
26 | function sendMoney(address receiver, address currency, uint amount) returns(bool sufficient) {
27 | if (balances[msg.sender][currency] < amount) return false;
28 | balances[msg.sender][currency] -= amount;
29 | balances[receiver][currency] += amount;
30 | return true;
31 | }
32 |
33 | function getAmount(address currency) returns(uint amount){
34 | return balances[msg.sender][currency];
35 | }
36 |
37 | function getNewIncomeAvailable() returns(uint amount){
38 | return ((block.timestamp - accounts[msg.sender].created) / 6) - accounts[msg.sender].spend;
39 | }
40 |
41 |
42 | function sendNewIncome(address receiver, uint amount) returns(bool sufficient) {
43 | //todo factor in 2% growth rate
44 | uint income_generated = (block.timestamp - accounts[msg.sender].created) / 6;
45 | if ((income_generated - accounts[msg.sender].spend) >= amount){
46 | accounts[msg.sender].spend += amount;
47 | balances[receiver][msg.sender] += amount;}
48 | }
49 |
50 | function addTrust(uint8 v, bytes32 r, bytes32 s) returns(bool succeeded) {
51 | if (trustees[msg.sender][trustee]) false;
52 |
53 | address trustee = ecrecover(sha256(msg.sender, "WillingToExchange1to1"), v, r, s);
54 |
55 |
56 | trustees[msg.sender][trustee] = true;
57 | trustees[trustee][msg.sender] = true;
58 | //payout trustees reward
59 | balances[msg.sender][trustee] += accounts[trustee].trustee_reward / 10;
60 | balances[trustee][msg.sender] += accounts[msg.sender].trustee_reward / 10;
61 | accounts[trustee].trustee_reward -= accounts[trustee].trustee_reward / 10;
62 | accounts[msg.sender].trustee_reward -= accounts[msg.sender].trustee_reward / 10;
63 | return true;
64 | }
65 |
66 | function revokeTrust(address trustee) returns(bool succeeded){
67 | trustees[msg.sender][trustee] = false;
68 | trustees[trustee][msg.sender] = false;
69 | return true;
70 | }
71 |
72 |
73 | function forwardMoney(address receiver, address hop1, uint amount) returns(bool succeeded) {
74 | if (!trustees[msg.sender][hop1]) return false;
75 | if (balances[msg.sender][msg.sender] < amount) return false;
76 | if (balances[hop1][hop1] < amount) return false;
77 | balances[msg.sender][msg.sender] -= amount;
78 | balances[hop1][hop1] -= amount;
79 | balances[hop1][msg.sender] += amount;
80 | balances[receiver][hop1] += amount;
81 | return true;
82 |
83 | }
84 |
85 | /*
86 | function convertIntoGroupMoney(address group, unit amount){
87 | if (msg.sender in groups[group]) {
88 | if (balances[msg.sender][msg.sender] >= amount){
89 | balances[msg.sender][message.sender] -= amount
90 | balances[msg.sender][group] += amount
91 | }
92 | }
93 | }
94 | */
95 |
96 | }
97 |
98 |
99 |
100 |
101 | /*
102 | Dictionary -> Set
103 | groups[owner] = [member1, member2 ,..]
104 | Dictionary -> Set
105 | trustees[account] = [account1, account2, …] // each relationship need only be saved once
106 | Dictionary – > Dictionary -> int
107 | balance[owner][foreign_account] = amount
108 | Int
109 | years = 0
110 | //pseudo code
111 |
112 |
113 |
114 | revoke_trust(account):
115 | if int(message.sender) > account:
116 | trustees[message.sender].remove(account)
117 | else:
118 | trustees[account].remove(message.sender)
119 | send_money(amount, currency, receiver):
120 | if balance[message.sender][currency] >= amount:
121 | balance[message.sender][currency] -= amount
122 | balance[receiver][currency] += amount
123 | exchange_money(account1, account2, amount)
124 | if message.sender == account1 or message.sender == account2:
125 | if account2 in trustees[account1]:
126 | if balance[account1][account1] >= amount:
127 | if balance[account2][account2] >= amount:
128 | balance[account1][account1] -= amount
129 | balance[account2][account2] -= amount
130 | balance[account1][account2] += amount
131 | balance[account2][account1] += amount
132 | create_group()
133 | groups[message.sender] = Set()
134 |
135 | add_group_member(account)
136 | groups[message.sender].add(account)
137 | remove_groupt_member(account)
138 | groups[message.sender].remove(account)
139 |
140 | */
141 |
--------------------------------------------------------------------------------
/smart-contracts/daos/democracy-dao.sol:
--------------------------------------------------------------------------------
1 | /*
2 | This creates a Democractic Autonomous Organization. Membership is based
3 | on ownership of custom tokens, which are used to vote on proposals.
4 |
5 | This contract is intended for educational purposes, you are fully responsible
6 | for compliance with present or future regulations of finance, communications
7 | and the universal rights of digital beings.
8 |
9 | Anyone is free to copy, modify, publish, use, compile, sell, or
10 | distribute this software, either in source code form or as a compiled
11 | binary, for any purpose, commercial or non-commercial, and by any
12 | means.
13 |
14 | In jurisdictions that recognize copyright laws, the author or authors
15 | of this software dedicate any and all copyright interest in the
16 | software to the public domain. We make this dedication for the benefit
17 | of the public at large and to the detriment of our heirs and
18 | successors. We intend this dedication to be an overt act of
19 | relinquishment in perpetuity of all present and future rights to this
20 | software under copyright law.
21 |
22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
26 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28 | OTHER DEALINGS IN THE SOFTWARE.
29 |
30 | For more information, please refer to
31 |
32 | */
33 |
34 | /* The token is used as a voting shares */
35 | contract token { mapping (address => uint256) public balanceOf; }
36 |
37 | /* The democracy contract itself */
38 | contract Democracy {
39 |
40 | /* Contract Variables and events */
41 | uint public minimumQuorum;
42 | uint public debatingPeriodInMinutes;
43 | Proposal[] public proposals;
44 | uint public numProposals;
45 | token public sharesTokenAddress;
46 |
47 | event ProposalAdded(uint proposalID, address recipient, uint amount, string description);
48 | event Voted(uint proposalID, bool position, address voter);
49 | event ProposalTallied(uint proposalID, int result, uint quorum, bool active);
50 |
51 | struct Proposal {
52 | address recipient;
53 | uint amount;
54 | string description;
55 | uint votingDeadline;
56 | bool openToVote;
57 | bool proposalPassed;
58 | uint numberOfVotes;
59 | bytes32 proposalHash;
60 | Vote[] votes;
61 | mapping (address => bool) voted;
62 | }
63 |
64 | struct Vote {
65 | bool inSupport;
66 | address voter;
67 | }
68 |
69 | /* modifier that allows only shareholders to vote and create new proposals */
70 | modifier onlyShareholders {
71 | if (sharesTokenAddress.balanceOf(msg.sender) == 0) throw;
72 | _
73 | }
74 |
75 | /* First time setup */
76 | function Democracy(token sharesAddress, uint minimumSharesForVoting, uint minutesForDebate) {
77 | sharesTokenAddress = token(sharesAddress);
78 | if (minimumSharesForVoting == 0 ) minimumSharesForVoting = 1;
79 | minimumQuorum = minimumSharesForVoting;
80 | debatingPeriodInMinutes = minutesForDebate;
81 | }
82 |
83 | /* Function to create a new proposal */
84 | function newProposal(address beneficiary, uint etherAmount, string JobDescription, bytes transactionBytecode) onlyShareholders returns (uint proposalID) {
85 | proposalID = proposals.length++;
86 | Proposal p = proposals[proposalID];
87 | p.recipient = beneficiary;
88 | p.amount = etherAmount;
89 | p.description = JobDescription;
90 | p.proposalHash = sha3(beneficiary, etherAmount, transactionBytecode);
91 | p.votingDeadline = now + debatingPeriodInMinutes * 1 minutes;
92 | p.openToVote = true;
93 | p.proposalPassed = false;
94 | p.numberOfVotes = 0;
95 | ProposalAdded(proposalID, beneficiary, etherAmount, JobDescription);
96 | numProposals = proposalID+1;
97 | }
98 |
99 | /* function to check if a proposal code matches */
100 | function checkProposalCode(uint proposalNumber, address beneficiary, uint etherAmount, bytes transactionBytecode) constant returns (bool codeChecksOut) {
101 | Proposal p = proposals[proposalNumber];
102 | return p.proposalHash == sha3(beneficiary, etherAmount, transactionBytecode);
103 | }
104 |
105 | /* */
106 | function vote(uint proposalNumber, bool supportsProposal) onlyShareholders returns (uint voteID){
107 | Proposal p = proposals[proposalNumber];
108 | if (p.voted[msg.sender] == true) throw;
109 |
110 | voteID = p.votes.length++;
111 | p.votes[voteID] = Vote({inSupport: supportsProposal, voter: msg.sender});
112 | p.voted[msg.sender] = true;
113 | p.numberOfVotes = voteID +1;
114 | Voted(proposalNumber, supportsProposal, msg.sender);
115 | }
116 |
117 | function executeProposal(uint proposalNumber, bytes transactionBytecode) returns (int result) {
118 | Proposal p = proposals[proposalNumber];
119 | /* Check if the proposal can be executed */
120 | if (now < p.votingDeadline /* has the voting deadline arrived? */
121 | || !p.openToVote /* has it been already executed? */
122 | || p.proposalHash != sha3(p.recipient, p.amount, transactionBytecode)) /* Does the transaction code match the proposal? */
123 | throw;
124 |
125 | /* tally the votes */
126 | uint quorum = 0;
127 | uint yea = 0;
128 | uint nay = 0;
129 |
130 | for (uint i = 0; i < p.votes.length; ++i) {
131 | Vote v = p.votes[i];
132 | uint voteWeight = sharesTokenAddress.balanceOf(v.voter);
133 | quorum += voteWeight;
134 | if (v.inSupport) {
135 | yea += voteWeight;
136 | } else {
137 | nay += voteWeight;
138 | }
139 | }
140 | /* execute result */
141 | if (quorum > minimumQuorum && yea > nay ) {
142 | // has quorum and was approved
143 | p.recipient.call.value(p.amount*1000000000000000000)(transactionBytecode);
144 | p.openToVote = false;
145 | p.proposalPassed = true;
146 | } else if (quorum > minimumQuorum && nay > yea) {
147 | p.openToVote = false;
148 | p.proposalPassed = false;
149 | }
150 | /* Fire Events */
151 | ProposalTallied(proposalNumber, result, quorum, p.openToVote);
152 | }
153 | }
154 |
--------------------------------------------------------------------------------
/smart-contracts/daos/randao.sol:
--------------------------------------------------------------------------------
1 | //https://raw.githubusercontent.com/randao/randao/master/contracts/Randao.sol
2 |
3 | contract Randao {
4 | struct Participant {
5 | uint256 secret;
6 | bytes32 commitment;
7 | }
8 | struct Consumer {
9 | address caddr;
10 | bytes cbname;
11 | }
12 | struct Campaign {
13 | address[] paddresses;
14 | uint16 reveals;
15 |
16 | uint256 random;
17 | bool settled;
18 | uint96 bountypot;
19 |
20 | Consumer[] consumers;
21 |
22 | mapping (address => Participant) participants;
23 | }
24 |
25 | mapping (uint32 => Campaign) public campaigns;
26 |
27 | uint8 constant commit_deadline = 6;
28 | uint8 constant commit_balkline = 12;
29 | uint96 constant deposit = 10 ether;
30 | uint96 constant callback_fee = 100 finney;
31 | uint8 public version = 1;
32 |
33 | function Randao () {
34 | }
35 |
36 | function commit (uint32 bnum, bytes32 hs) external check_deposit {
37 | if(block.number >= bnum - commit_balkline && block.number < bnum - commit_deadline){
38 | Campaign c = campaigns[bnum];
39 |
40 | if(hs != "" && c.participants[msg.sender].commitment == ""){
41 | c.paddresses[c.paddresses.length++] = msg.sender;
42 | c.participants[msg.sender] = Participant(0, hs);
43 | } else { // can't change commitment after commited
44 | refund(msg.value);
45 | }
46 | } else {
47 | refund(msg.value);
48 | }
49 | }
50 |
51 | //TODO: allow reveal others secrets
52 | function reveal (uint32 bnum, uint256 s) external {
53 | if(block.number < bnum && block.number >= bnum - commit_deadline){
54 | Campaign c = campaigns[bnum];
55 |
56 | Participant p = c.participants[msg.sender];
57 |
58 | if(sha3(s) == p.commitment){
59 | if(p.secret != s){ c.reveals++; }
60 | p.secret = s;
61 | }
62 | }
63 | }
64 |
65 | function reveals (uint32 bnum) returns (uint r){
66 | return campaigns[bnum].reveals;
67 | }
68 |
69 | function test() returns (bool) {
70 | return true;
71 | }
72 |
73 | function random (uint32 bnum) returns (uint num) {
74 | Campaign c = campaigns[bnum];
75 |
76 | if(block.number >= bnum) { // use campaign's random number
77 | if(!c.settled) { settle(c); }
78 |
79 | return c.random;
80 | } else { // register random number callback
81 | // TODO: msg.sender or tx.origin ?
82 | if(msg.value >= callback_fee) {
83 | add2callback(c);
84 | return 1;
85 | } else {
86 | refund(msg.value);
87 | return 0;
88 | }
89 | }
90 | }
91 |
92 | function calculate(Campaign storage c) private {
93 | for (uint i = 0; i < c.paddresses.length; i++) {
94 | c.random ^= c.participants[c.paddresses[i]].secret;
95 | }
96 | }
97 |
98 | function settle(Campaign storage c) private {
99 | c.settled = true;
100 |
101 | if(c.reveals > 0){
102 | if(c.reveals == c.paddresses.length) calculate(c);
103 |
104 | if(c.random > 0) callback(c);
105 |
106 | refund_bounty(c);
107 | }
108 | }
109 |
110 | function refund_bounty(Campaign storage c) private {
111 | var fee = 100 * tx.gasprice;
112 | var share = c.bountypot / c.reveals;
113 |
114 | for (uint i = 0; i < c.paddresses.length; i++) {
115 | c.paddresses[i].send(share - txfee());
116 | }
117 | }
118 |
119 | function add2callback(Campaign storage c) private {
120 | c.consumers[c.consumers.length++] = Consumer(msg.sender, slice(msg.data, 36, 4));
121 | c.bountypot += uint96(msg.value - txfee());
122 | }
123 |
124 | function callback(Campaign storage c) private {
125 | for (uint i = 0; i < c.consumers.length; i++) {
126 | var consumer = c.consumers[i];
127 | consumer.caddr.call(consumer.cbname, c.random);
128 | }
129 | }
130 |
131 | function refund (uint rvalue) private {
132 | // TODO: msg.sender or tx.origin ?
133 | if(rvalue > txfee()){
134 | msg.sender.send(rvalue - txfee());
135 | }
136 | }
137 |
138 | function txfee () private returns (uint96 fee) {
139 | return uint96(100 * tx.gasprice);
140 | }
141 |
142 | function slice(bytes str, uint index, uint size) returns (bytes) {
143 | bytes newstr;
144 | uint rindex;
145 | if(size == 0 || index + size >= str.length){
146 | rindex = str.length;
147 | } else {
148 | rindex = index + size;
149 | }
150 | for(uint i=index; i< rindex; i++) {
151 | newstr[newstr.length++] = str[i];
152 | }
153 | return newstr;
154 | }
155 |
156 | modifier check_deposit {
157 | var rvalue = uint256(0);
158 | if(msg.value < deposit) {
159 | rvalue = msg.value;
160 | } else {
161 | rvalue = msg.value - deposit;
162 | _
163 | }
164 |
165 | refund(rvalue);
166 | }
167 | }
168 |
--------------------------------------------------------------------------------
/smart-contracts/daos/slock-it-democracy-dao.sol:
--------------------------------------------------------------------------------
1 | /*
2 | This creates a Democractic Autonomous Organization. Membership is based
3 | on ownership of custom tokens, which are used to vote on proposals.
4 |
5 | This contract is intended for educational purposes, you are fully responsible
6 | for compliance with present or future regulations of finance, communications
7 | and the universal rights of digital beings.
8 |
9 | Anyone is free to copy, modify, publish, use, compile, sell, or
10 | distribute this software, either in source code form or as a compiled
11 | binary, for any purpose, commercial or non-commercial, and by any
12 | means.
13 |
14 | In jurisdictions that recognize copyright laws, the author or authors
15 | of this software dedicate any and all copyright interest in the
16 | software to the public domain. We make this dedication for the benefit
17 | of the public at large and to the detriment of our heirs and
18 | successors. We intend this dedication to be an overt act of
19 | relinquishment in perpetuity of all present and future rights to this
20 | software under copyright law.
21 |
22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
26 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28 | OTHER DEALINGS IN THE SOFTWARE.
29 |
30 | For more information, please refer to
31 |
32 | */
33 |
34 | /*
35 | TODO:
36 | better debatingPeriod mechanism (based on amount, min, max, ...)
37 | include tx.data in proposal?
38 | min quorum / deposit
39 |
40 |
41 | */
42 |
43 | import "Crowdfunding.sol";
44 |
45 | contract DAOInterface {
46 | modifier onlyShareholders {}
47 |
48 | /// @dev Constructor setting the default service provider and the address for the contract able to create another DAO
49 | /// @param _defaultServiceProvider The default service provider
50 | /// @param _daoCreator The contract able to (re)create this DAO
51 | function _DAO(address _defaultServiceProvider, DAO_Creator _daoCreator) {} // the underscore is only because the constructor can not be overloaded
52 |
53 | /// @notice `msg.sender` creates a proposal to send `_etherAmount` ether to `_recipient` with the transaction data `_transactionBytecode`. (If this is true: `_newServiceProvider` , then this is a proposal the set `_recipient` as the new service provider)
54 | /// @param _recipient The address of the recipient of the proposed transaction
55 | /// @param _etherAmount The amount of ether to be sent with the proposed transaction
56 | /// @param _description A string descibing the proposal
57 | /// @param _transactionBytecode The data of the proposed transaction
58 | /// @param _newServiceProvider A bool defining whether this proposal is about a new service provider or not
59 | /// @return The proposal ID. Needed for voting on the proposal
60 | function newProposal(address _recipient, uint _etherAmount, string _description, bytes _transactionBytecode, bool _newServiceProvider) onlyShareholders returns (uint _proposalID) {}
61 |
62 | /// @notice Check that the proposal with the ID `_proposalID` matches a transaction which sends `_etherAmount` with this data: `_transactionBytecode` to `_recipient`
63 | /// @param _proposalID The proposal ID
64 | /// @param _recipient The recipient of the proposed transaction
65 | /// @param _etherAmount The amount of ether to be sent with the proposed transaction
66 | /// @param _transactionBytecode The data of the proposed transaction
67 | /// @return Whether the proposal ID matches the transaction data or not
68 | function checkProposalCode(uint _proposalID, address _recipient, uint _etherAmount, bytes _transactionBytecode) constant returns (bool _codeChecksOut) {}
69 |
70 | /// @notice Vote on proposal `_proposalID` with `_supportsProposal`
71 | /// @param _proposalID The proposal ID
72 | /// @param _supportsProposal Yes/No - support of the proposal
73 | /// @return The proposal ID.
74 | function vote(uint _proposalID, bool _supportsProposal) onlyShareholders returns (uint _voteID){}
75 |
76 | /// @notice Checks whether proposal `_proposalID` with transaction data `_transactionBytecode` has been voted for or against it, and executes the transaction in the case it has been voted for.
77 | /// @param _proposalID The proposal ID
78 | /// @param _transactionBytecode The data of the proposed transaction
79 | /// @return Whether the proposed transaction has been executed or not
80 | function executeProposal(uint _proposalID, bytes _transactionBytecode) returns (bool _success) {}
81 |
82 | /// @notice ATTENTION! I confirm to move my remaining funds to a new DAO with `_newServiceProvider` as the new service provider, as has been proposed in proposal `_proposalID`. This will burn the portion of my tokens according to the funds the DAO has already spent. This can not be undone and will split the DAO into two DAO's, with two underlying tokens.
83 | /// @param _proposalID The proposal ID
84 | /// @param _newServiceProvider The new service provider of the new DAO
85 | /// @dev This function, when called for the first time for this proposal, will create a new DAO and send the portion of the remaining funds which can be attributed to the sender to the new DAO. It will also burn the tokens of the sender according the unspent funds of the DAO.
86 | function confirmNewServiceProvider(uint _proposalID, address _newServiceProvider) {}
87 |
88 | /// @notice add new possible recipient `_recipient` for transactions from the DAO (through proposals)
89 | /// @param _recipient New recipient address
90 | /// @dev Can only be called by the current service provider
91 | function addAllowedAddress(address _recipient) external {}
92 |
93 | /// @notice change the depsoit needed to make a proposal to `_proposalDeposit`
94 | /// @param _proposalDeposit New proposal deposit
95 | /// @dev Can only be called by the service provider
96 | function changeProposalDeposit(uint _proposalDeposit) external {}
97 |
98 | event ProposalAdded(uint proposalID, address recipient, uint amount, string description);
99 | event Voted(uint proposalID, bool position, address voter);
100 | event ProposalTallied(uint proposalID, bool result, uint quorum, bool active);
101 | event NewServiceProvider(address _newServiceProvider);
102 | event AllowedRecipientAdded(address _recipient);
103 | }
104 |
105 | /* The democracy contract itself */
106 | contract DAO is DAOInterface, Token, Crowdfunding(500000 ether, now + 42 days) { // I would rather use the dynamic initialization instead of the static one (see construcitor), but doesn't work yet, due to a bug in Solidity
107 |
108 | /* Contract Variables and events */
109 | Proposal[] public proposals;
110 | uint public numProposals;
111 | uint dividends;
112 |
113 | address serviceProvider;
114 | address[] allowedRecipients;
115 |
116 | // deposit in Ether to be paid for each proposal
117 | uint proposalDeposit;
118 |
119 | DAO_Creator daoCreator;
120 |
121 | struct Proposal {
122 | address recipient;
123 | uint amount;
124 | string description;
125 | uint votingDeadline;
126 | bool openToVote;
127 | bool proposalPassed;
128 | uint numberOfVotes;
129 | bytes32 proposalHash;
130 | bool newServiceProvider;
131 | DAO newDAO;
132 | Vote[] votes;
133 | mapping (address => bool) voted;
134 | address creator;
135 | }
136 |
137 | struct Vote {
138 | bool inSupport;
139 | address voter;
140 | }
141 |
142 | // modifier that allows only shareholders to vote and create new proposals
143 | modifier onlyShareholders {
144 | if (balanceOf(msg.sender) == 0) throw;
145 | _
146 | }
147 |
148 |
149 | // modifier that allows only the servie provider to add new allowed addresses and change the proposal deposit
150 | modifier onlyServiceProvider {
151 | if (msg.sender != serviceProvider) throw;
152 | _
153 | }
154 |
155 |
156 | function() {
157 | dividends += msg.value;
158 | }
159 |
160 | // I would rather use the dynamic initialization instead of the static one (see declaration above), but doesn't work yet, due to a bug in Solidity
161 | //function DAO(address defaultServiceProvider, DAO_Creator _daoCreator, uint _minValue, uint _closingTime) Crowdfunding(_minValue, _closingTime) {
162 | function DAO(address _defaultServiceProvider, DAO_Creator _daoCreator) {
163 | serviceProvider = _defaultServiceProvider;
164 | daoCreator = _daoCreator;
165 | proposalDeposit = 100 ether;
166 | }
167 |
168 |
169 | function newProposal(address _recipient, uint _etherAmount, string _description, bytes _transactionBytecode, bool _newServiceProvider) onlyShareholders returns (uint _proposalID) {
170 | // check sanity
171 | if (_newServiceProvider && (_etherAmount != 0 || _transactionBytecode.length != 0 || _recipient == serviceProvider)) {
172 | throw;
173 | }
174 | else if (!isRecipientAllowed(_recipient)) throw;
175 |
176 | if (!funded || msg.value < proposalDeposit) throw;
177 |
178 | _proposalID = proposals.length++;
179 | Proposal p = proposals[_proposalID];
180 | p.recipient = _recipient;
181 | p.amount = _etherAmount;
182 | p.description = _description;
183 | p.proposalHash = sha3(_recipient, _etherAmount, _transactionBytecode);
184 | p.votingDeadline = now + debatingPeriod(_newServiceProvider, _etherAmount * 1 ether);
185 | p.openToVote = true;
186 | p.proposalPassed = false;
187 | p.numberOfVotes = 0;
188 | p.newServiceProvider = _newServiceProvider;
189 | p.creator = msg.sender;
190 | ProposalAdded(_proposalID, _recipient, _etherAmount, _description);
191 | numProposals = _proposalID + 1;
192 | }
193 |
194 |
195 | function checkProposalCode(uint _proposalNumber, address _recipient, uint _etherAmount, bytes _transactionBytecode) constant returns (bool _codeChecksOut) {
196 | Proposal p = proposals[_proposalNumber];
197 | return p.proposalHash == sha3(_recipient, _etherAmount, _transactionBytecode);
198 | }
199 |
200 |
201 | function vote(uint _proposalNumber, bool _supportsProposal) onlyShareholders returns (uint _voteID){
202 | Proposal p = proposals[_proposalNumber];
203 | if (p.voted[msg.sender] == true) throw;
204 |
205 | _voteID = p.votes.length++;
206 | p.votes[_voteID] = Vote({inSupport: _supportsProposal, voter: msg.sender});
207 | p.voted[msg.sender] = true;
208 | p.numberOfVotes = _voteID + 1;
209 | Voted(_proposalNumber, _supportsProposal, msg.sender);
210 | }
211 |
212 |
213 | function executeProposal(uint _proposalNumber, bytes _transactionBytecode) returns (bool _success) {
214 | Proposal p = proposals[_proposalNumber];
215 | // Check if the proposal can be executed
216 | if (now < p.votingDeadline // has the voting deadline arrived?
217 | || !p.openToVote // has it been already executed?
218 | || p.proposalHash != sha3(p.recipient, p.amount, _transactionBytecode) // Does the transaction code match the proposal?
219 | || p.newServiceProvider) // is it a new service provider proposal
220 | throw;
221 |
222 | // tally the votes
223 | uint quorum = 0;
224 | uint yea = 0;
225 | uint nay = 0;
226 |
227 | for (uint i = 0; i < p.votes.length; ++i) {
228 | Vote v = p.votes[i];
229 | uint voteWeight = balanceOf(v.voter);
230 | quorum += voteWeight;
231 | if (v.inSupport)
232 | yea += voteWeight;
233 | else
234 | nay += voteWeight;
235 | }
236 | // execute result
237 | if (quorum >= minQuorum(p.newServiceProvider, p.amount) && yea > nay ) {
238 | // has quorum and was approved
239 | if (p.recipient.call.value(p.amount * 1 ether)(_transactionBytecode)) {
240 | p.openToVote = false;
241 | p.proposalPassed = true;
242 | _success = true;
243 | p.creator.send(proposalDeposit);
244 | }
245 | } else if (quorum >= minQuorum(p.newServiceProvider, p.amount) && nay > yea) {
246 | p.openToVote = false;
247 | p.proposalPassed = false;
248 | p.creator.send(proposalDeposit);
249 | }
250 | // fire event
251 | ProposalTallied(_proposalNumber, _success, quorum, p.openToVote);
252 | }
253 |
254 |
255 | function confirmNewServiceProvider(uint _proposalNumber, address _newServiceProvider) onlyShareholders {
256 | Proposal p = proposals[_proposalNumber];
257 | // sanity check
258 | if (now < p.votingDeadline /* has the voting deadline arrived? */
259 | || p.proposalHash != sha3(p.recipient, 0, 0) /* Does the transaction code match the proposal? */
260 | || !p.newServiceProvider // is it a new service provider proposale
261 | || p.recipient != _newServiceProvider)
262 | throw;
263 |
264 | // if not already happend, create new DAO
265 | if (address(p.newDAO) == 0)
266 | p.newDAO = createNewDAO(_newServiceProvider);
267 |
268 | // move funds and assign new Tokens
269 | p.newDAO.buyTokenProxy.value(balanceOf(msg.sender) * this.balance / (totalAmountReceived + dividends))(msg.sender);
270 |
271 | // burn Slock tokens
272 | balances[msg.sender] *= (1 - this.balance / (totalAmountReceived + dividends));
273 | }
274 |
275 |
276 | function addAllowedAddress(address _recipient) onlyServiceProvider external {
277 | allowedRecipients.push(_recipient);
278 | }
279 |
280 |
281 | function changeProposalDeposit(uint _proposalDeposit) onlyServiceProvider external {
282 | proposalDeposit = _proposalDeposit;
283 | }
284 |
285 |
286 | function isRecipientAllowed(address recipient) internal returns (bool _isAllowed) {
287 | if (recipient == serviceProvider)
288 | return true;
289 | for (uint i = 0; i < allowedRecipients.length; ++i) {
290 | if (recipient == allowedRecipients[i])
291 | return true;
292 | }
293 | return false;
294 | }
295 |
296 |
297 | function debatingPeriod(bool _newServiceProvider, uint _value) internal returns (uint _debatingPeriod) {
298 | if (_newServiceProvider)
299 | return 61 days;
300 | else
301 | return 1 weeks + (_value * 31 days) / totalAmountReceived;
302 | }
303 |
304 |
305 | function minQuorum(bool _newServiceProvider, uint _value) internal returns (uint _minQuorum) {
306 | if (_newServiceProvider)
307 | return totalAmountReceived / 2;
308 | else
309 | return totalAmountReceived / 5 + _value / 3;
310 | }
311 |
312 |
313 | function createNewDAO(address _newServiceProvider) internal returns (DAO _newDAO) {
314 | NewServiceProvider(_newServiceProvider);
315 | return daoCreator.createDAO(_newServiceProvider, daoCreator);
316 | }
317 | }
318 |
319 | contract DAO_Creator {
320 | function createDAO(address _defaultServiceProvider, DAO_Creator _daoCreator) returns (DAO _newDAO) {
321 | return new DAO(_defaultServiceProvider, _daoCreator);
322 | }
323 | }
324 |
--------------------------------------------------------------------------------
/smart-contracts/daos/swarm-basic-income-dao.sol:
--------------------------------------------------------------------------------
1 |
2 | // Tweaked version
3 |
4 | /* The token is used as a voting shares */
5 | contract token { mapping (address => uint256) public balanceOf; }
6 |
7 | /* The democracy contract itself */
8 | contract Democracy {
9 |
10 | /* Contract Variables and events */
11 | uint public minimumQuorum;
12 | uint public debatingPeriodInMinutes;
13 | Proposal[] public proposals;
14 | uint public numProposals;
15 | token public sharesTokenAddress;
16 |
17 | event ProposalAdded(uint proposalID, address recipient, uint amount, string description);
18 | event Voted(uint proposalID, bool position, address voter);
19 | event ProposalTallied(uint proposalID, int result, uint quorum, bool active);
20 |
21 | struct Proposal {
22 | address recipient;
23 | uint amount;
24 | string description;
25 | uint votingDeadline;
26 | bool openToVote;
27 | bool proposalPassed;
28 | uint numberOfVotes;
29 | bytes32 proposalHash;
30 | Vote[] votes;
31 | mapping (address => bool) voted;
32 | }
33 |
34 | struct Vote {
35 | bool inSupport;
36 | address voter;
37 | }
38 |
39 | /* modifier that allows only shareholders to vote and create new proposals */
40 | modifier onlyShareholders {
41 | if (sharesTokenAddress.balanceOf(msg.sender) == 0) throw;
42 | _
43 | }
44 |
45 | /* First time setup */
46 | function Democracy(token sharesAddress, uint minimumSharesForVoting, uint minutesForDebate) {
47 | sharesTokenAddress = token(sharesAddress);
48 | if (minimumSharesForVoting == 0 ) minimumSharesForVoting = 1;
49 | minimumQuorum = minimumSharesForVoting;
50 | debatingPeriodInMinutes = minutesForDebate;
51 | }
52 |
53 | /* Function to create a new proposal */
54 | function newProposal(address beneficiary, uint etherAmount, string JobDescription, bytes transactionBytecode) onlyShareholders returns (uint proposalID) {
55 | proposalID = proposals.length++;
56 | Proposal p = proposals[proposalID];
57 | p.recipient = beneficiary;
58 | p.amount = etherAmount;
59 | p.description = JobDescription;
60 | p.proposalHash = sha3(beneficiary, etherAmount, transactionBytecode);
61 | p.votingDeadline = now + debatingPeriodInMinutes * 1 minutes;
62 | p.openToVote = true;
63 | p.proposalPassed = false;
64 | p.numberOfVotes = 0;
65 | ProposalAdded(proposalID, beneficiary, etherAmount, JobDescription);
66 | numProposals = proposalID+1;
67 | }
68 |
69 | /* function to check if a proposal code matches */
70 | function checkProposalCode(uint proposalNumber, address beneficiary, uint etherAmount, bytes transactionBytecode) constant returns (bool codeChecksOut) {
71 | Proposal p = proposals[proposalNumber];
72 | return p.proposalHash == sha3(beneficiary, etherAmount, transactionBytecode);
73 | }
74 |
75 | /* */
76 | function vote(uint proposalNumber, bool supportsProposal) onlyShareholders returns (uint voteID){
77 | Proposal p = proposals[proposalNumber];
78 | if (p.voted[msg.sender] == true) throw;
79 |
80 | voteID = p.votes.length++;
81 | p.votes[voteID] = Vote({inSupport: supportsProposal, voter: msg.sender});
82 | p.voted[msg.sender] = true;
83 | p.numberOfVotes = voteID +1;
84 | Voted(proposalNumber, supportsProposal, msg.sender);
85 | }
86 |
87 | function executeProposal(uint proposalNumber, bytes transactionBytecode) returns (int result) {
88 | Proposal p = proposals[proposalNumber];
89 | /* Check if the proposal can be executed */
90 | if (now < p.votingDeadline /* has the voting deadline arrived? */
91 | || !p.openToVote /* has it been already executed? */
92 | || p.proposalHash != sha3(p.recipient, p.amount, transactionBytecode)) /* Does the transaction code match the proposal? */
93 | throw;
94 |
95 | /* tally the votes */
96 | uint quorum = 0;
97 | uint yea = 0;
98 | uint nay = 0;
99 |
100 | for (uint i = 0; i < p.votes.length; ++i) {
101 | Vote v = p.votes[i];
102 | uint voteWeight = sharesTokenAddress.balanceOf(v.voter);
103 | quorum += voteWeight;
104 | if (v.inSupport) {
105 | yea += voteWeight;
106 | } else {
107 | nay += voteWeight;
108 | }
109 | }
110 | /* execute result */
111 | if (quorum > minimumQuorum && yea > nay ) {
112 | // has quorum and was approved
113 | p.recipient.call.value(p.amount*1000000000000000000)(transactionBytecode);
114 | p.openToVote = false;
115 | p.proposalPassed = true;
116 | } else if (quorum > minimumQuorum && nay > yea) {
117 | p.openToVote = false;
118 | p.proposalPassed = false;
119 | }
120 | /* Fire Events */
121 | ProposalTallied(proposalNumber, result, quorum, p.openToVote);
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/smart-contracts/daos/swarm-democracy-dao.sol:
--------------------------------------------------------------------------------
1 |
2 | // Tweaked version
3 |
4 | /* The token is used as a voting shares */
5 | contract token { mapping (address => uint256) public balanceOf; }
6 |
7 | /* The democracy contract itself */
8 | contract Democracy {
9 |
10 | /* Contract Variables and events */
11 | uint public minimumQuorum;
12 | uint public debatingPeriodInMinutes;
13 | Proposal[] public proposals;
14 | uint public numProposals;
15 | token public sharesTokenAddress;
16 |
17 | event ProposalAdded(uint proposalID, address recipient, uint amount, string description);
18 | event Voted(uint proposalID, bool position, address voter);
19 | event ProposalTallied(uint proposalID, int result, uint quorum, bool active);
20 |
21 | struct Proposal {
22 | address recipient;
23 | uint amount;
24 | string description;
25 | uint votingDeadline;
26 | bool openToVote;
27 | bool proposalPassed;
28 | uint numberOfVotes;
29 | bytes32 proposalHash;
30 | Vote[] votes;
31 | mapping (address => bool) voted;
32 | }
33 |
34 | struct Vote {
35 | bool inSupport;
36 | address voter;
37 | }
38 |
39 | /* modifier that allows only shareholders to vote and create new proposals */
40 | modifier onlyShareholders {
41 | if (sharesTokenAddress.balanceOf(msg.sender) == 0) throw;
42 | _
43 | }
44 |
45 | /* First time setup */
46 | function Democracy(token sharesAddress, uint minimumSharesForVoting, uint minutesForDebate) {
47 | sharesTokenAddress = token(sharesAddress);
48 | if (minimumSharesForVoting == 0 ) minimumSharesForVoting = 1;
49 | minimumQuorum = minimumSharesForVoting;
50 | debatingPeriodInMinutes = minutesForDebate;
51 | }
52 |
53 | /* Function to create a new proposal */
54 | function newProposal(address beneficiary, uint etherAmount, string JobDescription, bytes transactionBytecode) onlyShareholders returns (uint proposalID) {
55 | proposalID = proposals.length++;
56 | Proposal p = proposals[proposalID];
57 | p.recipient = beneficiary;
58 | p.amount = etherAmount;
59 | p.description = JobDescription;
60 | p.proposalHash = sha3(beneficiary, etherAmount, transactionBytecode);
61 | p.votingDeadline = now + debatingPeriodInMinutes * 1 minutes;
62 | p.openToVote = true;
63 | p.proposalPassed = false;
64 | p.numberOfVotes = 0;
65 | ProposalAdded(proposalID, beneficiary, etherAmount, JobDescription);
66 | numProposals = proposalID+1;
67 | }
68 |
69 | /* function to check if a proposal code matches */
70 | function checkProposalCode(uint proposalNumber, address beneficiary, uint etherAmount, bytes transactionBytecode) constant returns (bool codeChecksOut) {
71 | Proposal p = proposals[proposalNumber];
72 | return p.proposalHash == sha3(beneficiary, etherAmount, transactionBytecode);
73 | }
74 |
75 | /* */
76 | function vote(uint proposalNumber, bool supportsProposal) onlyShareholders returns (uint voteID){
77 | Proposal p = proposals[proposalNumber];
78 | if (p.voted[msg.sender] == true) throw;
79 |
80 | voteID = p.votes.length++;
81 | p.votes[voteID] = Vote({inSupport: supportsProposal, voter: msg.sender});
82 | p.voted[msg.sender] = true;
83 | p.numberOfVotes = voteID +1;
84 | Voted(proposalNumber, supportsProposal, msg.sender);
85 | }
86 |
87 | function executeProposal(uint proposalNumber, bytes transactionBytecode) returns (int result) {
88 | Proposal p = proposals[proposalNumber];
89 | /* Check if the proposal can be executed */
90 | if (now < p.votingDeadline /* has the voting deadline arrived? */
91 | || !p.openToVote /* has it been already executed? */
92 | || p.proposalHash != sha3(p.recipient, p.amount, transactionBytecode)) /* Does the transaction code match the proposal? */
93 | throw;
94 |
95 | /* tally the votes */
96 | uint quorum = 0;
97 | uint yea = 0;
98 | uint nay = 0;
99 |
100 | for (uint i = 0; i < p.votes.length; ++i) {
101 | Vote v = p.votes[i];
102 | uint voteWeight = sharesTokenAddress.balanceOf(v.voter);
103 | quorum += voteWeight;
104 | if (v.inSupport) {
105 | yea += voteWeight;
106 | } else {
107 | nay += voteWeight;
108 | }
109 | }
110 | /* execute result */
111 | if (quorum > minimumQuorum && yea > nay ) {
112 | // has quorum and was approved
113 | p.recipient.call.value(p.amount*1000000000000000000)(transactionBytecode);
114 | p.openToVote = false;
115 | p.proposalPassed = true;
116 | } else if (quorum > minimumQuorum && nay > yea) {
117 | p.openToVote = false;
118 | p.proposalPassed = false;
119 | }
120 | /* Fire Events */
121 | ProposalTallied(proposalNumber, result, quorum, p.openToVote);
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/smart-contracts/reputation/iubex.github.sol:
--------------------------------------------------------------------------------
1 |
2 | //See: https://github.com/iudex/iudex/blob/master/contracts/github.sol
3 |
4 | //
5 | // This contract will validate that a github gist url:
6 | // 1) corresponds to a given username
7 | // 2) containts an expected message (the user identifier)
8 | //
9 |
10 | import "accountProviderBase.sol";
11 |
12 | contract Github is accountProviderBase {
13 | Lookup lookup;
14 |
15 | address owner;
16 |
17 | modifier owneronly { if (msg.sender == owner) _ }
18 |
19 | function setOwner(address addr) owneronly {
20 | owner = addr;
21 | }
22 |
23 | function Github() {
24 | owner = msg.sender;
25 | }
26 |
27 | function setLookup(address addr) owneronly {
28 | lookup = Lookup(addr);
29 | }
30 |
31 | // map the expected identifier to an oraclize identifier
32 | mapping (bytes32 => bytes32) expectedId;
33 |
34 | // callback from oraclize with the result, let the storage contract know
35 | function __callback(bytes32 myid, string result, bytes proof) {
36 | if (msg.sender != oraclize_cbAddress()) throw;
37 |
38 | // this is basically a bytes32 to hexstring piece
39 | string memory expected = iudexIdToString(expectedId[myid]);
40 | bool asExpected = indexOf(result, expected) > -1;
41 | Storage(lookup.addrStorage()).updateAccount(lookup.accountProvider_GITHUB(), expectedId[myid], asExpected, myid);
42 | delete expectedId[myid];
43 | }
44 |
45 | function score(bytes32 id, string userId) coupon("HackEtherCamp") {
46 | throw;
47 | }
48 |
49 | // ensure that the proofLocation corresponds to a gist.github.com URL for the user `userId`
50 | function verifyUrl(string userId, string proofLocation) internal returns (bool){
51 | bytes memory _userId = bytes(userId);
52 | string memory githubPrefix = "://gist.github.com/";
53 | bytes memory _githubPrefix = bytes(githubPrefix);
54 | string memory urlHead = new string(_githubPrefix.length + _userId.length + 1);
55 | bytes memory _urlHead = bytes(urlHead);
56 | uint i = 0;
57 | for (uint j = 0; j < _githubPrefix.length; j++)
58 | _urlHead[i++] = _githubPrefix[j];
59 | for (j = 0; j < _userId.length; j++)
60 | _urlHead[i++] = _userId[j];
61 | _urlHead[i++] = byte("/");
62 |
63 | if (indexOf(proofLocation, string(_urlHead)) == -1)
64 | return false;
65 |
66 | return true;
67 | }
68 |
69 | // start the verification process and call oraclize with the URL
70 | function verify(bytes32 id, string userId, string proofLocation) coupon("HackEtherCamp") {
71 | // check that userId matches the username in proofLocation
72 | if (!verifyUrl(userId, proofLocation))
73 | throw;
74 |
75 | // build up the request string
76 | string memory head = "html(";
77 | bytes memory _head = bytes(head);
78 | string memory tail = ").xpath(//*[contains(@class, 'blob-code')]/text())";
79 | bytes memory _tail = bytes(tail);
80 |
81 | bytes memory _gistUrl = bytes(proofLocation);
82 |
83 | string memory query = new string(_head.length + _tail.length + _gistUrl.length + 2);
84 | bytes memory _query = bytes(query);
85 | uint i = 0;
86 | for (uint j = 0; j < _head.length; j++)
87 | _query[i++] = _head[j];
88 | for (j = 0; j < _gistUrl.length; j++)
89 | _query[i++] = _gistUrl[j];
90 | for (j = 0; j < _tail.length; j++)
91 | _query[i++] = _tail[j];
92 | _query[i++] = 0;
93 |
94 | oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS);
95 | bytes32 oraclizeId = oraclize_query("URL", query);
96 | expectedId[oraclizeId] = id;
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/smart-contracts/reputation/trustdavis.se:
--------------------------------------------------------------------------------
1 | // Via Ethercasts (https://raw.githubusercontent.com/EtherCasts/trustdavis/master/contracts/references.se)
2 |
3 | # Reference database
4 | # - insurer, object, max/available liability, fee
5 | #
6 | # No False Claims scenario
7 |
8 | shared:
9 | FACTORY = 0x10
10 |
11 | INSURED_OFFSET = 2 ** 160
12 |
13 | R_MAX_LIABILITY = 0
14 | R_LOCKED = 1
15 | R_PREMIUM = 2
16 | R_LAST_UPDATED = 3
17 | RECORD_SIZE = 4
18 |
19 | E_INVALID_CMD = 900
20 | E_INVALID_INSURED_ADDRESS = 901
21 | E_INVALID_INSURER_ADDRESS = 902
22 | E_INVALID_AMOUNT = 903
23 | E_RECORD_NOT_FOUND = 910
24 | E_PREMIUM_MISMATCH = 920
25 | E_NO_AVAILABLE_LIABILITY_FOR_INSURED = 921
26 | E_NO_AVAILABLE_LIABILITY_FOR_INSURER = 922
27 | E_NOT_IMPLEMENTED = 999
28 |
29 | init:
30 | contract.storage[FACTORY] = msg.sender
31 |
32 | code:
33 | cmd = msg.data[0]
34 | if cmd == "suicide" and msg.sender == contract.storage[FACTORY]:
35 | suicide(msg.sender)
36 |
37 | elif cmd == "deposit" and msg.value > 0:
38 | contract.storage[msg.sender + R_MAX_LIABILITY] += msg.value
39 | return(1)
40 |
41 | elif cmd == "withdraw":
42 | amount = msg.data[1]
43 | if amount == 0:
44 | return(E_INVALID_AMOUNT)
45 |
46 | insurer_max_liability = contract.storage[msg.sender + R_MAX_LIABILITY]
47 | insurer_locked = contract.storage[msg.sender + R_LOCKED]
48 |
49 | if amount > insurer_max_liability - insurer_locked:
50 | return(E_NO_AVAILABLE_LIABILITY_FOR_INSURER)
51 |
52 | contract.storage[msg.sender + R_MAX_LIABILITY] -= amount
53 | send(msg.sender, amount)
54 | return(1)
55 |
56 | elif cmd == "set": # set reference
57 | insured = msg.data[1]
58 | max_liability = msg.data[2]
59 | premium = msg.data[3]
60 |
61 | if insured == 0 or insured >= 2 ** 160:
62 | return(E_INVALID_INSURED_ADDRESS)
63 |
64 | insured_idx = msg.sender * INSURED_OFFSET + insured * RECORD_SIZE
65 | contracts.storage[insured_idx + R_MAX_LIABILITY] = max_liability
66 | contracts.storage[insured_idx + R_PREMIUM] = premium
67 | contracts.storage[insured_idx + R_LAST_UPDATED] = block.timestamp
68 |
69 | # TODO add list of references
70 | return(1)
71 |
72 | elif cmd == "lock": # lock a reference
73 | insured = msg.data[1]
74 | liability = msg.data[2]
75 | premium = msg.data[3]
76 |
77 | if insured == 0 or insured >= 2 ** 160:
78 | return(E_INVALID_INSURED_ADDRESS)
79 |
80 | insured_idx = msg.sender * INSURED_OFFSET + insured * RECORD_SIZE
81 | if contract.storage[insured_idx + R_LAST_UPDATED] == 0:
82 | return(E_RECORD_NOT_FOUND)
83 |
84 | if premium != contract.storage[insured_idx + R_PREMIUM]:
85 | # premium mismatch
86 | return(E_PREMIUM_MISMATCH)
87 |
88 | # TODO charge premium
89 |
90 | insured_max_liability = contracts.storage[insured_idx + R_MAX_LIABILITY]
91 | insured_locked = contracts.storage[insured_idx + R_LOCKED]
92 | if liability > insured_max_liability - insured_locked:
93 | return(E_NO_AVAILABLE_LIABILITY_FOR_INSURED)
94 |
95 | insurer_max_liability = contract.storage[msg.sender + R_MAX_LIABILITY]
96 | insurer_locked = contract.storage[msg.sender + R_LOCKED]
97 | if liability > insurer_max_liability - insurer_locked:
98 | return(E_NO_AVAILABLE_LIABILITY_FOR_INSURER)
99 |
100 | contract.storage[insured_idx + R_LOCKED] += liability
101 | contract.storage[msg.sender + R_LOCKED] += liability
102 |
103 | return(1)
104 |
105 | elif cmd == "release": # release a reference
106 | insured = msg.data[1]
107 | liability = msg.data[2]
108 | success = msg.data[3]
109 |
110 | if insured == 0 or insured >= 2 ** 160:
111 | return(E_INVALID_INSURED_ADDRESS)
112 |
113 | insured_idx = msg.sender * INSURED_OFFSET + insured * RECORD_SIZE
114 | if contract.storage[insured_idx + R_LAST_UPDATED] == 0:
115 | return(E_RECORD_NOT_FOUND)
116 |
117 | contract.storage[insured_idx + R_LOCKED] -= liability
118 | contract.storage[msg.sender + R_LOCKED] -= liability
119 |
120 | if success == 0:
121 | contract.storage[insured_idx + R_MAX_LIABILITY] -= liability
122 | contract.storage[msg.sender + R_MAX_LIABILITY] -= liability
123 |
124 | # TODO pay to insured / claimant
125 |
126 | return(1)
127 |
128 | return(E_INVALID_CMD)
129 |
--------------------------------------------------------------------------------
/whitepaper.md:
--------------------------------------------------------------------------------
1 | New whitepaper in progress: https://www.dropbox.com/s/ramz8scma26mk4y/Network_State_Whitepaper%20%200.2.5.pdf?dl=0
2 |
3 | One very cool thing about the evolving distributed autonomous organization (DAC/DAO) layer on top of cryptocurrencies is that it increasingly allows programmable governance.
4 |
5 | This paper includes my best thoughts on an optimal approach. It is partially an attempt to resolve the tension that for most projects there is an early need for centralization (i.e. classic startup) vs. the legitimate desire to have more voices heard as things evolve. Many projects also need funding in order to get started and need to accomodate investor interests.
6 |
7 | Here are some existing models:
8 |
9 | * Current corporate model is investors decide via board seat allocation. You only have an opening once you hit IPO, but there are severe barriers to IPO which seem to be increasing.
10 |
11 | * Cooperative model and non-profits I perceive as extremely inefficient in the early stages. Among other things they need a board, have high initial costs, and don't scale internationally.
12 |
13 | * Some cryptocurrencies have a "founder lock" on fund received via multi-sig, which is cool but doesn't exactly address the issue of evolved control over time and generally assumes static decision makers. Actual decision making is a bit vague at this point and not captured in the protocol layer.
14 |
15 | My optimal model is something like:
16 |
17 | * All major "board level" decisions captured in blockchain format.
18 | * "Board level" decisions decide allocation of funds, which then go into pools
19 | * Pools of funds allocated to individuals/projects can each have one or many decision makers. Once allocated pools have complete autonomy.
20 | * "Boards" have the following decision-makers, "founders," "investors," "users."
21 | * Voting is handled by a two-tiered process in which each group allowed one or more proxies. Those proxies become a board. This board then makes relevant decisions.
22 |
23 | To illustrate, here's a sample timeline:
24 |
25 | *time 0.* board members 1. founder 1.
26 |
27 | *time + 30 days.* fundraiser, reception of $5M. all investors vote, elect a board member. board members 2. founder 1. lead investor 1.
28 |
29 | *time + 31 days.* 2 board members unanimously vote to create $1.5M pool for founder.
30 |
31 | *time + 32 days.* Founder hires 5 full time staff to build cool shit. Approves various related expenses.
32 |
33 | *time + 180 days.* Project has 2 million verified accounts. board is expanded to 3 members. Users vote and elect a representative. Voting is as follows. Anyone can nominate themselves up until 7 days prior to election. The person with the most votes wins. Serves 12 month term.
34 |
35 | *time + 181 days.* Board debates and unanimously decides to disperse an additional $2.5M.
36 |
37 | *time + 182 days.* 15 more people hired. Various other expenses approved.
38 |
39 | *time + 365 days.* 50 million verified accounts. Board increases to 4, 1 founder, 1 investor, 2 user. New election for new user board.
40 |
41 | *time + 366 days.* Board votes 3/4 to open a new fund-raising round, seeking an additional $20M.
42 |
43 | *time + 400 days.* $20M received, new investor election, new board position. Board increase to 5. 1 founder, 2 investor, 2 user.
44 |
45 | Open questions:
46 |
47 | * Can the number of board members automatically scale to the appropriate number? Is this linear with respect to time or with respect to some other quantity (i.e. amount of funds and/or users)
48 | * What's the length of time for positions? Can this also be programmable?
49 | * How can you verify users (i.e. not allow fake accounts)?
50 | * Can the voting also be handled on the blockchain?
51 | * Is board one person one vote or can/should votes be weighted?
52 | * How does this ideally evolve after the initial stages? Linear increase in board members?
53 | * Is this just a nice idea or can this be programmed into a metacoin or Ethereum?
54 |
55 |
56 | ====
57 |
58 | As of May 2015 this now has an implementatation: https://swarm.fund/projects/BoardRoom_1430510379
59 |
60 |
--------------------------------------------------------------------------------
/whitepapers/Game_of_MetaLife 0.33.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fractastical/distributed-governance/094f689f071ccb0c0498db19608de2b1debd0d5b/whitepapers/Game_of_MetaLife 0.33.pdf
--------------------------------------------------------------------------------
/whitepapers/Network_State_Whitepaper 0.2.5.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fractastical/distributed-governance/094f689f071ccb0c0498db19608de2b1debd0d5b/whitepapers/Network_State_Whitepaper 0.2.5.pdf
--------------------------------------------------------------------------------
/whitepapers/Network_State_Whitepaper.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fractastical/distributed-governance/094f689f071ccb0c0498db19608de2b1debd0d5b/whitepapers/Network_State_Whitepaper.pdf
--------------------------------------------------------------------------------
/whitepapers/dbrain.md:
--------------------------------------------------------------------------------
1 |
2 | The full implications of a decentralized system are revealed when we explore fully emergent ecosystems.
3 |
4 | In particular, a fully emergent ecosystem needs two congrous and complementary elements.
5 |
6 | 1) A distributed informational system
7 | 2) A distributed reputational system.
8 |
9 | Although to a certain extent the "internet" is (1) and Bitcoin is an initial version of a value transfer that is an evolution out of a "currency model", with ipfs and ethereum we have much more highly evolved versions of both. But we have not gone all the way.
10 |
11 | As discussed in the ["green ether" proposal]( https://github.com/fractastical/etherea/blob/master/green_ether.md) reputational systems can now evolve a dynamic and distributed network topology by the same means that may supervene and obviate money itself.
12 |
13 | The consequence of this is that information now can have embedded value creation and transfer independent of money and not reliant on any centralized proxy. You can have complete dynamism in the creation of valuechains that you have in biology. The microbe can grow and express value internally and continually change its "neural network" as the organism evolves with more complex needs.
14 |
15 | While biology had these properties, we have only witnessed rapid evolution in the petri dish and not in "field conditions." However, with this effective ability to build neural systems with emergent properties, we can witness the dramatic increase in evolutionary capability and speed -- something hitherto described as a singularity.
16 |
17 | The conclusions of this are phenomenal, in the sense that we have what approximates a distributed neural network.
18 |
19 | That is to say, we have a dbrain.
20 |
--------------------------------------------------------------------------------
/whitepapers/main.bib:
--------------------------------------------------------------------------------
1 |
2 | @article{shillerkeynes,
3 | author = "Robert Shiller",
4 | title = "On Wall St., a Keynesian Beauty Contest",
5 | journal = "New York Times",
6 | year = "2011",
7 | howpublished={\url{http://www.nytimes.com/2011/09/04/business/economy/on-wall-st-a-keynesian-beauty-contest.html}},
8 |
9 | }
10 |
11 | @misc{koestlersleep,
12 | author = "Arthur Koestler",
13 | title = "The Sleepwalkers: A History of Man's Changing Vision of the Universe",
14 | year = "1959"
15 | }
16 |
17 | @book{wilbereberything,
18 | author = "Ken Wilber",
19 | title = "A Theory of Everything: An Integral Vision for Business, Politics, Science and Spirituality",
20 | year = "2001"
21 | }
22 |
23 |
24 | @misc{thielcheat,
25 | author = "Mick Brown (Telegraph)",
26 | title = "Peter Thiel: the billionaire tech entrepreneur on a mission to cheat death",
27 | howpublished={\url{http://www.telegraph.co.uk/technology/11098971/Peter-Thiel-the-billionaire-tech-entrepreneur-on-a-mission-to-cheat-death.html}},
28 |
29 | }
30 |
31 |
32 |
33 | @misc{jefferson,
34 | author = "Thomas Jefferson",
35 | title = "Letter to William Stephens Smith",
36 | year="1787"
37 | }
38 |
39 |
40 | @misc{trustexchangegithub,
41 | author = "Harlan Wood and Joel Dietz",
42 | title = "Trust Exchange Documentation",
43 | howpublished={\url{http://trust.exchange}},
44 | }
45 |
46 | @misc{greenetherpaper,
47 | author = "Joel Dietz",
48 | title = "Green Ether Proposal"
49 | }
50 |
51 |
52 | @misc{backfeedwhitepaper,
53 | author = "PdF, Field",
54 | title = "Backfeed Whitepaper",
55 | howpublished={\url{https://github.com/Backfeed/documents/blob/master/whitepaper_objective_protocol.pdf}},
56 | }
57 |
58 |
59 | @misc{buterinfutarchy,
60 | author = "Vitalik Buterin",
61 | title = "{An Introduction to Futarchy}",
62 | year = "2014",
63 | howpublished={\url{https://blog.ethereum.org/2014/08/21/introduction-futarchy}}
64 | }
65 |
66 |
67 |
68 | @misc{szabobitgold,
69 | author = "Nick Szabo",
70 | title = "{Bit Gold}",
71 | year = "2008",
72 | howpublished={\url{http://unenumerated.blogspot.com/2005/12/bit-gold.html}}
73 |
74 | }
75 |
76 | @misc{buterinethersale,
77 | author = "Vitalik Buterin",
78 | title = "{Ether Sale: A Statistical Overview}",
79 | year = "2014",
80 | date = "August 8th",
81 | howpublished={\url{https://blog.ethereum.org/2014/08/08/ether-sale-a-statistical-overview/}}
82 |
83 | }
84 |
85 | @misc{lovenestguide,
86 | author = "Joel Dietz and Marion Vogel",
87 | title = "{Love Nest Guide}",
88 | howpublished={\url{https://docs.google.com/document/u/1/d/19rraBCqvhrpDgZbRWK97Jxu4D-BCTYhCB83P-6g1KbA}}
89 |
90 | }
91 |
92 | @misc{smartcontractdesignpatterns,
93 | author = "Joel Dietz and Joris Bontje",
94 | title = "{Smart Contract Design Patterns (Devcon 1)}"
95 | }
96 |
97 |
98 | @misc{outofcontrol,
99 | author = "Kevin Kelly",
100 | title = "{Out Of Control: The New Biology Of Machines, Social Systems, And The Economic World}",
101 | year = 1994
102 | }
103 |
104 |
105 | @misc{merkledao,
106 | author = "Ralph Merkle",
107 | title = "{DAO Democracy (annotated by Joel Dietz)}",
108 | year = "2016",
109 | howpublished={\url{http://fractastical.github.io/dao_democracy.html}}
110 |
111 | }
112 |
113 |
114 | @book{latexcompanion,
115 | author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
116 | title = "The \LaTeX\ Companion",
117 | year = "1993",
118 | publisher = "Addison-Wesley",
119 | address = "Reading, Massachusetts"
120 | }
121 |
--------------------------------------------------------------------------------
/whitepapers/main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{article}
2 | \usepackage[utf8x]{inputenc}
3 | \usepackage{graphicx}
4 | \graphicspath{ {images/} }
5 | \usepackage{fancyhdr}
6 | \usepackage{epigraph}
7 | \usepackage{esvect}
8 | \usepackage{listings}
9 | \usepackage[nottoc]{tocbibind}
10 | \usepackage{multicol}
11 | \usepackage{hyperref}
12 |
13 |
14 | \pagestyle{fancy}
15 | \pagestyle{headings}
16 |
17 | \fancyhf{}
18 | \lstset{language=Lisp}
19 |
20 | \lstdefinestyle{MyCStyle} {language=C,frame=lines,breaklines=true,linewidth=14.5cm }
21 |
22 | \lhead{DRAFT v0.3.1}
23 |
24 | \title{Network State Whitepaper}
25 | \author{Joel Dietz, Bogdan Fiedur, Daniel Duarte }
26 | \date{April 19 2017 }
27 |
28 | \begin{document}
29 |
30 | \setcounter{page}{1}
31 |
32 | \maketitle
33 |
34 | \section{Abstract}
35 |
36 | All humans breathe and yet international governance does not have an institution capable of protecting the trees which give us this breath. Blockchain allows us to implement a prototype international government that can acquire rainforest and issue its own land-backed currency. Owners of the currency can also use the currency to vote. They will use a stake-based liquid democracy system to determine the future of the currency and related technology. Satellite pictures of the land protected will be deployed via a decentralized storage system. Additionally the technology developed through this process can be used for a more general purpose automated investment system.
37 |
38 | \section{BREATHE}
39 |
40 | \subsection{Implementation }
41 |
42 | The "Token" ("coin") BREATH will be the Blockchain mechanism used by Global Civil Society to protect the Amazon Rainforest, whose destruction causes a greenhouse effect and its preservation guarantees the improvement of the quality of our Oxygen.
43 |
44 | The money acquired with our BREATH EMISSION will be the public CROWDFUNDING mechanism we will use in PHASE 2, the start of the Project will be funded by Investment Funds and companies interested in supporting our initiative .
45 |
46 | We will use STORYTELLING Technologies, GAMIFICATION, SOCIAL NETWORK and BLOCKCHAIN to encourage global support for this cause.
47 |
48 | The central axis of this project is the purchase of land in the fringes of the Amazon, especially in regions that currently have the greatest risk of deforestation or are under attack,
49 |
50 | We will move into the communities near these areas to develop Sustainable Economic Systems for the inhabitants, ensuring that they become true PROTECTORS OF THE FOREST.
51 |
52 | The production of Forest gifts that we can develop, improve and send to the holders of a certain number of BREATH (We will use GAMIFICATION, the more investment, the more gifts the SUPPORTERS have RIGHT).
53 |
54 | In addition to the present, the SUPPLIER, when acquiring Tokens ("currencies") Breath in any CRYPTO EXCHANGE in the World, will receive the Right to receive Satellite images of the area in which he is helping to preserve in Brazil, he will have total transparency of his investment Because we will send monthly the images of the areas that are protected by it and registered by Blockchain that we will develop.
55 |
56 | The idea is to link a certain number of tokens to a certain number of protected trees, allowing the creation of Gamification architecture, since you could choose different types of trees, different regions and thus create some kind of competition among investors through a Social network specifies: EARTH PROTECTORS (I just created this name and I accept suggestions)
57 |
58 | \subsection{Economic Theory}
59 |
60 | The idea of a private asset-backed currency was suggested by Hayek as a solution to the fiat problem. [CITE privatization] Land is the ultimate stable and hard asset. [cite John Law / scotland ]
61 |
62 |
63 | \subsection{Satellite}
64 |
65 |
66 |
67 |
68 | \section{The Network Stack}
69 |
70 | \subsection {Components of the Network Stack}
71 |
72 | \includegraphics[width=1.0\textwidth]{network-stack}
73 |
74 | The network stack is a comprehensive way of using the benefits of network organization and deploying them in such a way that they can be used in a variety of industry sectors. In particular, it integrates real world assets with accountability mechanisms in trust currency and in the existing rule of law.
75 |
76 | Key components of the Network Stack are network democracy, trust currency, nested holonic organization, and integration into existing legal systems.
77 |
78 | \subsection {Network Democracy}
79 |
80 | \subsubsection {Why networks?}
81 |
82 | \epigraph{The only organization capable of unprejudiced growth, or unguided learning, is a network. All other topologies limit what can happen.}{\textit{Kevin Kelly}\cite{outofcontrol}}
83 |
84 | An open network has the advantage of not biases based on precognition and evolving along with the constituents of that network. This, in turn, gives people a sense of emotional connection and ownership of the result, and allows them to put a greater than normal amount of effort. Open networks also, rather than presenting a single dominant structural pattern (such as the joint-stock corporation) allow numerous different types of organizations to exist alongside and augment it. Additionally, unlike traditional organizations, the network stack is deliberately designed for automation and participation of AI and other novel optimized decision making mechanisms.
85 |
86 | \subsubsection {What is network democracy?}
87 |
88 | Network democracy is a stake-weighted delegated voting system (liquid democracy) which also provides options for enhanced stake and programmable liquidity.
89 |
90 | \subsubsection {What is stake weighted?}
91 |
92 | Stake weighted means that voting power is directly proportional to the amount of stake you have in a project. In the blockchain world this is typically called your "tokens" or "coins." In in the world of stock, this would be called your "stock" or "shares."
93 |
94 | \subsubsection {What is liquid democracy?}
95 |
96 | Liquid democracy is the same as "delegated voting" and implies that someone can at any point delegate their vote to another party for as long as a period as they desire. This allows them to maintain a degree of control without having to participate in minute decision making. This is in some ways similar to the decision an investor makes when they give someone capital to work on a project with the key innovation that the investor retains control of the capital.
97 |
98 | \subsubsection {Why network democracy?}
99 |
100 | Stake-weighted liquid democracy is a highly flexible governance model which accommodates anything from one-member-one vote to traditional corporate arrangements to novel forms of collectives. It also appropriately incentivizes the many different types of possible contributions to a network (code, community contributions, funding) and allows both decision making capability and rewards. It also integrates with other automated decision making methods such as futarchy.
101 |
102 | \subsubsection {What is a variable sale price?}
103 |
104 | Rather than a single round in which all tokens or shares are sold at the same price, the evolving ICO or crowdsale model has been allowing a variety of sale parameters.
105 |
106 | This system at least includes the following.
107 |
108 | Time-based linear sale model:
109 |
110 | \[ p = p (t * n) \]
111 |
112 | Token price adjusts based on the time of sale.
113 |
114 | Token-based linear sale model:
115 |
116 | \[ p = p (t_s * n) \]
117 |
118 | Token price adjusts based on amount of previous tokens sold with a start and end price.
119 |
120 | Incentivized discovery model:
121 |
122 | \[ p = p (t * n) \]
123 |
124 | Our ongoing sale makes use of the incentivized discovery and token-based linear sale models.
125 |
126 | \subsubsection {What is enhanced voting stake ?}
127 |
128 | Enhanced voting stake makes use of a locking period is a proposed addition to the stake-weighted liquid democracy that does not allow tokens to be traded for a certain period. This can also allow a person to have a proportionally higher voting weight who has a provable long-term stake in the network.
129 |
130 | Traditional model:
131 |
132 | \[ v_w = s \]
133 |
134 | Voting weight and network stake are equivalent.
135 |
136 |
137 | Enhanced model:
138 |
139 | \[ v_w = s + s ( tl * n ) \]
140 |
141 | In this case, voting weight is no longer simply network stake $s$ but stake plus an additional amount of weight depending on both the length of the time lock and the additional parameter $n$. For example, with $tl$ denominated in months and an $n$ of .2, a 5 month time lock would effectively double the voting weight.
142 |
143 | \subsubsection {What is programmable liquidity?}
144 |
145 | Programmable liquidity indicates that the stake can be gradually introduced to the network for tradability. It is complementary to a locking period, in the sense that you can accommodate both long-term stake and liquidity with incentives on both ends.
146 |
147 | \[ s_l = s ( (t - tl ) / tl ) \]
148 |
149 | In this case liquid stake $s_l$ is the total stake owned by the participant multiplied by the remaining time of the time lock as a percentage. This drip liquidity allows people to gradually realize their returns without any major disruption to the network state.
150 |
151 | \subsubsection {Futarchy for automation}
152 |
153 | Futarchy that can allow automation of decision making via prediction markets. Network democracy accommodates vote delegation to an automated prediction market.
154 |
155 | \subsubsection {Enhancements on traditional models}
156 |
157 | The network stack provides several clear enhancements of traditional models including incentives for early adoption, compatible short and long-term incentives, flexible liquidity models, accommodating multiple organizational types, and accountability and automation via reputational systems.
158 |
159 | \subsection {Funding in network stack}
160 |
161 | \includegraphics[width=1.0\textwidth]{network-stack-funding}
162 |
163 | The network stack, by virtue of nested smart contracts which pass proceeds up to the maintainer of the network stack is able to fully self-fund. This is an evolution in the funding of public goods as neither donations nor taxes are needed in this model.
164 |
165 | \subsubsection {Funding pools}
166 |
167 | A funding pool is a organization governed by network democracy that then distributes funds. It can be structured as similar to an investment fund, in which case it seeks profit yielding opportunities or for some other purpose (e.g. advocacy, education). Funds that go into any funding pool can be allocated by a higher level network democracy or received independently.
168 |
169 | \subsubsection {Tokenized assets}
170 |
171 | A key element of the network stack is that it maybe be used to govern other real word assets, such as real estate, enterprise SaaS deals, and other tokenizable elements derived from classic investment vehicles. Specific details on these deal opportunities are made available to members of the Network.
172 |
173 | \subsubsection {Real estate as the ultimate real asset}
174 |
175 | Real estate is the ultimate real asset, insofar as it has stable and often the appreciating value, lends itself extremely well to subdivision and tokenization, and serves as a backing for the value of the network as a whole.
176 |
177 | \subsection {How the Network Stack funds itself}
178 |
179 | Realized returns, which can be from any allocation of funds into areas which return profit or the appreciation of owned assets are subject to certain parameters as established in the governing contracts of the organization. More specifically, a minimum of 1 percent of realized returns are passed up the chain to the next highest organisation. This allows the maintainers of the network stack to achieve an automated income that facilitates the growth of entire network.
180 |
181 | \subsection {Trust Network}
182 |
183 | The trust network is made up of many independent trust endoresments (i.e. vectors) which create accountability and allow automation.
184 |
185 | \subsubsection{Trust equation}
186 |
187 | $$\sum^{\infty} \vv{i}^t = T$$
188 |
189 | The trust is the sum of all trusted parties and their recommendations from the standpoint of an individual (here represented as vectors which can be positive or negative). In this case, we record all of these endorsement allow multiple levels of ascription and derivation.
190 |
191 |
192 | \subsubsection{Trust vectors}
193 |
194 | Trust currency is made up by individual immutable trust vectors. Each trust vector $\vv{i}^t$ is an endorsement. $A$ endorses $B$ for $X$. This has a timestamp and an optional weight represented as a number from [-1 .. 0 .. 1]. The ability to provide a negative filter as well as a positive one is important for filtering out signal and noise, including instances like Facebook fake news). As with other open networks, it has an open access policy and the nature of the endorsements is pseudonymous.
195 |
196 |
197 |
198 |
199 | \subsubsection{The trust graph}
200 |
201 | These vectors are optimally represented as a graph.
202 |
203 | \includegraphics[width=10cm,keepaspectratio]{trustgraph}\cite{trustexchangegithub}
204 |
205 |
206 | This graph illustrates that trust (including what we believe to true) can be derived from the various trust vectors. This also allows easy use of data science to create.
207 |
208 |
209 | \subsubsection{Implications of a trust model}
210 |
211 | A open reputation ledger built of individual trust vectors is a critical element in the Network Stack. It helps incentivize positive overall social contributions and augment the network more generally. It also allows full automation . For example, investment and portfolio allocation decisions can be made by artificial intelligence. It also makes certain other accountability mechanisms less necessary due to the strong social component.
212 |
213 |
214 |
215 | \subsection {Holonic nature of the network stack}
216 |
217 | \epigraph{No man is an island- he is a holon}{\textit{Arthur Koestler}\cite{koestlersleep}}
218 |
219 | \epigraph{The Kosmos is a series of nests within nests within nests indefinitely... holarchies of holons everywhere!}{\textit{Ken Wilber}\cite{wilbereberything}
220 | }
221 |
222 | \subsubsection {Key holonic principles}
223 |
224 | \begin{description}
225 |
226 | \item[Nested]
227 |
228 | Holonic are looking to realize syncronicity with both larger systems (seasonal cycles, harmonics) and smaller internal systems (human cognition, sleep cycles), of which all organizational types are subject. The optimal design takes into account as many of these as possible and allows them to seemlessly network with each other.
229 |
230 | \begin{lstlisting}
231 | (network
232 | (members
233 | (human 'alice')
234 | (human 'bob')))
235 | \end{lstlisting}
236 |
237 |
238 | Multiple levels:
239 |
240 | \begin{lstlisting}
241 | (network
242 | (members
243 | (network 'quantum consortium'
244 | (members 'Q-HOSS')
245 | (members 'FutureCorp'))
246 | (network
247 | (members 'alice')
248 | (members 'bob')
249 | )))
250 | \end{lstlisting}
251 |
252 | Eventually these systems look increasingly like fractals.
253 |
254 | \item[Evolving]
255 |
256 | Holonic design insists that the system design does not lock it into a static state but allows for constant vetting and evolution. This is why there cannot be a single 'network state.'
257 |
258 | \begin{lstlisting}
259 | (network
260 | (members
261 | (human 'alice')
262 | (human 'bob')
263 | (other '2501')
264 | ))
265 | \end{lstlisting}
266 |
267 | \item[Extensible]
268 |
269 | Holonic systems are always looking for opportunities for growth or 'networking,' and any holonic system needs to be designed for this possibility.
270 |
271 | \begin{lstlisting}
272 | (network
273 | (members
274 | (human 'alice')
275 | (human 'bob'))
276 | (reputation trust-ledger))
277 | \end{lstlisting}
278 |
279 |
280 | \begin{lstlisting}
281 | (network
282 | (members
283 | (human 'alice')
284 | (human 'bob'))
285 | (gov
286 | (tier-1 merkle-dao)
287 | (tier-2 network-democracy)))
288 | \end{lstlisting}
289 |
290 | \item[Ego-extension]
291 |
292 | What we mean here by ego-extension in this sense is not a chemical or emotive state, it is a name for the principle of networking which allows seamless transition to various states of abstraction within nested systems. In particular, art and music allow people to cultivate states of ego-extension. These can be cultivated in the context of a "metta-org" that serves as an organization specifically dedicated to this purpose. This may be a logical evolution of the ostensible purpose of religion without dogmatic content.
293 |
294 | \begin{lstlisting}
295 |
296 | (org
297 | (participants
298 | (human 'alice')
299 | (human 'bob'))
300 | (metta-org (div 1\%))
301 | \end{lstlisting}
302 |
303 |
304 | \end{description}
305 |
306 | \subsubsection {Network stack as a representation of holonic principles }
307 |
308 | \includegraphics{extensible-network-stack}
309 |
310 |
311 | This represents that, both respect to legal integration and governance principles, the stack here may have a near-infinite number of nested sub-entities, each with its own governance principle. With respect to legal systems, this is made possible by the increasing the ease in creating legal entities created by some innovative nation states via APIs and other technologically innovative means. Blockchain and smart contracts also complement this structure by being extensible by design.
312 |
313 |
314 |
315 | \subsection {Living Holons}
316 |
317 | The idea of a "holon" was circulated through the Ethereum community during the lead0-up to the crowdsale and was used to refer to an open living space where ideas could be circulated. Notably, the Palo Alto version of the same hosted Vitalik Buterin, and Anthony Dinofrio of Ethereum present at the first Decentralized Autonomous Society meetup on Jan 10, 2014. There have been 23 meetups on various aspects of decentralized governance since, including notable presentations by Ralph Merkle, DASH team, and associates of Doug Engelbart, as well as numerous other events.\cite{lovenestguide}
318 |
319 |
320 | \section{Ethereum as a Model}
321 |
322 | \epigraph{It would be very nice if there were a protocol whereby unforgeably costly bits could be created online with minimal dependence on trusted third parties.\cite{szabobitgold}}{\textit{Nick Szabo}}
323 |
324 | \subsection {Bitcoin as the Forerunner}
325 |
326 | Bitcoin proved several interesting points about the viability of a network. First, it proved that a novel incentive mechanism could be use to bootstrap a network with little intrinsic utility outside of its network effect. Second, that a community could grow up around it with a ideological and economic interest in preserving it.
327 |
328 | \subsection {Ethereum's Incentive model
329 | }
330 |
331 | One major reason for Ethereum's success is that it continued the incentivized open network model of Bitcoin. The code was open source and anyone could participate both in open source code, organization, education, and funding. Contributions also all amounted to substantial returns when the network was released and scaled. It also accommodated a variety of interests, including socially positive, technologically innovative, and economically rewarding.
332 |
333 | \subsection {Ethereum's Governance model}
334 |
335 | Ethereum, the successor to Bitcoin, has been extremely successful at delivering not only the core premise of Bitcoin (a pseudonymous international payment network) but also a robust foundation for future financial infrastructure . Additionally, it uses an effective bicameral system of governance. First, a non-profit foundation led largely by technical architects proposes, with a miner driven consensus mechanism that ratifies. This allows Ethereum to employ dedicated staff and implement periodic technological upgrades. It also allows occasional interventionist elements.
336 |
337 | \section{How the Network Stack Solves Hard Problems in Macroeconomics }
338 |
339 | \subsection {Asset-backed currency as a solution to the fiat problem
340 | }
341 |
342 | Since Bretton Woods II and the abandonment of the gold standard the global economy has not had a stable international unit of account. Among other problems, central banks can effectively print money at will, which leads to a certain instability in international relations and the possibility of enormous trade deficits financed by debt and money printing. First proposed by John Law a few centuries ago, the idea of a currency backed by the hardest and most stable of hard assets was previously only theoretically possible, with most historically stable currencies backed instead by precious metals. However, decentralized organizations existing on blockchains can purchase land in multiple legal jurisdictions, tokenize the land, and use it as a stable unit of account.
343 |
344 | \subsection {Trust networks as a solution to lowest common denominator markets
345 | }
346 |
347 | Markets often fall victim to the ‘Keynesian Beauty Problem’ and effectively serve as predictive mechanisms for the most commonly held position rather than the optimal one.\cite{shillerkeynes} This may be effectively solved via a multi-track reputational system. This idea was first circulated by noted Venture Capitalist Brock Pierce at Burning Man as a “Trust Currency.” A canonical global reputational currency so described would create strong incentives for socially positive behavior.
348 |
349 | \subsection {Smart contracts as an automated international legal system}
350 |
351 | Smart contracts as articulated by Nick Szabo and implemented on an Ethereum-type blockchain allow programmatic settlement of embedded logic. While not foolproof, they may be combined with nested chains of intention, much like existed in the legal system of the middle ages. In particular, smart contracts can be augmented with an international arbitration network which resolves cases not easily governed via fully automated fashion.
352 |
353 | \subsection {Direct democratic engagement as a solution to olicharchic system capture }
354 |
355 | Populism is often a response to oligarchic capture which has at various points created totalitarian regimes which further enhance oligarchic capture by suppression of contrary point of view. Global transparent ledger systems which support governance creates optimal conditions for capturing public opinion and channeling it into action.
356 |
357 | \subsection {Network fee as a solution to taxes}
358 |
359 | Virtually all legacy governance systems depend on the forcible extraction of wealth (e.g. taxes). A system which dynamically and programmatically passes a fee upwards to the governance layer to handle things at the network level allows a transition away from the need for any coercive mechanisms for wealth transfer.
360 |
361 | \subsection {Basic income as a solution to inefficient or nonexistent welfare}
362 |
363 | Various regions like Norway and Alaska pass through proceeds of revenues to their citizens. A network state can do the same thing to its members, distributing some amount of proceeds realized through its services back to its constituents.
364 |
365 | \subsection {An open economy as a solution to wealth concentration}
366 |
367 | Network governance allows open contributions and open rewards without any preference for large existing stakeholders or other biases based on location or genetics. Additionally, as measured by the Gini index Ethereum appears to have improved substantially over Bitcoin and the US economy. \cite{buterinethersale}
368 |
369 |
370 | \subsection {Long-term research for near-sighted markets}
371 |
372 | Investment long-term research including various technologies that may at some point present commercial activities is a classic activity of the nation-state and, yet, one that seems to be waning over the past decade with various high value technological innovations (e.g. blockchain) coming almost entirely from the freelance and private sector as opposed to facilitated by traditional organizations like DARPA. The trust currency provides an additional layer of accountability and rewards people who have a consistent and positive track record of contributions.
373 |
374 |
375 | \section { The Network State }
376 |
377 | \subsection { Implications of the network stack for politics }
378 |
379 | The network stack allows a new type of political organization that is not dependent on national borders and which can fulfill some of the same functions in an opt-in manner without any of the coercive value capture mechanisms used in less transparent systems. It is transparent, open, and extensible by design.
380 |
381 | \begin{lstlisting}
382 | (network
383 | (gov network-democracy)
384 | (legal decentralized-arbitration)
385 | (bank (asset-backing land)))
386 | \end{lstlisting}
387 |
388 | \subsection { Components of the Network State }
389 |
390 |
391 | \begin{description}
392 |
393 | \item[network]
394 |
395 | \begin{lstlisting}
396 | (network)
397 | \end{lstlisting}
398 |
399 | Citizenship and a sense of belonging and duty are two classic assumptions of classic states but the two do not always go hand in hand. In particular, humans have developed overlapping senses of belonging and duty associated with digital communities which augment and often supersede the degree of allegiance at the local level. Additionally the networks of the future must accommodate non-human actors. As a virtual entity, the network state accommodates multiple forms of network allegiance and embedded values.
400 |
401 | \item[decision making system]
402 |
403 | \begin{lstlisting}
404 | (gov network-democracy)
405 | \end{lstlisting}
406 |
407 | The first principle for our new network state is be the governance mechanism by which it operates. In this case we provide the same option we have suggested elsewhere, while mentioning that this is but one of many possible options. For example, one could provide a clear one citizen one vote liquid democracy system, a constitutional monarchy, a futarchy (e.g. merkle DAO), or some other hybrid system. \cite{merkledao}
408 |
409 | \item[legal system]
410 |
411 | \begin{lstlisting}
412 | (legal decentralized-arbitration)
413 | \end{lstlisting}
414 |
415 | The presence of arbitration in the event either of non-functional code or disputed delivery of real goods and services is a necessary component of an overall legal system. While here is suggested a global arbitration network which, ideally, is integrated into the existing body of law, it is equally possible to propose an entirely novel system or to simply inherit an existing nation state system as a failsafe. This potentially follows the holonic principle of nesting with possibly various tiers of decision making.
416 |
417 | \item[banking]
418 |
419 | \begin{lstlisting}
420 | (bank (asset-backing land)))
421 | \end{lstlisting}
422 |
423 | As with other software architectures, our banking system by default inherits the governing system of its immediate peer which makes it community owned by default. The ostensible values of currency are that it serves as unit of account, store of value, and means of exchange.
424 |
425 | More complex examples are possible:
426 |
427 | \begin{lstlisting}
428 |
429 | (bank
430 | (deposit)
431 | (withdrawal)
432 | (event-log)
433 | (lending (prediction-market (p2p-platform-1 p2p-platform-2))
434 | \end{lstlisting}
435 |
436 | \includegraphics[width=11cm]{dao-bank}
437 |
438 | In this case, a bank engages in lending and programatically distributes funds to other blockchain based organizations.
439 |
440 | \end{description}
441 |
442 |
443 | \subsection { Politics and permanence }
444 |
445 | \epigraph{Our new Constitution is now established, and has an appearance that promises permanency; but in this world nothing can be said to be certain, except death and taxes.}{\textit{Benjamin Franklin}}
446 |
447 | \epigraph{We want to overcome the state of nature. It is true that you can say that death is natural, but it is also natural to fight death.
448 | }{\textit{Peter Thiel}}
449 |
450 | Where constraints exist it is natural for humans to want to fight all things that limit us, including both death and the seeming inevitability of systems of forced wealth distribution. It seems that we have the possibility of, if not ending such a system out right, at least creating a new system with many of the same benefits without its detriments in a way that is most conducive to overall well-being. The fundamental structure of governance has not been disrupted for over 200 years. It is about time.
451 |
452 | \section { A Trust Revolution?}
453 |
454 | \epigraph{ God forbid we should ever be twenty years without such a rebellion\cite{jefferson} }{\textit{Thomas Jefferson}}
455 |
456 | A single revolution implies a state change that may or may not lead to a better status quo, but a perpetual revolution, such as envisioned by Thomas Jefferson, implies a network that is in a constant evolving state of learning, growth, and change. We believe with this model we have a model for a governmental and financial system that is systematically more robust and properly aligned than the current one. Additionally, it creates a global network of trust without much of the abuse potential found in the current one.
457 |
458 |
459 | \section {Acknowledgments}
460 |
461 | Although the current formulation of trust networks is my own, Brock Pierce (and the Big Imagination camp at Burning Man '16), Matan Field (Backfeed), Adam Apollo and Harlan Wood (trust.exchange), were all instrumental in catalyzing conceptions of trust networks. Initial feedback from Steve Waldman, Nathan Schneider [ reviewer names here ]
462 |
463 |
464 | \bibliographystyle{unsrt}
465 |
466 | \bibliography{main}
467 |
468 | \appendix
469 |
470 | \section {Appendix: Implementation}
471 |
472 | \subsection {Current active interface}
473 |
474 | The Network State has a fully operational model that has been undergoing alpha testing since November '16. With the release of this whitepaper we will be offering access to the private beta with a linear purchase schedule.
475 |
476 | \includegraphics[width=10cm]{current-interface}
477 |
478 | This illustrates the principles of network democracy, including purchasing of stake, stake-based voting, and voting delegation.
479 |
480 | Live demo at http://liquid.qhoss.com
481 |
482 | \subsection { Token Contract}
483 |
484 | \begin{lstlisting}[style=MyCStyle]
485 |
486 | pragma solidity \^0.4.6;
487 |
488 | /// @dev limited token contract
489 | contract MyToken {
490 | /* Public variables of the token */
491 | string public standard = 'Token 0.1';
492 | string public name;
493 | string public symbol;
494 | uint8 public decimals;
495 | uint256 public totalSupply;
496 | address public owner;
497 | address public ldAddress;
498 |
499 | /* This creates an array with all balances */
500 | mapping (address => uint256) public balanceOf;
501 |
502 |
503 | /* This generates a public event on the blockchain that will notify clients */
504 | event Transfer(address indexed from, address indexed to, uint256 value);
505 |
506 | /* Initializes contract with initial supply tokens to the creator of the contract */
507 | function MyToken(
508 | uint256 initialSupply,
509 | string tokenName,
510 | uint8 decimalUnits,
511 | string tokenSymbol,
512 | address liqiuidDemocracyAddress
513 | ) {
514 | balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
515 | totalSupply = initialSupply; // Update total supply
516 | name = tokenName; // Set the name for display purposes
517 | symbol = tokenSymbol; // Set the symbol for display purposes
518 | decimals = decimalUnits;
519 | ldAddress = liqiuidDemocracyAddress;
520 | // Amount of decimals for display purposes
521 | if (!msg.sender.send(msg.value))
522 | throw; // Send back any ether sent accidentally
523 |
524 | owner = msg.sender;
525 | }
526 |
527 | /// @dev Used to create new tokens. It can be only called by owner or the Liquid Democracy
528 | /// contract
529 | /// @param target - address of the member receiving tokens
530 | /// @param mintedAmount - amount of new tokens created.
531 | function mintToken(address target, uint256 mintedAmount) {
532 |
533 | if (owner != msg.sender || ldAddress != msg.sender) throw;
534 | balanceOf[target] += mintedAmount;
535 | totalSupply += mintedAmount;
536 | Transfer(0, target, mintedAmount);
537 |
538 | }
539 |
540 | ///@dev destroy the contract when not needed
541 | function kill() {
542 | if (msg.sender == owner) selfdestruct(owner);
543 | }
544 |
545 | /* This unnamed function is called whenever someone tries to send ether to it */
546 | function () {
547 | throw; // Prevents accidental sending of ether
548 | }
549 | }
550 |
551 | \end{lstlisting}
552 |
553 | \subsection { Network Democracy Contract}
554 |
555 | \begin{lstlisting}[style=MyCStyle]
556 | pragma solidity ^0.4.6;
557 |
558 | //Contract token is found in its own file.
559 | //These here are interfaces to access functions and variable of token contract.
560 | contract token {
561 |
562 | // balance of tokens for individual member
563 | mapping (address => uint256) public balanceOf;
564 |
565 |
566 | // this function creates new tokens and assigns it to the purchaser.
567 | // It can be only called by the owner of itself or from functions
568 | // in this contract which is registered with MyToken contract.
569 |
570 | function mintToken (address target, uint256 mintedAmount);
571 | }
572 |
573 | // @notice a contract which is inherited by
574 | // main Association contract. owned holds several housekeeping functions
575 | contract owned {
576 | address public owner;
577 |
578 |
579 | /// @notice constructor, sets the owner of the contract
580 | function owned() {
581 | owner = msg.sender;
582 | }
583 |
584 | /// @notice modifier to be used in functions, which can be only called
585 | /// by the owner, otherwise call to function will be thrown.
586 | modifier onlyOwner {
587 | if (msg.sender != owner) throw;
588 | _;
589 | }
590 |
591 | /// @notice used to transfer Ownership
592 | /// @param newOwner - new owner of the contract
593 | function transferOwnership(address newOwner) onlyOwner {
594 | owner = newOwner;
595 |
596 | }
597 |
598 | /// @dev this function will allow on self destruction of this contract.
599 | function kill() {
600 | if (msg.sender == owner) selfdestruct(owner);
601 | }
602 | }
603 |
604 |
605 | /// @dev Liquid Democracy contract. Allows new members to be registered and
606 | /// aquire tokens. Number of acquired tokens also represents user voting power.
607 | /// Tokens are held in standard token contract defined here.
608 | contract ld is owned {
609 |
610 | // How long debate should be held in minutes
611 | uint public debatingPeriodInMinutes;
612 | // proposals array
613 | Proposal[] public proposals;
614 | // to keep number of proposals for easy access
615 | uint public numProposals;
616 | // to keep numbrer of members for easy access
617 | uint public numMembers;
618 | // to retrieve a member position in the array without searching for it
619 | mapping (address => uint) public memberId;
620 | // to keep vote weight of each member
621 | mapping (address => uint256) public voteWeight;
622 | // keeps delegated votes for each member
623 | DelegatedVote[] public delegatedVotes;
624 | // list of registered members
625 | Member[] public members;
626 | // address of token contract
627 | token public sharesTokenAddress;
628 | // total number of tokens in circulation
629 | uint public tokensInCirculation;
630 | // cost of token in wei
631 | uint public singleTokenCost;
632 | // date of tokens sale start date in Uinx timestamp
633 | uint public tokenSaleStartDate;
634 | // date of tokens sale end date in Unix timestamp
635 | uint public tokenSaleEndDate;
636 | // minimum quorum
637 | uint public minimumQuorum;
638 |
639 |
640 |
641 | // to store member info
642 | struct Member {
643 | // the address of member
644 | address member;
645 | // true if member can vote
646 | bool canVote;
647 | // date member created
648 | uint memberSince;
649 | // first name of member
650 | string firstName;
651 | // last name of member
652 | string lastName;
653 | // email address of member
654 | string userID;
655 | // true if user has delegated their vote
656 | bool delegated;
657 | // for verification when logging in
658 | // email address hashed with password f
659 | bytes32 memberHash;
660 | // true if user is admin
661 | bool admin;
662 | // if provided referral address is stored
663 | address referral;
664 | }
665 |
666 | // to store votes delegated by user to another user
667 | struct DelegatedVote {
668 | // address of the nominee
669 | address nominee;
670 | // address of the voter
671 | address voter;
672 | // amount of vote credits, each token is 1 credit
673 | uint weight;
674 | }
675 |
676 | // to store proposal info
677 | struct Proposal {
678 | // address of the proposal beneficiary
679 | address recipient;
680 | // amount of the proposal for beneficiary
681 | uint amount;
682 | // description of the proposal
683 | string description;
684 | // title of the proposal
685 | string title;
686 | // creator of the proposal
687 | address creator;
688 | // Unix timestamp of voting deadline
689 | uint votingDeadline;
690 | // true if proposal has passed voting deadline and tallying has been run
691 | uint executed;
692 | // number of votes cast for this proposal, votes are number of total voting weights of participating members
693 | uint numberOfVotes;
694 | // used for security to check if user knows the combination of info used in hash
695 | bytes32 proposalHash;
696 | // array of votes for and against the proposal
697 | Vote[] votes;
698 | // list of voting status of members
699 | mapping (address => bool) voted;
700 | // implemented to store string of proposal stats.
701 | // this was due to the fact that this structure reached limit of elements allowed by solidity
702 | // to still accomplish this task, number of variables are stored in the string and then
703 | // parsed when needed
704 | string proposalStats;
705 |
706 | }
707 |
708 | // to keep info about voting of each member for the proposal
709 | struct Vote {
710 | // true if user voted for proposal
711 | bool inSupport;
712 | // address of the voter
713 | address voter;
714 | }
715 |
716 |
717 |
718 |
719 |
720 | // triggered when new proposal is added
721 | event ProposalAdded(uint proposalID, address recipient, uint amount, string description, string title);
722 | // triggered when vote is cast
723 | event Voted(uint proposalID, bool position, address voter);
724 | // triggered when votes on proposals are tallied
725 | event ProposalTallied(uint proposalID, uint yea , uint nay, uint quorum, uint executed);
726 | // triggered when rules for voting are changed
727 | event ChangeOfRules(uint minimumQuorum, uint debatingPeriodInMinutes);
728 | // triggered when new member is created or updated
729 | event MembershipChanged(address member, bool isMember, string firstName, string lastName, string userID, address memberReferral);
730 | // triggered when votes are deleted by a mebmber
731 | event Delegated(address nominatedAddress, address voters, uint voteIndex);
732 | // triggered when delegations are reset by admim
733 | event DelegationReset(bool status);
734 | // triggered when tokens are purchased
735 | event BuyTokens(uint numOfTokens, address buyer, uint value);
736 | // executed when meber account "canVote" is changed
737 | event BlockUnblockMember(address member, bool status);
738 | // executed when ownership of this contract is transferred
739 | event OwnershipTransfer(bool result);
740 | // executed when member cancels vote delegation
741 | event CancelDelegation(address nominatedAddress, address voter, uint voteWeight);
742 | // executed when user buys new tokens or reduces them and their vote weight is updated
743 | event VoteWeightUpdated(address member, uint weightAdded, uint totalWeight);
744 | // executed when tokens price is changed
745 | event TokenParmsChange(uint startDate, uint endDate, uint tokenPrice);
746 |
747 | /* modifier that allows only shareholders to participate in auction */
748 | modifier onlyShareholders() {
749 | if (sharesTokenAddress.balanceOf(msg.sender) == 0) throw;
750 | _;
751 | }
752 |
753 |
754 |
755 | /// @dev This is constructor function. It allows to initialize token address
756 | /// token cost, token sale start date, token sale end date
757 | /// @param minimumSharesToPassAVote - min quorum
758 | /// @param minutesForDebate - number of minutes after which debate should expire
759 | /// @param sharesAddress - address of token contract
760 | /// @param tokenCost - cost of token in wei
761 |
762 | function Association(uint minimumSharesToPassAVote, uint minutesForDebate, token sharesAddress, uint tokenCost) {
763 | changeVotingRules(minimumSharesToPassAVote, minutesForDebate);
764 | sharesTokenAddress = sharesAddress;
765 | singleTokenCost = tokenCost;
766 | tokenSaleStartDate = now;
767 | tokenSaleEndDate = now + 30 days;
768 |
769 | }
770 |
771 | /// @dev this function allows on changing minimum quorum and length of debate on proposal
772 | /// @param minimumSharesToPassAVote - minimum quorum
773 | /// @param minutesForDebate - length of debate in minutes
774 |
775 | function changeVotingRules( uint minimumSharesToPassAVote, uint minutesForDebate) onlyOwner {
776 |
777 | if (minimumSharesToPassAVote == 0 ) minimumSharesToPassAVote = 1;
778 | minimumQuorum = minimumSharesToPassAVote;
779 | debatingPeriodInMinutes = minutesForDebate;
780 |
781 | ChangeOfRules(minimumQuorum, debatingPeriodInMinutes);
782 | }
783 |
784 |
785 | /// @dev start new proposal
786 | /// @param beneficiary - an address of the member who will receive the benefits of this proposal if it is approved
787 | /// @param etherAmount - amount of ether beneficiary will receive if proposal is approved
788 | /// @param proposalDescription - description of the proposal
789 | /// @param proposalTitle - proposal title
790 | /// @param transactionBytecode - can be sent to increase security
791 |
792 | function newProposal(
793 | address beneficiary,
794 | uint etherAmount,
795 | string proposalDescription,
796 | string proposalTitle,
797 | bytes transactionBytecode
798 | )
799 | onlyShareholders()
800 | returns (uint proposalID)
801 | {
802 |
803 | proposalID = proposals.length++;
804 | Proposal p = proposals[proposalID];
805 | p.recipient = beneficiary;
806 | p.amount = etherAmount;
807 | p.description = proposalDescription;
808 | p.title = proposalTitle;
809 | p.proposalHash = sha3(beneficiary, etherAmount, transactionBytecode);
810 | p.votingDeadline = now + debatingPeriodInMinutes * 1 minutes;
811 | p.executed = 0;
812 | p.numberOfVotes = 0;
813 | p.creator = msg.sender;
814 |
815 |
816 | numProposals = proposalID+1;
817 |
818 | ProposalAdded(proposalID, beneficiary, etherAmount, proposalDescription, proposalTitle);
819 | }
820 |
821 |
822 |
823 | /// @dev to check if proposal code is matching the params.
824 | /// @param proposalNumber - position of proposal in array, starts with 0
825 | /// @param beneficiary - beneficiary of the proposal
826 | /// @param etherAmount - ether amount for the beneficiary
827 | /// @param transactionBytecode
828 | /// @return - True if code checks out
829 | function checkProposalCode(
830 | uint proposalNumber,
831 | address beneficiary,
832 | uint etherAmount,
833 | bytes transactionBytecode
834 | )
835 | constant
836 | returns (bool codeChecksOut)
837 | {
838 | Proposal p = proposals[proposalNumber];
839 | return p.proposalHash == sha3(beneficiary, etherAmount, transactionBytecode);
840 | }
841 |
842 |
843 | /// @dev it allows to change price of token and sale start and end dates
844 | /// @param start - Unix time stamp of the token sale start date
845 | /// @param end - Unix time stamp of the token sale end date
846 | /// @param tokenPrice - token price in wei
847 |
848 | function changeTokenParms(uint start, uint end, uint tokenPrice){
849 |
850 |
851 | if (start != 0) tokenSaleStartDate = start;
852 | if (end !=0) tokenSaleEndDate = end;
853 | if (tokenPrice !=0) singleTokenCost =tokenPrice ;
854 | TokenParmsChange(start, end, tokenPrice);
855 |
856 | }
857 |
858 | /// @dev allows on transferring ownership of this contract
859 | /// @param newOwner - address of the new owner
860 |
861 | function transferOwnership(address newOwner) onlyOwner {
862 |
863 | // update member records
864 | members[memberId[newOwner]].admin = true;
865 | members[memberId[msg.sender]].admin = false;
866 |
867 | // call base contract
868 | owned.transferOwnership(newOwner);
869 | OwnershipTransfer(true);
870 | }
871 |
872 |
873 |
874 | /// @dev it saves the vote of the member
875 | /// @param proposalNumber - position of the proposal in array
876 | /// @param supportsProposal - true if in favor of proposal
877 | /// @return uint - new vote id
878 |
879 | function vote(uint proposalNumber, bool supportsProposal)
880 |
881 |
882 | onlyShareholders()
883 | returns (uint voteID)
884 | {
885 | Proposal p = proposals[proposalNumber];
886 | if (p.voted[msg.sender] == true || p.executed > 0) throw;
887 |
888 | voteID = p.votes.length++;
889 | p.votes[voteID] = Vote({inSupport: supportsProposal, voter: msg.sender});
890 | p.voted[msg.sender] = true;
891 | p.numberOfVotes = voteID +1;
892 | Voted(proposalNumber, supportsProposal, msg.sender);
893 | return voteID;
894 | }
895 |
896 |
897 | /// @dev helper function returning status of user vote for proposal
898 | /// @param proposalNumber - position of proposal in array
899 | /// @param voter - address of voter
900 | /// @return bool - value of voting status, true if voted, false if didn't vote
901 | function hasVoted(uint proposalNumber, address voter) constant returns (bool){
902 |
903 | Proposal p = proposals[proposalNumber];
904 | return p.voted[voter] ;
905 | }
906 |
907 | /// @dev helper function returning number of votes for proposal
908 | /// @param proposalNumber - position of proposal in array
909 | /// @return uint - number of votes for proposal
910 | function numOfVotes(uint proposalNumber) constant returns (uint){
911 |
912 | Proposal p = proposals[proposalNumber];
913 | return p.votes.length;
914 | }
915 |
916 | /// @dev returns choice of the voter for proposal
917 | /// @param proposalNumber - position of proposal in the array
918 | /// @param voter - address of a member to retrieve voting status for
919 | /// @return bool - true if member voted for the proposal and and false if against it
920 |
921 | function howVoted(uint proposalNumber, address voter) constant returns (bool){
922 |
923 | Proposal p = proposals[proposalNumber];
924 |
925 | for (uint i = 0; i < p.votes.length; ++i) {
926 | Vote v = p.votes[i];
927 |
928 | if (v.voter == voter) return v.inSupport;
929 | }
930 | }
931 |
932 | /// @dev helper function to return status if delegated member voted already
933 | /// @param proposalNumber - position of proposal in array
934 | /// @param voter - address of a member to retrieve status of vote
935 | /// @return bool - true if delegate has voted and false if didn't
936 | function hasDelegateVoted(uint proposalNumber, address voter) constant returns (bool){
937 |
938 | for (uint i = 0; i < delegatedVotes.length; i++){
939 | if (delegatedVotes[i].voter== voter){
940 | uint id = memberId[delegatedVotes[i].nominee];
941 | Member m = members[id];
942 | if (m.delegated){
943 | hasDelegateVoted(proposalNumber, delegatedVotes[i].nominee);
944 | }
945 | else {
946 | return hasVoted(proposalNumber, delegatedVotes[i].nominee );
947 | }
948 | }
949 | }
950 | }
951 |
952 |
953 |
954 | /// @dev returns choice of the delegate vote for proposal
955 | /// @param proposalNumber - position of proposal in the array
956 | /// @param voter - address of a delegate to retrieve voting status for
957 | /// @return bool - true if delegate voted for the proposal and and false if against it
958 |
959 | function howDelegateVoted(uint proposalNumber, address voter) constant returns (bool){
960 | for (uint i = 0; i < delegatedVotes.length; i++){
961 | if (delegatedVotes[i].voter== voter){
962 | uint id = memberId[delegatedVotes[i].nominee];
963 | Member m = members[id];
964 | if (m.delegated){
965 | howDelegateVoted(proposalNumber, delegatedVotes[i].nominee);
966 | }
967 | else{
968 | return howVoted(proposalNumber, delegatedVotes[i].nominee );
969 | }
970 | }
971 | }
972 |
973 | }
974 |
975 |
976 | /// @dev used to check current voting status of proposal before the votes are tallied
977 | /// @param proposalNumber - position of proposal in array
978 | /// @return string - concatenated list of parameters with their values separated by semicolons ":" and commas
979 |
980 | function calculateVotes(uint proposalNumber) constant returns (string){
981 |
982 |
983 | uint quorum = 0;
984 | uint votes = 0;
985 | uint yea = 0;
986 | uint nay = 0;
987 | uint totalMemberCount = members.length;
988 |
989 | Proposal p = proposals[proposalNumber];
990 |
991 | for (uint i = 0; i < p.votes.length; ++i) {
992 | Vote v = p.votes[i];
993 | uint voteWeightTmp = voteWeight[v.voter];
994 |
995 | votes += voteWeightTmp ;
996 | if (v.inSupport) {
997 | yea += voteWeightTmp ;
998 | }
999 | else {
1000 | nay += voteWeightTmp ;
1001 | }
1002 | }
1003 |
1004 | quorum = votes * 100/ tokensInCirculation;
1005 |
1006 | string memory tempString = strConcat( "{'yea':", uintToString(yea), ", 'nay':", uintToString(nay));
1007 | tempString = strConcat( tempString, ", 'quorum':", uintToString(quorum), ", 'votes':");
1008 | tempString = strConcat( tempString, uintToString(votes), "}", "");
1009 |
1010 | return tempString;
1011 | }
1012 |
1013 |
1014 | /// @dev tallies proposal votes and saves it. It sets status of proposal to executed.
1015 | /// @param proposalNumber - position of proposal in array
1016 | /// @param transactionBytecode - to increase security
1017 | /// @return result - concatenated string of values of voting status
1018 | function executeProposal(uint proposalNumber, bytes transactionBytecode) returns (uint256 result) {
1019 | Proposal p = proposals[proposalNumber];
1020 | /* Check if the proposal can be executed */
1021 | if (now < p.votingDeadline /* has the voting deadline arrived? */
1022 | || p.executed > 0 /* has it been already executed? */
1023 | || p.proposalHash != sha3(p.recipient, p.amount, transactionBytecode)) /* Does the transaction code match the proposal? */
1024 | throw;
1025 |
1026 | /* tally the votes */
1027 | uint quorum = 0;
1028 | uint votes = 0;
1029 | uint yea = 0;
1030 | uint nay = 0;
1031 | uint totalMemberCount = members.length;
1032 |
1033 |
1034 | for (uint i = 0; i < p.votes.length; ++i) {
1035 | Vote v = p.votes[i];
1036 | uint voteWeightTmp = voteWeight[v.voter];
1037 |
1038 | votes += voteWeightTmp ;
1039 | if (v.inSupport) {
1040 | yea += voteWeightTmp ;
1041 | } else {
1042 | nay += voteWeightTmp ;
1043 | }
1044 | }
1045 | quorum = votes * 100/ tokensInCirculation;
1046 | /* execute result */
1047 | if (quorum >= minimumQuorum) {
1048 |
1049 | if (yea > nay ) {
1050 | /* has quorum and was approved */
1051 | p.executed = 1;
1052 | }
1053 | else {
1054 | // it was executed but didn't pass
1055 | p.executed = 2;
1056 | }
1057 | }
1058 | string memory tempString = strConcat( "{'yea':", uintToString(yea), ", 'nay':", uintToString(nay));
1059 | tempString = strConcat( tempString, ", 'quorum':", uintToString(quorum), ", 'votes':");
1060 | tempString = strConcat( tempString, uintToString(votes), "}", "");
1061 | p.proposalStats = tempString;
1062 |
1063 | // Fire Events
1064 | ProposalTallied(proposalNumber, yea, nay, quorum, p.executed);
1065 | result = p.executed;
1066 | }
1067 |
1068 |
1069 | /// @dev facilitates buying of tokens
1070 | /// @param numOfTokens - number of tokens to purchased
1071 | /// @return bool - true if executed
1072 |
1073 | function buyTokens(uint numOfTokens) payable returns (bool){
1074 |
1075 | if (now < tokenSaleStartDate || now > tokenSaleEndDate ) throw;
1076 |
1077 | if (msg.sender.balance == 0) throw;
1078 |
1079 | uint totalTokenCost = singleTokenCost * numOfTokens;
1080 | uint userBalance = msg.sender.balance ;
1081 | uint maxTokenToBuy = userBalance / singleTokenCost;
1082 |
1083 | if ( numOfTokens >= maxTokenToBuy || totalTokenCost > msg.value){
1084 | BuyTokens(0, msg.sender, msg.value);
1085 | throw;
1086 | }
1087 |
1088 | sharesTokenAddress.mintToken(msg.sender, numOfTokens);
1089 | tokensInCirculation += numOfTokens;
1090 |
1091 | if (!updateVoteWeight( msg.sender, numOfTokens)) throw;
1092 | BuyTokens(numOfTokens, msg.sender, msg.value);
1093 |
1094 | return true;
1095 | }
1096 |
1097 |
1098 | /// @dev updates vote weight based on number of purchased tokens
1099 | /// @param member - address of member to update the vote weight
1100 | /// @param numTokens - number of tokens purchased indicating vote weight
1101 | /// @return bool - true if executed
1102 |
1103 | function updateVoteWeight(address member, uint numTokens) private returns (bool success){
1104 |
1105 | voteWeight[member] += numTokens;
1106 | VoteWeightUpdated(member, numTokens, voteWeight[member]);
1107 | return true;
1108 | }
1109 |
1110 |
1111 | /// @dev allows to cancel the delegation. It will cancel delegation on several
1112 | /// levels through use of recursive call.
1113 | /// @param voter - address of the member who wants to cancel delegation
1114 | /// @param index - position in array of delegated votes
1115 | /// @param first - true if this is first iteration and index needs to be determined
1116 |
1117 | function removeDelegation(address voter, uint index, bool first) {
1118 |
1119 | uint id;
1120 |
1121 | for (uint i = 0; i < delegatedVotes.length; i++){
1122 |
1123 | if (delegatedVotes[i].voter== voter){
1124 | uint idNominee = memberId[delegatedVotes[i].nominee];
1125 | Member n = members[idNominee];
1126 | if (n.delegated){
1127 | removeDelegation(delegatedVotes[i].nominee, index, false);
1128 | }
1129 | else{
1130 | if (first) index = i;
1131 |
1132 | DelegatedVote nv = delegatedVotes[i];
1133 | DelegatedVote vv = delegatedVotes[index];
1134 | voteWeight[nv.nominee] -= vv.weight ;
1135 | voteWeight[vv.voter] += vv.weight ;
1136 | id = memberId[vv.voter];
1137 | Member m = members[id];
1138 | m.delegated = false;
1139 | CancelDelegation(nv.nominee, voter, vv.weight);
1140 | delete delegatedVotes[index];
1141 | }
1142 | }
1143 | }
1144 | }
1145 |
1146 |
1147 | /// @dev allows to delgate votes to another member
1148 | /// @param nominatedAddress - address of the member to delegate vote to
1149 | /// @return voteIndex - position in the array of the delegatio record
1150 | function delegate(address nominatedAddress) returns (uint voteIndex) {
1151 |
1152 | uint id;
1153 |
1154 | uint weight = 0;
1155 | id = memberId[msg.sender];
1156 | Member m = members[id];
1157 | //don't allow members delegation to themselves
1158 | if (nominatedAddress != msg.sender){
1159 | //test if member is not banned
1160 | if (m.canVote){
1161 | //check if member hasn't delegated their vote yet
1162 | if (!m.delegated){
1163 |
1164 | weight = voteWeight[msg.sender] ;
1165 | voteWeight[msg.sender] -= weight;
1166 | voteWeight[nominatedAddress] += weight;
1167 | m.delegated = true;
1168 | //mark delegating member as not delegated in case he/she delegated their votes before himself
1169 | id = memberId[nominatedAddress];
1170 | Member n = members[id];
1171 | n.delegated = false;
1172 |
1173 | //check if this first delegation and handle resizing of array appropriately
1174 | if (delegatedVotes.length == 1 && delegatedVotes[0].nominee == 0 ){
1175 | delegatedVotes[delegatedVotes.length -1] = DelegatedVote({nominee: nominatedAddress, voter: msg.sender, weight:weight});
1176 | }
1177 | else {
1178 | delegatedVotes.length ++;
1179 | delegatedVotes[delegatedVotes.length -1] = DelegatedVote({nominee: nominatedAddress, voter: msg.sender, weight:weight});
1180 | }
1181 | }
1182 | }
1183 | }
1184 | voteIndex = delegatedVotes.length -1;
1185 | Delegated( nominatedAddress, msg.sender , voteIndex);
1186 | }
1187 |
1188 |
1189 |
1190 | /// @dev admin can reset all delegation to 0
1191 | /// return bool - true if executed
1192 |
1193 | function resetDelegation() onlyOwner returns (bool result)
1194 | {
1195 | for (uint i=0; i< members.length; i++) {
1196 | voteWeight[members[i].member] = sharesTokenAddress.balanceOf(members[i].member);
1197 | members[i].delegated= false;
1198 | }
1199 | delete delegatedVotes;
1200 | DelegationReset(true);
1201 | return true;
1202 | }
1203 |
1204 |
1205 | /// @dev admin can set flag of members ability to vote to false or true
1206 | /// @param targetMember - address of a member to set the value of "canVote"
1207 | /// @param canVote - true if member is allowed to vote, false otherwise
1208 | function blockUnblockMember(address targetMember, bool canVote) onlyOwner {
1209 |
1210 | uint id;
1211 | id = memberId[targetMember];
1212 | Member m = members[id];
1213 | m.canVote = canVote;
1214 | BlockUnblockMember(targetMember, canVote);
1215 | }
1216 |
1217 | /// @dev to create new member. Function checks if member with this email address exists and if
1218 | /// it doesn't it creats new member.
1219 | /// @param targetMember - address of the new member
1220 | /// @param canVote - sets this flag initial value
1221 | /// @param firstName -
1222 | /// @param lastName -
1223 | /// @param userID - email address
1224 | /// @param memberHash - email address and password hash to login
1225 | /// @param tokenNum - number of free tokens to assign if any
1226 | /// @param memberReferral - referral of the member
1227 |
1228 | function newMember(address targetMember, bool canVote, string firstName, string lastName, string userID, bytes32 memberHash, uint tokenNum, address memberReferral) {
1229 |
1230 |
1231 | uint id;
1232 | bool delegated = false;
1233 | bool adminFlag = false;
1234 |
1235 |
1236 |
1237 | if (stringsEqualMemory("admin@admin.com", userID)){adminFlag = true;}
1238 |
1239 |
1240 | if(getMemberByUserID(userID) >= 0){
1241 | throw;
1242 |
1243 |
1244 | }
1245 |
1246 | else if (voteWeight[targetMember]==0) {
1247 |
1248 | memberId[targetMember] = members.length ;
1249 | id = members.length++;
1250 | members[id] = Member({member: targetMember, canVote: canVote, memberSince: now, firstName: firstName, lastName:lastName, userID:userID, delegated:false, memberHash:memberHash, admin:adminFlag, referral:memberReferral});
1251 | voteWeight[targetMember]=0;
1252 | numMembers++;
1253 |
1254 | sharesTokenAddress.mintToken(targetMember, tokenNum);
1255 | tokensInCirculation += tokenNum;
1256 | updateVoteWeight( targetMember, tokenNum);
1257 |
1258 | }
1259 | MembershipChanged(targetMember, canVote, firstName, lastName, userID, memberReferral);
1260 |
1261 | }
1262 |
1263 | /// @dev used to login user into their account. To check if given user exists
1264 | /// @param userID - user email address
1265 | /// @return int - member position in the array
1266 | function getMemberByUserID(string userID) constant returns (int memberPosition){
1267 |
1268 | if (members.length == 0) {
1269 | return -1;
1270 | }
1271 |
1272 | for (uint i=0; i < members.length; i++){
1273 | if (stringsEqual(members[i].userID , userID) ){
1274 | return int(i);
1275 | }
1276 |
1277 | }
1278 | return -1;
1279 |
1280 | }
1281 |
1282 |
1283 | /// @notice to compare string when one is in memory and other in storage
1284 | /// @param _a Storage string
1285 | /// @param _b Memory string
1286 |
1287 | function stringsEqual(string storage _a, string memory _b) constant internal returns (bool) {
1288 | bytes storage a = bytes(_a);
1289 | bytes memory b = bytes(_b);
1290 | if (a.length != b.length)
1291 | return false;
1292 | // @todo unroll this loop
1293 | for (uint i = 0; i < a.length; i ++)
1294 | if (a[i] != b[i])
1295 | return false;
1296 | return true;
1297 | }
1298 |
1299 | /// @notice to compare strings which both reside in memory
1300 | /// @param _a Memory string
1301 | /// @param _b Memory string
1302 | function stringsEqualMemory(string memory _a, string memory _b) internal returns (bool) {
1303 |
1304 | bytes memory a = bytes(_a);
1305 | bytes memory b = bytes(_b);
1306 | if (a.length != b.length)
1307 | return false;
1308 | // @todo unroll this loop
1309 | for (uint i = 0; i < a.length; i ++)
1310 | if (a[i] != b[i])
1311 | return false;
1312 | return true;
1313 | }
1314 |
1315 |
1316 | /// @dev helper function to concatenate strings
1317 |
1318 | function strConcat(string _a, string _b, string _c, string _d, string _e) internal constant returns (string){
1319 | bytes memory _ba = bytes(_a);
1320 | bytes memory _bb = bytes(_b);
1321 | bytes memory _bc = bytes(_c);
1322 | bytes memory _bd = bytes(_d);
1323 | bytes memory _be = bytes(_e);
1324 | string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length);
1325 | bytes memory babcde = bytes(abcde);
1326 | uint k = 0;
1327 | for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];
1328 | for (i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];
1329 | for (i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];
1330 | for (i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];
1331 | for (i = 0; i < _be.length; i++) babcde[k++] = _be[i];
1332 | return string(babcde);
1333 | }
1334 |
1335 | function strConcat(string _a, string _b, string _c, string _d) internal constant returns (string) {
1336 | return strConcat(_a, _b, _c, _d, "");
1337 | }
1338 |
1339 | function strConcat(string _a, string _b, string _c) internal returns (string) {
1340 | return strConcat(_a, _b, _c, "", "");
1341 | }
1342 |
1343 | function strConcat(string _a, string _b) internal constant returns (string) {
1344 | return strConcat(_a, _b, "", "", "");
1345 | }
1346 |
1347 |
1348 |
1349 | /// @dev convert uint to string
1350 |
1351 | function uintToString(uint a) internal constant returns (string){
1352 |
1353 | bytes32 st = uintToBytes(a);
1354 | return bytes32ToString(st);
1355 | }
1356 |
1357 | /// @dev convert uint to Bytes
1358 | function uintToBytes(uint v) internal constant returns (bytes32 ret) {
1359 | if (v == 0) {
1360 | ret = '0';
1361 | }
1362 | else {
1363 | while (v > 0) {
1364 | ret = bytes32(uint(ret) / (2 ** 8));
1365 | ret |= bytes32(((v % 10) + 48) * 2 ** (8 * 31));
1366 | v /= 10;
1367 | }
1368 | }
1369 | return ret;
1370 | }
1371 |
1372 | /// @dev convert bytes32 to String
1373 | function bytes32ToString(bytes32 x) internal constant returns (string) {
1374 | bytes memory bytesString = new bytes(32);
1375 | uint charCount = 0;
1376 | for (uint j = 0; j < 32; j++) {
1377 | byte char = byte(bytes32(uint(x) * 2 ** (8 * j)));
1378 | if (char != 0) {
1379 | bytesString[charCount] = char;
1380 | charCount++;
1381 | }
1382 | }
1383 | bytes memory bytesStringTrimmed = new bytes(charCount);
1384 | for (j = 0; j < charCount; j++) {
1385 | bytesStringTrimmed[j] = bytesString[j];
1386 | }
1387 | return string(bytesStringTrimmed);
1388 | }
1389 |
1390 |
1391 | }
1392 | \end{lstlisting}
1393 |
1394 | \subsection {Future development plan}
1395 |
1396 | From a technical standpoint, funds will be used to develop a canonical version of the trust network, the fully automated self-funding structure, additional features for extensibility and automation. This private beta period is expected to last six to nine months and any changes will be decided by network members . Additionally we will be pursuing solid integrations into the legal system for the possession of real assets. Funds will be governed by the private beta with an non-profit used as a failsafe in case of any non-optimally operating smart contracts.
1397 |
1398 | \section { Appendix: Similarities and Differences to "the DAO"}
1399 |
1400 |
1401 | The Network State highly resembles "the DAO" in that it enables a fully decentralized investment system.
1402 |
1403 | It has, however, the following key differences from "the DAO" :
1404 | \begin{enumerate}
1405 |
1406 | \item For the foreseeable future the Network Stack exists within a specific legal container that holds smart contracts accountable to their stated intent.
1407 |
1408 | \item The Network State is designed not simply for decentralization but also for automation and integration with futarchy and other artificial intelligence.
1409 |
1410 | \item The Network State integrates with real assets and has over \$100mm in active currently accessible deal opportunities via our partnerships.
1411 |
1412 | \item The Network State has mechanisms for ensuring both short and long-term stake in the project, including decision making that is highly vested in the founding team.
1413 |
1414 | \item The Network State is being deployed along with a prototype reputational system (i.e. trust currency).
1415 |
1416 | \end{enumerate}
1417 |
1418 | Consequently, it is not incorrect to say that the Network Stack represents an upgraded version of the DAO released with a stable governance structure, curated deal opportunities, and training wheels in case something breaks.
1419 |
1420 |
1421 | \section { Appendix: Version Control}
1422 |
1423 | 0.2.0 Initial private release
1424 | 0.2.1 Add appendixes and move source code to appendix
1425 | 0.2.2 More formatting
1426 | 0.2.3 The DAO Appendix
1427 | 0.2.4 Updated diagrams
1428 | 0.2.5 Numerous small corrections
1429 | 0.3.1 First open release. Github now canonical.
1430 |
1431 |
1432 | \end{document}
1433 |
--------------------------------------------------------------------------------
/whitepapers/metalife.tex:
--------------------------------------------------------------------------------
1 | \documentclass[11pt]{article}
2 | \usepackage{minted}
3 |
4 |
5 |
6 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 | %\pdfminorversion=4
8 | % NOTE: To produce blinded version, replace "0" with "1" below.
9 | \newcommand{\blind}{0}
10 |
11 | %%%%%%% IISE Transactions margin specifications %%%%%%%%%%%%%%%%%%%
12 | % DON'T change margins - should be 1 inch all around.
13 | \addtolength{\oddsidemargin}{-.5in}%
14 | \addtolength{\evensidemargin}{-.5in}%
15 | \addtolength{\textwidth}{1in}%
16 | \addtolength{\textheight}{1.3in}%
17 | \addtolength{\topmargin}{-.8in}%
18 | \makeatletter
19 | \renewcommand\section{\@startsection {section}{1}{\z@}%
20 | {-3.5ex \@plus -1ex \@minus -.2ex}%
21 | {2.3ex \@plus.2ex}%
22 | {\normalfont\fontfamily{phv}\fontsize{16}{19}\bfseries}}
23 | \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
24 | {-3.25ex\@plus -1ex \@minus -.2ex}%
25 | {1.5ex \@plus .2ex}%
26 | {\normalfont\fontfamily{phv}\fontsize{14}{17}\bfseries}}
27 | \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
28 | {-3.25ex\@plus -1ex \@minus -.2ex}%
29 | {1.5ex \@plus .2ex}%
30 | {\normalfont\normalsize\fontfamily{phv}\fontsize{14}{17}\selectfont}}
31 | \makeatother
32 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33 |
34 | %%%%% IISE Transactions package list %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 | \usepackage{amsmath}
36 | \usepackage{graphicx}
37 | \usepackage{enumerate}
38 | \usepackage{xcolor}
39 | \usepackage{natbib} %comment out if you do not have the package
40 | \usepackage{url} % not crucial - just used below for the URL
41 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 |
43 | %%%%% Author package list and commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44 | %%%%% Here are some examples %%%%%%%%%%%%%%
45 | % \usepackage{amsfonts, amsthm, latexsym, amssymb}
46 | % \usepackage{lineno}
47 | % \newcommand{\mb}{\mathbf}
48 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49 |
50 | \begin{document}
51 | \graphicspath{ {./} }
52 |
53 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 | \def\spacingset#1{\renewcommand{\baselinestretch}%
55 | {#1}\small\normalsize} \spacingset{1}
56 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57 |
58 | \if0\blind
59 | {
60 | \title{\bf \emph{Game of MetaLife } }
61 | \author{Joel Dietz $^a$, Peter Suber $^b$ \\
62 | $^a$ Research Affiliate, Connection Science, MIT, Cambridge, MA \\
63 | $^b$ Professor, Berkman Klein Center, Harvard University, Cambridge, MA }
64 | \date{}
65 | \maketitle
66 | } \fi
67 |
68 | \if1\blind
69 | {
70 |
71 | \title{\bf \emph{IISE Transactions} \LaTeX \ Template}
72 | \author{Author information is purposely removed for double-blind review}
73 |
74 | \bigskip
75 | \bigskip
76 | \bigskip
77 | \begin{center}
78 | {\LARGE\bf \emph{IISE Transactions} \LaTeX \ Template}
79 | \end{center}
80 | \medskip
81 | } \fi
82 | \bigskip
83 |
84 | \begin{abstract}
85 | We built a gamified simulator for new computational lifeforms by combining lambda calculus and cellular automata via a custom purpose programming language that has been designed to run simulations across multiple rendering engines (i.e. metalambdas). In short, the authors have discovered (a) it is possible to embed lambdas into cellular automata in a 3d environment (b) these automata can genetically absorb each other, evolve into more complex lifeforms across multiple rendering engines (c) these lifeforms can secure their own computational resources through web3 infrastructure (d) various incentives can be deployed to allow for a more dynamic evolutionary experience. Additionally, we believe this qualifies as the fulfillment of the von Neummann vision of a universal constructor and can create a categorical leap in the science and hardware of computing.
86 |
87 | \end{abstract}
88 |
89 | \noindent%
90 | {\it Keywords:} \emph{Game of Life}; {Zuse Hypothesis};
91 | Universal Constructor ; Lambda Calculus; Nomic; DAO; Monads.
92 |
93 | %\newpage
94 | \spacingset{1.5} % DON'T change the spacing!
95 |
96 |
97 | \section{Introduction} \label{s:intro}
98 |
99 | Conway's Game of Life is well known. A small set of preconditions allows complex life forms to emerge and achieve a stable state. Numerous implementations document the many patterns that emerge including extending it to multiple dimensions. What Conway's Game of Life does not do, however, is give the lifeforms any possibility of evolution. Inserting lambdas into a cellular automaton allows the automaton to express variable complex objects and, if it absorbs other automata, can grow genetically. This is similar to what Von Neumann suggested in his "theory of self-constructing automata," except that this introduces one additional variable, namely that the simulation takes place in game environment in which the lifeform can compete alongside other lifeforms (i.e. a nomic container).
100 |
101 | Similarly Konrad Zuse discussed the possibility of computational universes, including the mathematics of such, and the appropriate algoirthmms for computing them.\footnote{Konrad Zuse, Rechnender Raum, Friedrich Vieweg & Sohn, Braunschweig, 1969.
102 | English translation: Calculating Space, MIT Technical Translation AZT-70-164-GEMIT, MIT (Proj. MAC), Cambridge, Mass. 02139, Feb. 1970. PDF scan. More info here: https://people.idsia.ch/~juergen/digitalphysics.html} MetaLife, in this sense, is an implementation of the Zuse hypothesis made possible with web3 incentives.
103 |
104 | \section{M2: metagame engine for creating computational universes} \label{s:numerical}
105 |
106 | Seeding computational universes requires first creating cellular automata and providing an environment where they can evolve. This means that that each lifeform must have its computation inside of it in a common format that can be deployed across rendering engines. This common we format refer to as a "metalambda" and is a computationally reduced of lambda calculus that can be deployed cross platform along with a metaurl (i.e. fractal addressing space). Consequently, key features of m2 are compositionality, fractal subdivision of space, the ability to set environment variables within a particular space, and the ability to run simulations forward and backwards in time.
107 |
108 |
109 |
110 | \subsection{Units of account} \label{s:numerical}
111 |
112 | To manage this, we must start by dividing space and time into composible parts. Euclidean space is divided into the length of cubes. A first order cube is one Wolfram meter long. Additional cubes exist at a 100x scale factor smaller, such that each cube is the set of the \math{100^3} = 1,000,000 sub-cubes.
113 |
114 | Naming conventions have been derived from the primary contributors to the concept of a computational universe.
115 |
116 | A second in m2 is a computational step and may be subdivided. Consequently, a Max second is 1 computational step, whereas a Descartes second represents 100 computational steps.
117 |
118 | \begin{center}
119 | \begin{tabular}{ |Unit Name|Meter|Time|Math| }
120 | \hline
121 | Unit Name &Meter &Time &Math \\
122 | \hline\hline
123 |
124 | Max Planck & mm & ms & \math{10^0} \\
125 | Decartes & dm & ds & \math{10^2} \\
126 | Wolfram & wm & ws & \math{10^4} \\
127 | Zuse & zm & zs & \math{10^6} \\
128 | Penrose & pm & ps & \math{10^8} \\
129 | Einstein & em & es & \math{10^{10}} \\
130 | Neumann & nm & ns & \math{10^{12}} \\
131 |
132 | \hline
133 | \end{tabular}
134 | \end{center}
135 |
136 |
137 | With this framing I now can refer to the exact location of all objects in all Euclidean spaces, including all metaverses that are implemented in Euclidean geometry at any point in time.
138 |
139 |
140 |
141 |
142 |
143 | \includegraphics[width=\textwidth]{5.png}
144 |
145 | For example, one can place Mars inside a Max Planck Meter length cube and then place smaller cubes inside of it that describe the land tangential to the surfrace of mars, and then further subdivide.
146 |
147 | \subsection{MetaUrls} \label{s:numerical}
148 |
149 | This system of sub-division of space can also be expressed by a url such as follows:
150 |
151 | \url{/1.20.3}
152 |
153 | This equates to the space at the coordinates 1,20,3 in wolfram meters (or, more technically, the vector represented by +1, +20, +3 in the Euclidean x,y,z) We will hereafter refer to this as a metaurl.
154 |
155 | \url{/1.2.3/2.100.3/2.32.30/3.3.3}
156 |
157 | \url{/in Wolfram meters/in Decartes meters/Planck meters/Zuse meters}
158 |
159 | In short, this describes a location at four levels of fractal depth.
160 |
161 | I can now run a simulation at the cube which is at coordinates at this depth by passing the appropriate metalambda command.
162 |
163 | \url{/1.2.3/2.100.3/2.32.30/3.3.0/create(x.l(go(right))))}
164 |
165 |
166 | In short, I have run the create life function to create a cellular automaton and passed that automaton a function which will be its instructions at each computational step.
167 |
168 | If I want to see some future state, I will additionally pass time, in this case 1 Wolfram second (i.e. 10,000 computational steps).
169 |
170 | \url{/1.2.3/2.100.3/2.32.30/3.3.0/create(x.l(go(right))))+1ps}
171 |
172 | The features of function passing will further illustrated in future sections.
173 |
174 | Moreover, if the lifeform or object is to exist across metaverses.
175 |
176 | \section{Game Rules} \label{s:numerical}
177 |
178 |
179 | Each simulation has a set of starting conditions that can also be describe as a game with certain rules.
180 |
181 | The starting variables consist of:
182 |
183 | \textbf{The size of the game board}. By default 100x100x100 cubes.
184 |
185 | \textbf{The existence of any binding physics rules}. By default none, only that the maximum movement in any direction is +1 or -1 in any direction.\footnote{Integrating variable physics rules is the subject of our collaboration with the Wolfram Institute and builds on Stephen Wolfram's work on metamathematics and the ruliad https://writings.stephenwolfram.com/2021/11/the-concept-of-the-ruliad/!}
186 |
187 | \textbf{The number of computational steps per game}. By default 10,000.
188 |
189 | \textbf{Available functions to players}. Passed in one or more files in a standard "metalambda" format.
190 |
191 | \textbf{Energy}. The amount of scattered energy, by default 5000. Computational lifeforms require energy to operate.
192 |
193 | \textbf{Seed}. Default seed, passed as a hexadecimal string and then used to seed the universe with certain computational lifeforms.
194 |
195 | \textbf{Winning Conditions}. By default, the lifeform that has the most energy at the end of a particular number of computational steps wins.
196 |
197 |
198 | The game can be run in competitive mode, where people chose specific conditions (and their own functions) and play to the end, or pseudo-randomized where the game conditions are dynamically change include genetic seeding and mutation for the various functions involved. \footnote{Some competitive modes already built allow for the insertion of additional objects in the playing field and for the human player to "intervene" and take over a particularly object (such as a spaceship), thus creating a non-deterministic model of resolution.}
199 |
200 | \includegraphics[width=\textwidth]{first-game-of-metalife.png}
201 |
202 | Illustrating of the first game of metalife that was run over 10,000 computational steps with two competing CA using different algorithsm in an interactive native 3d BabylonJS powered simulator.
203 |
204 |
205 |
206 | \section{Running the Game} \label{s:numerical}
207 |
208 | \subsection{MetaCell} \label{s:numerical}
209 |
210 | This is the implementation of a MetaCell in the C sharp programming language. In short, it consists of the location of the lifeform in a vector based 3d spatial environment (i.e. metalang) and a lambda that are the instruction of that lifeform of how to operate at each computational step. Additionally it contains an "absorb" function to describe what should happen should this lifeform encounter another one.
211 |
212 | \begin{minted}{python}
213 | namespace MetaLifeEngine
214 | {
215 | public class MetaCell
216 | {
217 | //
218 | // Make composite of the lambda functions - objects - so that we can compare them
219 | //
220 | public MetaCoordinate Coordinates { get; private set; }
221 | public MetaLambda Lambda { get; set; }
222 | public int ComputationComplexity { get; set; }
223 | public CELL_STATE State { get; set; }
224 | public MetaCell(MetaCoordinate coordinates, MetaLambda lambda, int complexity)
225 | => (Coordinates, Lambda, ComputationComplexity, State) = (coordinates, lambda, complexity, CELL_STATE.NONE);
226 |
227 | public void Absorb(MetaCell otherCell)
228 | {
229 | // merge or aggregate the lambdas
230 | this.Lambda = cell => otherCell.Lambda(this.Lambda(cell));
231 | // increase the complexity
232 | this.ComputationComplexity += 1;
233 | }
234 | }
235 | }\end{minted}
236 |
237 | \subsection{Other functions} \label{s:numerical}
238 |
239 | Other implemented functions include the MetaGame, which governs the state in which cells live or die, MetaLambda, the wrapper of lambda functionality, and various functions for creation and maintenance of the Grid and Coordinate space.
240 |
241 | \subsection{Rendering} \label{s:numerical}
242 |
243 | We have built parallel implementations in Unreal Engine (C++), Godot (C sharp), and WebGL (BabylonJS) to illustrate these concepts.
244 |
245 | \section{\emph{Evolution}} \label{s:methods.2}
246 |
247 | With certain starting conditions we can now simulate certain lifeforms starting with crystalline objects.
248 |
249 | \subsection{\emph{State after 0 ms}} \label{s:methods.2}
250 |
251 | \includegraphics[width=\textwidth]{Crystal_Iteration_0.png}
252 |
253 | \subsection{\emph{State after 10 ms}} \label{s:methods.2}
254 |
255 | \includegraphics[width=\textwidth]{Crystal_Iteration_10.png}
256 |
257 | \subsection{\emph{State after 20 ms}} \label{s:methods.2}
258 |
259 | \includegraphics[width=\textwidth]{Crystal_Iteration_20.png}
260 |
261 | \subsection{\emph{State after 30 ms}} \label{s:methods.2}
262 |
263 | \includegraphics[width=\textwidth]{Crystal_Iteration_30.png}
264 |
265 | \subsection{\emph{State after 40 ms}} \label{s:methods.2}
266 |
267 | \includegraphics[width=\textwidth]{Crystal_Iteration_40.png}
268 |
269 | \subsection{\emph{State after 50 ms}} \label{s:methods.2}
270 |
271 | \includegraphics[width=\textwidth]{Crystal_Iteration_50.png}
272 |
273 |
274 |
275 |
276 | \section{\emph{Web3 Bindings}} \label{s:methods.2}
277 |
278 | Web3 primitives conveniently allow anyone to register and own a part of the overall coordinate space.
279 |
280 | This is issued trivially with NFT technology but, less trivially, by passing the metalang instructions along with the initial transaction through metadata (although there are a few APIs that have agreed to integrate this). Also non-trivially, we have implemented a cross-chain Metadao with multiple levels of nesting and an automatic rollup function for the voting in lower level daos.
281 |
282 | \subsection{\emph{DAO usage }} \label{s:methods.3}
283 |
284 | A DAO can also be used to govern the operating variables of the game function, such as the initial starting conditions and the evaluation criteria for each lifeform. In short, curators can decide the ability of a lifeform to continue or gain more energy, and can so on the basis of quantity (i.e. number of unique cells of that lifeform), including altering the starting conditions.
285 |
286 | \subsection{\emph{Alterable default game conditions }} \label{s:methods.3}
287 |
288 |
289 | Starting energy per life form = 100
290 |
291 | Randomly dispersed fuel: 100,000 nuggets of 10 each.
292 |
293 | By default, each parent lifeform has a color and all its children retain that color
294 |
295 | Any invalid function call is not called but subtracts one energy
296 |
297 | Valid operands: if/then, modulus, plus, minus, and create
298 |
299 | Each entry submits a function.
300 |
301 | Winner is the one with most populated color at the end of 1,000 computational steps.
302 |
303 |
304 |
305 | \section{\emph{Philosophical Ramifications... but is it life?}} \label{s:methods.2}
306 |
307 | There is an argument to be made to qualify as life an organism must a) have some degree of sentience b) be able to persist by its own volition. I grant that the version 1.0 of Metalife, described and implemented here, may not qualify in a rigorous philosophical sense as life, but the web3 bindings, especially the ability to render an internal currency system which then, via outbound triggers, allows an advanced lifeform to secure the computational resources it needs for continued survival.
308 |
309 |
310 | \section{\emph{Credits}} \label{s:methods.2}
311 |
312 | The game of MetaLife was inspired by conversations with Peter Suber, founder of Nomic concerning an interactive 21st century version of Conway’s Game of Life, which in turn was sparked by a reading of Hofstadter’s book on Metamagical Themas. It is unique, in the sense that the primary author (Joel Dietz) is a long-time artist and game designer first in addition to various academic initiatives. That means that the priority of the game of metalife is, first and foremost, to make a game. In this sense, it is built on both the academic tradition of Ludology (Huizinga, Piaget, Sutton Smith), the poetic tradition of Herman Hesse, and of the world of game designers world wide. Additionally, meaningful and contributing conversations were also had with James Boyd (launch director of the Wolfram Institute), Juergen Schmidhuber, and, indirectly, Stephen Wolfram. Along the way I found the incompleted work of Von Neumann on universal constructers, which I am highly motivated to bring to completion. In this sense, the game of metalife is a game first and, as such, attempts to engage the world of hobbyists and professional researchers in the worlds of lambda calculus and cellular autonoma. It is also is an interesting tweak on the world of web3, insofar as simulations, modeling life and structured incentives were what attracted me to the space, and I have been periodically active in that space.
313 |
314 | \section{Conclusion}\label{s:conclusion}
315 |
316 | We have described how metalang allows us to map all Euclidean space with perfect composability of space and time and create new lifeforms that can evolve alongside each other with a variety of evaluative functions.
317 |
318 |
319 | \section{Outstanding TODO}\label{s:conclusion}
320 |
321 | \section{Appendix: M2 glossary } \label{s:numerical}
322 |
323 | What we call M2 is a set of logical transformations that allow fields to transform to be more "meta."\footnote{this is similar to metamyth, or the theory of transformations in fields such as reverse euhemerism!}
324 |
325 | \[ M_{2} - Overall framework\]
326 |
327 | \[ M_{\lambda} - Metalambda \]
328 | the definition for functions that can be deployed in multiple rendering engines.
329 |
330 | \[ M_{p} \]
331 | Sets of physics rules
332 |
333 | \[ M_{m} - Metametaverse\]
334 | Deployment environment
335 |
336 |
337 |
338 | \includegraphics[width=\textwidth]{metalifetodo.png}
339 |
340 | \if0\blind{
341 |
342 |
343 | \end{document}
344 |
345 |
--------------------------------------------------------------------------------
/whitepapers/metamonastery:
--------------------------------------------------------------------------------
1 | MetaMonastery Manifesto
2 |
3 |
4 | Intro: the MetaMonastery currently exists in manifesto form. It will exist until there is a 3-5 founding group for the first MetaMonastery willing to accept some variant of these rules and a place found to instantiate the first MetaMonastery.
5 |
6 | [0] The MetaMonastery is inspired by traditional Christian, Buddhist, and Yogic monastic orders with the addition of technological forms of gnosis, quantitative self, and process optimization techniques. As such it attempts to create a new monastic order for the MetaAge. It was inspired by the Meta Villa, a community which existed in Silicon Valley for five years and MetaModernism.
7 |
8 | [1] This is a nomic ruleset, it is transparent by design and can be modified so long as the changes are recorded and also made transparent, along with a backlog of all changes (this is readily available a version tracking systems). The person committing to the ruleset is committing only to the rule set as it exists at a particular time. As of now, only the founding Abbot has the ability to change the rules.
9 |
10 | [2] The MetaMonastery consists of MetaMonks who make a lifelong commitment toward the pursuit of higher vibrations (which can be described as “God” or otherwise). Additionally, it intends to be a “city on a hill” and, as such, attempts to pioneer and set new societal models.
11 |
12 | [3] A person becomes a MetaMonk three stages, a short visit, a year long visit, and a life long commitment. During the year long visit one commits to the rules of the metamonestary and if, after a shorter visit, they decide they want to continue.
13 |
14 | [4] The MetaMonastery consists of regular practices that are committed to by all MetaMonks, including regular meditation, yogic breathing practices, fitness and bodily awareness practices, the cultivation of sexual energy (often by abstinence), and work.
15 |
16 | [5] MetaMonks use a cycle to write down their commitments which is submitted to their superior and which is reviewed on a lunar cycle. Each commitment must be written down in a quantifiable format and first evaluated by the monk in their process. All cycles reports are kept in a register and a longer evaluation is done once per year. This will include regular testing of core metrics for Metamonks relative to fitness, dexterity, and mental acuity.
17 |
18 | [6] MetaMonks are given certain allowances for sexual activities as described in the above format provided that they fall into a framework for self-cultivation. By default this consists of 24 allowances for full and new moon cycles.
19 |
20 | [7] Metamonks go though cycles of imagination and execution, expansion and focus, sensory elation and negation.
21 |
22 | [8] MetaMonks do not have private property. That said, if they have children or other dependents special allowances may be made so that these have adequate means. Any private property in the lead up to the one year dedication period can be held in escrow.
23 |
24 | [9] The MetaMonastery will be practicing a communal ritual and liturgy which consists of chanting and music, with specific focus on polyrhythms.
25 |
26 | [10] Each MetaMonastery consists of an abbot, metamonks, and acolytes (MetaMonks that have not yet made a lifelong commitment), More complex governance systems can be setup at the discretion of the abbot. To be considered a MetaMonastery you must have at least three members.
27 |
28 | [11] Space of the MetaMonastery will be assumed for MetaMonks only except where specific provisions have been made (i.e. open access areas or visiting hours).
29 |
30 | [12] Metamonks are expected to be industrious and have revenue generating projects which go in excess. The MetaMonastery will accept donations for the expansion of specific services.
31 |
32 |
33 | Inspirational figures include: Bernard of Clairvaux, Kukai, St. John of the Cross, Teresa of Avila, Meister Eckhart, Duns Scotus, Anselm, Origen, and Isaiah. More recently, Yogananda, Kripalu, Sivananda, Gudjariff, and Larry Harvey.
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------