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.