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 PoW.
After some security problems with the original Gridcoin Client, which directly measured BOINC CPU utility, Rob Halford started designing a solution for this problem, which was then implemented step by step. He first mentioned a transition to a protocol similar to Primecoin in early February 2014. Anonerd started to refer to this protocol as "Proof-of-Research" in a post on cryptocointalk. After a series of Testnet trials between March and October 2014 and updating the source code to prepare it for its conversion, Proof-of-Research was finally released on October 11th, 2014.
Looking for help? Find all necessary aspects in our FAQ!
- 1 Proof-of-Stake
- 2 Proof-of-BOINC
- 3 Proof-of-Research
- 4 Research Age
- 5 How Gridcoin is Created
- 6 Proof-of-Research Beacons
- 7 Proof-of-Research Reward Calculation
- 8 Proof-of-Research Reward Schedule Prior to Research Age Implementation July 2015
- 9 Gridcoin-Research Reward Calculation Example Prior to Research Age Implementation July 2015
- 10 Research Savings Account Prior to Research Age Implementation July 2015
- 11 Protocol and Architecture
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 Proof of Stake in Novacoin's and Blackcoin's 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. 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[additional information needed].
BOINC participation is not required to receive a PoS payment. A wallet that is not associated with a BOINC account is called an Investor.
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 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.
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
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. Click here for a video explaining proof of research.
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.
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.
Proof-of-Research Reward Calculation
- A researcher is rewarded for their outstanding owed at a rate of Research_Age * Magnitude * Magnitude_Unit.
- Research_Age is the time from the last Proof-of-Research block the CPID staked in days
- Magnitude_Unit is the factor that adjusts the coin production for 1000 blocks, if coin production is low it is increased, if coin production is high it is decreased.
- Magnitude is the sum of Project Magnitudes a CPID is running.
- Project Magnitude is calculated in this way: ((Researcher_RAC/Team_RAC)/Number_Whitelist_Projects) * 115000
- Number_Whitelist_Projects can be found by running the command "list projects" from the wallet console which lists the projects that are whitelisted
- Researcher_RAC is the Recent Average Credit (RAC) for an individual CPID
- Team_RAC is the total of all team members RAC running the project
- RAC is defined by BOINC, Learn more about RAC here.
Proof-of-Research Reward Schedule Prior to Research Age Implementation July 2015
The Magnitude Multiplier was depreciated in July 2015.
|Unix Time||UTC Date||Max Block||Interest||Magnitude|
Magnitude = (SumOfAllOfYourProjectWeightedMagnitudes/WhiteListedProjectCount) * WhitelistedProjectsWithRACOver100
Use command "explainmagnitude" in the console to see how your individual magnitude is calculated.
This is a sum of your individual project magnitudes. Individual magnitude for a project is found by dividing individual RAC by Gridcoin Team RAC for that project. Mathematically: project_magnitude = UserVerifiedRAC/(ProjectRAC) * 100
Use command "list projects" in the console to see the current whitelist. As of April 24, 2015 there were 37 whitelisted projects.
Alternatively you can find the whitelist with each projects current network averages here: http://gridresearchcorp.com/gridcoin/?result&t=Whitelisted_Project_Leaderboard
Use command "list cpids" in the console to see your current project list. Each project with RAC > 100 and Gridcoin as the Verified Team is a participating project
Gridcoin-Research Reward Calculation Example Prior to Research Age Implementation July 2015
The date is November 30th, 2015. The Maximum Block Subsidy is 50 and the Researcher is producing research at a rate that achieves the maximum reward per day, or 50 coins. The Researchers wallet is not online for 3 days but they continue to contribute to BOINC at the same rate. After day 3 the Researcher's Research Savings Account has a balance of 150 coins and he opens his wallet. Shortly after opening the wallet the Researcher begins finding blocks. Each block payment is a PoS payment + PoR payment if there is more than 10% of the Maximum Block Subsidy available in his Research Savings account. The Researchers PoR payments and balances would look like the following:
|Mined Block Count||Research Savings Account||Total Owed (from RSA)||Payment|
When the Researcher found his 7th block the Research Savings Account balance was below 10% of the Maximum Block Subsidy (5.0) which results in no PoR payment, resulting in an Interest (PoS) block. The researcher does however keep that amount in his Research Savings account until he accrues enough to qualify for another payment and will continue to receive his PoS payments.
The "Total Owed" can be misleading when thinking in terms of the Research Savings Account. It is capped at the reward max which as of January 29th, 2015 is 400 but is scheduled to decrease based on the Reward Schedule. You are paid the "Total Owed" amount until your RSA balance is less than 2x the "Total Owed" at which point you are paid half of "Total Owed" until it is less than 10% of the current subsidy maximum payment. If your research savings account is higher than the max then owed will remain at the max until the research savings account is less than the max at which point "owed" and your research savings account will be the same number. Think of it like an transaction limit on a traditional savings account. You have a transaction limit on how much you can withdraw in any one transaction, but there is a minimum withdraw amount as well. So your transaction limit is the lower of the Maximum Research Subsidy or half of your Research Savings Account balance.
Research Savings Account Prior to Research Age Implementation July 2015
The RSA was changed in July 2015, please see a description of current implementation above.
The Research Savings Account (RSA) is a feature unique to Gridcoin. This feature pays for contributions to scientific computations the same way a pay per share pool would pay for hashing a Proof-of-Work algorithm. The work done on scientific computations through BOINC is measured through credits. These credits are used to calculate a Researchers reward. The credits you accrue are not lost but held in the RSA until the researcher finds a block and claims their reward. The credits have a 14 day lookback window, meaning they expire in 6 months if a researcher does not find a block and claim their reward.
Under Proof-of-Research you do not actually lose coins from orphaned blocks like you would in any other coin if you found blocks on a fork. There is a 14 day lookback and as long as you find your confirmed blocks in that time you will get credit for the research you have done according to the magnitude stored in the Research Savings Account.
Also a number of security features are introduced to protect certain aspects of Gridcoin. Credit checking farms are used to secure BOINC credits, a BOINC hash in every Block's header is used as a point of reference and cryptographic proof, making rebuilding a malicious chain in a separate environment as difficult as with any other Proof-of-Work scheme, user information is being protocted as far as possible and lastly the Zerocoin/Zerocash protocol, though at the moment inactive, could potential provide complete user anonymity.
Calculating mining profitability is still possible, use this official resource: http://pool.gridcoin.us/ProfitabilityCalculator.aspx
Protocol and Architecture
Gridcoin has a complex architecture that results from numerous forks from other crytocurrencies and trying to measure BOINC work in a secure manner. It uses parts from source code of Bitcoin, Litecoin, Novacoin, Peercoin and Blackcoin for its Proof-of-Stake. This means that the scrypt algo is still used for a small proportion of Proof-of-Work, while addresses are hashed using sha 256. The wallet itself is built into a generation 2 theme using qt-5. Gridcoin allows full sql queries against its chain. Most of the Gridcoin protocol is written in c++ using tools such as boost, g++ and the Berkley db to compile. The main mint algorithm can be reviewed in the Github Repository under Gridcoin-Research/src/main.cpp.