# What Causes GRIN Block Difficulty Changes?

**URL:** <https://forum.grin.mw/t/what-causes-grin-block-difficulty-changes/7072>\
**Category:** Uncategorized\
**Created:** [February 17, 2020, 7:31pm UTC](https://forum.grin.mw/t/what-causes-grin-block-difficulty-changes/7072 "2020-02-17T19:31:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mino](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/mino/32/2971_2.png) [@mino](https://forum.grin.mw/u/mino)\
**Post date:** [February 17, 2020, 7:31pm UTC](https://forum.grin.mw/t/what-causes-grin-block-difficulty-changes/7072/1 "2020-02-17T19:31:04Z")

</div>

I have been monitoring the block difficulties for the last few weeks and can see a fair bit of fluctuation, but I cannot see what causes a change in the difficulty.

Can someone help me understand this? What factors create the change in difficulty? Is there a formula that governs this?

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [February 17, 2020, 10:11pm UTC](https://forum.grin.mw/t/what-causes-grin-block-difficulty-changes/7072/2 "2020-02-17T22:11:43Z")

</div>

It changes according to how long the last 60 blocks took to be solved:

> <https://github.com/mimblewimble/grin/blob/master/core/src/consensus.rs#L300-L347>

---

<div class="post-metadata">

**Author:** ![mino](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/mino/32/2971_2.png) [@mino](https://forum.grin.mw/u/mino)\
**Post date:** [February 18, 2020, 6:59am UTC](https://forum.grin.mw/t/what-causes-grin-block-difficulty-changes/7072/3 "2020-02-18T06:59:03Z")

</div>

Brilliant! Thanks John - that definitely answers the question.
