Crypto Courts (Reward System) Whitepaper [DRAFT]

This specification had a security bug: It was possible to spend all court limit by repeatedly transferring money fort and back. It is now superseded by this up-to-date specification.

It is a complete specification to implement the idea first described here.

Nontechnical Overview

Not every person or organization receives the reward he or she deserves. There are:

In the real world such compensations are often made by courts, so I propose what I call Crypto Courts (Reward System).

A Crypto Court could be any person or organization or machine in control of a crypto token account that would be able to reward anybody he chooses to receive reward in the form of some amount of a crypto token. This amount is arbitrarily chosen (as limited by the court spending limit, see below) by a court. The court’s account is not discharged the amount of crypto it donates to another account, the court money “appear out of the air”. This means that court rewards somebody from the resources of the entire Network (that often equals to the entire mankind). So the courts represent the entire Network, not one’s particular money holding account.

We would also allow a court to fine somebody, but that’s not well-possible because it is too easy to hide the money at another specifically created or otherwise wallet.

Judging is often subjective. Because of this, it is necessary for users of the system to approve only some courts not all of them. So with each court there will be associated a crypto token. If the court judges wrongly (take for an example that the wheel was patented in Australia), then the value of its token could diminish. This way acceptance of court decisions becomes democratic (decentralized).

A court can hold a list of other courts whose decisions he allows to accept (subject to court spending limit in this relationship). So courts form a directed graph of trust between different courts.

Technical Overview

The system is proposed to be implemented as an ERC-721 token.

In the system there are:

  • courts
  • accounts
  • wallets

Courts and accounts are Ethereum addresses. Wallets are special Ethereum addresses that are composed from a court address and wallet address by the formula:

wallet = address(uint256(keccak256(abi.encodePacked(court, account))))

For each wallet it is kept track of its court and account. A ERC-721 token transfer from a wallet to another wallet is possible if and only if they belong to the same court (and the amount of money is enough for the transfer).

It is also possible to transfer money between wallets of different courts. To do this, the transaction initiator needs to provide a path of courts starting from the source account court: Each next court in the path must be in the list of courts approving the previous one and the last one must be the court of the destination account. The transfer is approved only if the transfer sum is not above each of the spending limits of the link of the path. For each link, if a spending limit in the path is finite, the transferred sum is subtracted from the spending limit of the court. [TODO: What to do if a user supplies a path with cycles?]

The court owner can add any sum to any wallet of this same court.

The court owner can add or remove any other courts to/from the list of its trusted courts and set spending limits for them to any positive, zero, or infinite sum.

A court can also set a own spending limit to itself (solely to avoid incidental errors) and it prevents rewards above this sum. Every reward of a court is subtracted from its own spending limit (unless the own spending limit is infinite).

We can have more than one owner.

The API Specification


One comment

Leave a Reply