forked from gridcoin-community/Whitepaper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproofofresearch.tex
59 lines (30 loc) · 11 KB
/
proofofresearch.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
\section{Distributed Proof of Research}
Editor's note: this chapter is sourced from reference [23].\\
Each participant helps performing research by computations in Gridcoin's network. The network average is similar to difficulty in PoW mining. As the network average rises it becomes harder to get the same magnitude so if you want to keep getting the same reward you would have to add more compute power if we have an environment of a rising network average. If the price rose significantly more compute power would come on board, raising the network average, making it harder to get the same reward, just like difficulty in Proof of Work.
\subsection{Proof of Stake}
Proof-of-Research (PoR) is an algorithm, which combines a scheme to reward Miners for their work with an extremely secure block finding mechanism. This mechanism uses Peercoin's [2] Proof of Stake in Novacoin's [TODOref] and Blackcoin's [TODOref] improvement of it. In Proof-of-Stake, currency is not mined, but minted as yearly compound interest. For this the Researcher needs a Wallet with Gridcoins already inside it. As a mint mechanism Proof-of-Stake uses the stake of the holder itself. The more stake he acquires the higher is the probability that he will mint a block to himself.\\
To calculate the interest reward, coin-age is used. Coin-age is the stake of the investor times the days he held it for. If the investor Bob holds 50 Gridcoins for 3 days, he has acquired 150 coin-age. The higher the coin age, the larger will be the reward compared to the target reward. Once a block is found, the coin age is consumed and starts over again.\\
Novacoin enabled Proof-of-Work as a stand alone function next to Proof-of-Stake [TODOref]. This means work can be calculated separately from interest and allows for separate hash targets.\\
Blocks are generated to meet a certain set yearly hash target for the whole network, for example a 1% increase of total supply per year. This target is therefore adjusted continuously and not every 2 weeks like Bitcoin's difficulty. In Gridcoin the rate listed in the APR schedule is annualized, the rate applied to the coin balance with an APR of 1\% on coins held one day is therefore 1%/365. When transferring the coins to a new address, a lock time of hours takes effect, before age is accumulated again.\\
Gridcoin has eliminated the possibility of a 51% attack, an attack on a standard Proof-of-Work coin, which involves a single entity owning a minimum of 51% of the total network hash rate. To attack Gridcoin in a similar way, the attacker would have to make a 51% buy-out, meaning he needs to own 51% of all the coins. In addition to the 51%, the attacker would have to buy and hold the cumulative stake weight of all nodes with fewer than 30 blocks staked. Since interest is being payed to those who let their nodes run for the network, transaction fees are not needed in theory. However they are still enforced to prevent transaction spam on a single node.\\
These improvements were already made by Blackcoin, which Gridcoin, in an effort to keep up with current technology has implemented. Blackcoin also included the [Zerocash] protocol, a process enabling anonymous transactions. For now this feature has been disabled from the wallet. Potentially this could be used in Gridcoin to guarantee that BOINC accounts cannot be tracked and as a result hijacked.\\
BOINC participation is not required to receive a PoS payment. A wallet that is not associated with a BOINC account is called an Investor.
\subsection{Proof of BOINC}
To prove his contribution of BOINC work a Researcher installs the BOINC software on his PC. He chooses a Project from the Current BOINC Whitelist [TODOref]. Only projects from the Current BOINC Whitelist will yield a reward. The whitelist is update regularly. The Researcher registers at the project with his email and is granted a CPID (cross project identifier), which keeps track of his unique credits. If the system is now conscious of the email, it automatically knows its pairing CPID. At the moment this is done through Netsoft-online, which will not remain a permanent solution. Netsoft also acts as a credit checking farm, next to BOINC stats [TODOref], ensuring that the credits claimed by the owner of a CPID, have the same value as what is stored in the project and later the block chain. The Researcher then starts downloading his work from the server. When he is finished with computing this work container, he sends it back to the server together with a recommendation of credits to be granted for this workload. The server compares this recommendation with another one and then grants the lower credit to both Researchers.\\
To standardize this unit the Researcher calculates his Recent Average Credit (RAC). RAC consists of a daily acquired credits average.\\
TODO: adjust this formula\\
%RAC(new) = RAC(old) * d(t) + (1-d(t)) * Credit(new) , while d(t) = (1/2) ^ ( d / 604800 ) ; t being time in seconds since the last calculation in %the decay function.
This means that Credits older than a week are only weighted half as much. When t=0 (during the first acquistion of credits) RAC=Credits . It is difficult to calculate an accurate prognosis for RAC, since Credits tend to be payed out sporadic.\\
With this RAC a recent savings account (RSA) is created. It keeps track of a potential overflow of magnitude. The magnitude for a single project is calculated with:\\
TODO: adjust this formula\\
%RAC / Network RAC * 100 * Time since last payment in days * Magnitude Multiplier\\
NRAC is the Average of RAC included in the blocks that have so far been mined with RAC from a single project. If no block has been found so far for this Project, a reward of 30 will be granted for every block. If the calculated reward is is greater than the current maximum block subsidy, the overflow is stored in the RSA. The payout is delivered as soon as a Proof-of-Stake Block has been found by a researcher. The factor 100 ensures that the Researcher's RAC is greater than 100 before he receives any additional subsidy on top of his Proof of Stake interest for every found block. Gridcoin uses a lookback period of 6 months, to check if the credit has been gathered later than 6 months ago. Credit older than 6 months is therefore disregarded. A single Researcher can accrue rewards in a Research Savings Account across multiple devices for up to 6 months. The payments are subject to caps in the Maximum Block Subsidy. The Maximum Block Subsidy is the maximum reward that can be accrued per block from the Research Savings Account, and also serves as the daily limit of how much credit can be added to the Research Savings Account.
\subsection{Proof of Research}
To tie these two systems together and create a protocol that is both Proof-of-Work and Proof-of-Stake, but not wasteful of its resources in doing so, values from both algorithms are stored in the block header to provide a point of reference and cryptographic proof. Next to the normal Proof hash of Blackcoin, Gridcoin introduces the hash of the BOINC email together with the distributed client public key, which is used to calculate the CPID. This is called the CPID hashing algorithm. While the CPID is public, it cannot be used, or even stolen by another user, since he also needs the email for that, which only has its hashed value stored. Any invalid CPID is rejected, meaning that the CPID needs to be genuine, and the user has signed up with team gridcoin. The user's magnitude is verified by parsing the XML as a 3rd party. This is described as Accuracy.\\
The verification through Netsoft and other credit checking farms will only be done during the first 6 confirms of a block. Once it is verified, no further evidence is needed. Both rewards are calculated together. As shown in the above reward calculation coin-age is already a part of the function. If somebody with no BOINC work to account for, an investor, finds a block, the values are simply left blank. "Difficulty" is adjusted dynamically similar to Kimoto's Gravity Well [TODOref]. A Monte Carlo simulation has been run to test the fairness of the network, the output [TODOref] and the source code [TODOref] can be reviewed. There is also a google docs [TODOref], to assist in understanding the variables.
\subsection{Research Age}
Research Age was created as a way to eliminate the cap on how many coins a single CPID could earn in a single day. The cap was initially created as a security measure but lead to reduced competition and CPID splitting. Research Age works much like Coin Age. As time passes and as more credits are earned your owed balance increases and when enough is owed if your wallet is connected to the network and unlocked to stake you will receive your reward. What a researcher is owed is commonly referred to as their Research Savings Account or RSA. A video explaining proof of research is [TODOref].
\subsection{How Gridcoin is created}
Gridcoin is created daily from two activities, Proof-of-Stake and Proof-of-Research. Proof of Research is produced at a targeted rate of about 50'000 coins per 1000 blocks. A factor is used to adjust rewards to achieve this target and is called a Magnitude Unit and is stored in the blockchain. If the number of coins generated is too low the Magnitude Unit increases, this increases the number of coins paid for a certain magnitude, if the number of coins generated is too high the Magnitude Unit decreases, this decreases the number of coins paid for a certain magnitude. This has the effect of balancing Proof-of-Research payments with Proof-of-Stake payments. Effectively, if fewer researchers are helping to secure the network, the incentive is increased. The second activity is Proof-of-Stake, and it is produced at an target rate of 1.5% per year, as the coin base increases the number of coins created increases but always at a rate of 1.5\% per year. Proof-of-Stake is in every block, when a Proof-of-Research block is staked the Proof-of-Stake reward is also included.
\subsection{Proof of Research Beacons}
A beacon must be sent to the network to advertise a new CPID. This is performed automatically from the wallet if it is unlocked. The cost is .00011 Gridcoin and must be done once every six months. This beacon allows the Neural Network to know that it must look for that CPID's research credits in whitelisted project credit reporting files. You must stake one block after the beacon is sent before you begin to accrue research owed, the lookback period is 6 months for what a researcher is owed but it looks back to the last staked block, not from when the beacon was sent. To stake a block you must start with some coins, these can be purchased from an exchange or acquired from one of many faucets, or through the IRC channel faucet and tipping system. The more coins you begin with the faster you will stake your first block, however, to help new researchers with low coin balances stake their first block a stake weight bonus is added, a balance of 100 coins should have no problem staking it's first block in less than 5 days provided that the wallet is online and unlocked for staking all the time. The initial age coins must be before they are able to stake is 16 hours.