DEFINITION of 'Nonce'

A nonce ("number only used once") is a number added to a hashed block that, when rehashed, meets the difficulty level restrictions. The nonce is the number that blockchain miners are solving for.

BREAKING DOWN 'Nonce'

The blockchain is the cornerstone of cryptocurrency. In order to keep the blockchain secure, data from previous blocks are encrypted or “hashed” into a series of numbers and letters. This is done by processing the block input through a function, which produces an output of a fixed length. The function used to generate the hash is deterministic, meaning that it will produce the same result each time the same input is used; can generate a hashed input efficiently; makes determining the input difficult (leading to mining); and makes small changes to the input result in a very different hash.

Adding transactions to the blockchain requires substantial computer processing power. The individuals and companies who process blocks are called miners. Miners are compensated only if they are the first to create a hash that meets a certain set of requirements, called the target hash.

The process of guessing the hash starts in the block header. It contains the block version number, a timestamp, the hash used in the previous block, the hash of the Merkle Root, the nonce, and the target hash. Successfully mining a block requires a miner to be the first to guess the nonce, which is a random string of numbers. This number is appended to the hashed contents of the block, and then rehashed. If the hash meets the requirements set forth in the target, then the block is added to the blockchain. Cycling through solutions in order to guess the nonce is referred to as proof of work, and the miner who is able to find the value is awarded the block and paid in cryptocurrency.

Determining which string to use as the nonce requires significant amount of trial-and-error, as it is a random string. A miner must guess a nonce, append it to the hash of the current header, rehash the value, and compare this to the target hash. If the resulting hash value meets the requirements, the miner has created a solution and is awarded the block. It is highly unlikely that a miner will successfully guess the nonce on the first try, meaning that the miner may potentially test a large number of nonce options before getting it right. The greater the difficulty - a measure of how hard it is to create a hash that is less than the target - the longer it is likely to take to generate a solution.

Block difficulty is kept the same across the entire network, meaning that all miners have the same chance of figuring out the correct hash. Cryptocurrency networks typically establish a target number of blocks they want processed during a specific time period, and periodically adjust the difficulty in order to ensure that this target is met. If the number of blocks processed does not meet this target then the difficulty will be reduced, with the reduction in difficulty set to the amount of time over the limit the processing time was. 

RELATED TERMS
  1. Difficulty (Cryptocurrencies)

    Difficulty is a parameter that bitcoin and other cryptocurrencies ...
  2. Proof of Work

    Proof of work describes the process that allows the bitcoin network ...
  3. Proof of Capacity (Cryptocurrency)

    Proof of Capacity consensus mechanism uses a mining node’s hard ...
  4. Block Header (Cryptocurrency)

    A block header is the unique identity of a particular block on ...
  5. Block Time (Cryptocurrency)

    Block time is the average time for a new block to be generated ...
  6. Uncle Block (Cryptocurrency)

    Uncle blocks are orphan blocks on the Ethereum network, and miners ...
Related Articles
  1. Tech

    How Bitcoin Works

    Miners, hashes, keys, cold storage, blocks - it's confusing. We can help you understand how bitcoin works.
  2. Tech

    How Does Bitcoin Mining Work?

    Bitcoin mining, explained like you're five.
  3. Trading

    Bitcoin Cash: The New King of Cryptocurrency?

    Investors are wondering if the popularity of Bitcoin Cash poses a serious threat to the Bitcoin throne.
  4. Tech

    How Do You Mine Litecoin?

    This guide will give you a sense of the concepts in litecoin mining, an introduction to the vocabulary and suggestions for further research.
  5. Tech

    How to Choose a Cryptocurrency Mining Pool

    Here are some selection criteria cryptocurrency miners should consider before joining a crypto mining pool.
  6. Tech

    What is the Genesis Block in Bitcoin Terms?

    Learn more about the Genesis Block, the original Bitcoin block.
  7. Tech

    Is Bitcoin Mining Still Profitable?

    Recent changes in technology and the creation of professional mining centers individual miners are asking themselves, is bitcoin mining still profitable?
  8. Tech

    Bitcoin vs. Bitcoin Cash: What's the Difference?

    We break down the difference between Bitcoin and Bitcoin Cash, and what it might mean for the future of cryptocurrencies
  9. Investing

    H&R Block Stock: Time to Consider Selling?

    The tax prep company's shares are up 33.6% YTD. Is it time to take gains, or do fundamentals support the new valuation?
  10. Tech

    Bitcoin Is Dead? Not A Chance

    The price of the digital currency, Bitcoin, fell from around $450 to below $380 late last week following the departure of long-time developer Mike Hearn.
RELATED FAQS
  1. What does "squeezing the shorts" mean?

    "Squeezing the shorts" refers to a questionable practice in which a trader takes advantage of a stock that has been short ... Read Answer >>
  2. If I reject the tender offer for acquisition of the stock that I own in a company ...

    Since the passing of the Sarbanes-Oxley Act, a significant number of public companies have chosen to go private. The reasons ... Read Answer >>
  3. What's the difference between diminishing marginal returns and returns to scale?

    Understand the main differences between the law of diminishing marginal returns and the concept of returns to scale through ... Read Answer >>
  4. What are some examples of ways that sensitivity analysis can be used?

    Understand the concept of sensitivity analysis and learn about the wide variety of disciplines to which it can be applied. Read Answer >>
Hot Definitions
  1. Return On Equity - ROE

    The profitability returned in direct relation to shareholders' investments is called the return on equity.
  2. Working Capital

    Working capital, also known as net working capital is a measure of a company's liquidity and operational efficiency.
  3. Bond

    A bond is a fixed income investment in which an investor loans money to an entity (corporate or governmental) that borrows ...
  4. Compound Annual Growth Rate - CAGR

    The Compound Annual Growth Rate (CAGR) is the mean annual growth rate of an investment over a specified period of time longer ...
  5. Net Present Value - NPV

    Net Present Value (NPV) is the difference between the present value of cash inflows and the present value of cash outflows ...
  6. Price-Earnings Ratio - P/E Ratio

    The Price-to-Earnings Ratio or P/E ratio is a ratio for valuing a company that measures its current share price relative ...
Trading Center