I'm looking for formulas on how Monero/CryptoNight/Keccak1600 are calculating difficulty and current target.

E.g. something like:

max_target =?
current_target = f(max_target, blockrate) //some function f

I assume these are different from bitcoin/SHA256.

I'm not interested in mining profitability calculations per second, just in the basics of the PoW algorithms.

1 Answer 1


The specific difficulty target function can be found in the source code here.

Difficulty is adjusted so that a block is mined every 120 seconds on average. What affects this is the total network hashrate and the time it's taking to mine a block. If total network hashrate is high, difficulty is adjusted up. If total network hashrate is low, difficulty is adjusted down, so that a block is expected to be be mined in 120 seconds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.