Gridcoin Research utilises proof of stake (POS) as it's primary distributed consensus mechanism.
In Proof-of-Stake, currency is not mined, but rather minted as yearly compound interest.
As a mint mechanism Proof-of-Stake uses the stake of the holder itself. The larger a user's stake in gridcoin, the higher the probability that the user will mint a block.
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 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.
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.
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. 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, 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.
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:
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 14 days, to check if the credit has been gathered later than 14 days ago. Credit older than 14 days is therefore disregarded. A single Researcher can accrue rewards in a Research Savings Account across multiple devices for up to 14 days. 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.
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. A Monte Carlo simulation has been run to test the fairness of the network, the output and the source code can be reviewed. There is also a google docs, to assist in understanding the variables