GithubHelp home page GithubHelp logo

vporton / courts Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 5.11 MB

Crypto Reward Courts

Home Page: https://reward.portonvictor.org

License: GNU General Public License v3.0

JavaScript 97.35% HTML 0.02% CSS 0.01% Solidity 2.60% Shell 0.03%
money aragon common-goods carbon-emissions carbon carbon-footprint global-warming climate climate-change climate-crisis

courts's Introduction

Reward Courts

It's better to rewrite in DAOstack.

Courts That Perform Crypto Rewards Smart Contract

The idea is simple: Courts mint money to them who in any reason have too little (less than they should) money. There is much too much injustice and poverty in this world, and we should do something to solve this problem.

This first idea (mint money out of nothing, to distribute the burden of helping somebody to the entire society) is not new, but it has the drawback that money are decided by a centralized entity. That entity may lose reputation or fail badly. Consider the Australian jurisdiction where the wheel is patented. The same could happen with our crypto courts.

To solve this big drawback, it is proposed to be able to convert money from a currency of one court to a currency of another court. Every token in our system consist of a court ID and an intercourt token.

It is best explained with an example:

Consider the intercourt token HONEST of verifiable honestly earned money. Multiple courts (one entity is not enough to check honesty of everybody in the world) may create their currencies like HONEST1, HONEST2, ..., HONEST10. Then one would build a court H which would allow all these HONEST1, HONEST2, ..., HONEST10 to be converted into its currency. This way we split the work of verifying honesty into multiple organizations and have a "central" hub that based on their decisions verifies honesty automatically.

Now a payment gateway may accept the money H of our hub, or it may choose to use another hub. There is no really "central" hub, it is up to payment gateways and traders to decide which money they accept and which don't. That's the democratic way to control money.

For more details, see the wiki.

This is a project in progress.

Kind of software

Reward Courts is several Ethereum smart contracts with a Web Aragon voting interface around them. So each court usually makes decisions by voting.

Tech stack

  • NPM
  • Truffle
  • Aragon
  • IPFS
  • React

Installation

Release mode

(Note: The release mode is not yet tested.)

TODO

Debug mode

  • Install Aragon CLI:
npm install @aragon/cli
  • Deploy the software on your localhost:
npm start

After it starts, you will see the "Organization address" like 0x63536EE127797BC675659dCC760A59af073dAaB8. Run

./debug-setup.sh <address>

This script will create a core contract and a court associated with your organization.

After this you can mint test (not real) money on your machine.

Tweaks

You may need the following tweaks:

sudo npm install --unsafe-perm=true  [email protected] --global

courts's People

Contributors

dependabot[bot] avatar macor161 avatar vporton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

courts's Issues

How to make an automatic exchange?

I remind that I have a Ethereum ERC-1155 contract with minting facility. Further you can assume full control over a currency in this contract (ability to mint and transfer it).

Need to build an automatic exchange that exchanges some other tokens (including ETH) to our tokens (that could be for example minted as needed). You can assume that the exchange rate is a fixed floating point number.

This bounty requires you to describe (without actually implementing) how the exchange would work.

I see two problems:

  1. We cannot watch EVM events from a smart contract. So we probably need to create our own wallet under our control to which the money is transferred before we direct it to start the exchange operation. But EVM cannot create random numbers. So how to create the wallet securely?

  2. How we give ourselves full control over that temporary wallet to be able to command it to send money? (E.g. if it is ERC-20, then the exchange could not control the token contract and so could not cause it to send the token for the exchange operation. If it is say an ERC-721 or ERC-1155, then the exchange also can't control the contract and the same trouble arises.)

Those problems are somehow solved in decentralized exchanges. Please explain how DEXes work around these and probably other problems.

Related question.

The exchange needs to work through an API (not just in a browser).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.