When the median time past<sup>[1]</sup> of the most recent `11` blocks (`MTP - 11`) is greater than or equal to UNIX timestamp `1510600000` Bitcoin Cash will execute a hardfork according to this specification.
Starting from the next block these three consensus rules changes will take effect:
* Enforcement of LOW_S signatures ([BIP 0146](//github.com/bitcoin/bips/blob/master/bip-0146.mediawiki#low_s))
* Enforcement of NULLFAIL ([BIP 0146](//github.com/bitcoin/bips/blob/master/bip-0146.mediawiki#nullfail))
To calculate the difficulty of a given block (`B<sub>n</sub> + 1`), with an `MTP-11`<sup>[1]</sup> greater than or equal to the unix timestamp `1510600000`, perform the following steps:
_NOTE: Implementations must use integer arithmetic only_
1. Let `B<sub>n</sub>` be the Nth block in a Bitcoin Cash Blockchain.
1. Let `B<sub>last</sub>` be chosen<sup>[2]</sup> from `[B<sub>n</sub> - 2, B<sub>n</sub> - 1, B<sub>n</sub>]`.
1. Let `B<sub>first</sub>` be chosen<sup>[2]</sup> from `[B<sub>n</sub> - 146, B<sub>n</sub> - 145, B<sub>n</sub> - 144]`.
1. Let the Timespan (`TS`) be equal to the difference in UNIX timestamps (in seconds) between `B<sub>last</sub>` and `B<sub>first</sub>` within the range `[72 * 600, 288 * 600]`.
Values outside should be treated as their respective limit.
1. Let the Work Performed (`W`) be equal to the difference in chainwork<sup>[3]</sup> between B<sub>last</sub> and B<sub>first</sub>.
1. Let the Projected Work (`PW`) be equal to `(W * 600) / TS`.
1. Let Target (`T`) be equal to the `(2<sup>256</sup> - PW) / PW`. This is calculated by taking the two’s complement of `PW` (`-PW`) and dividing it by `PW` (`-PW / PW`).
1. The target difficulty for block `B<sub>n</sub> + 1` is then equal to the lesser of `T` and `0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF`
> See [GetSuitableBlock](https://github.com/Bitcoin-ABC/bitcoin-abc/commit/be51cf295c239ff6395a0aa67a3e13906aca9cb2#diff-ba91592f703a9d0badf94e67144bc0aaR208)