> At block 1788000, Monero will switch PoW from CryptoNight variant 2 to variant 4

The current naming is a little misleading as we are really on variant 3 right now, with the next being variant 4. This is because variant 2 actually spanned 2 releases in quick succession. Naming aside...

> How is that second goal technically achieved in practice ?

The best answer is probably found in the [README][1] from the original proposal. Quoting two pieces:

> It introduces random integer math into CryptonightV2 main loop.
>
> ...
>
> Instruction set is chosen from instructions that are
> efficient on CPUs/GPUs compared to ASIC: all of them except XOR are
> complex operations at logic circuit level and require O(logN) gate
> delay. These operations have been studied extensively for decades and
> modern CPUs/GPUs already have the best implementations.

Ultimately, the idea here (and in other similar proposals such as RandomX/RandomJS), is that the hashing function has to execute some random instructions (a program) which essentially means an ASIC/FPGA would need to have the properties of a CPU/GPU - being good at performing *general purpose* tasks. This defeats the whole purpose of an ASIC (application specific), therefore the idea is an ASIC can't be as good as general purpose hardware like CPUs/GPUs.

Whether CryptonightR's implementation holds out in the longer term, or whether future tweaks are later needed, only time will tell. But this does seem to be a longer term fix to the problem than the previous CN "tweaks". It will almost certainly obliterate any *current* ASICs/FPGAs and make future ASIC/FPGA development targeting the algorithm a costly endeavor that may not yield a device as profitable to mine with as CPUs/GPUs.

  [1]: https://github.com/SChernykh/CryptonightR
  [2]: https://github.com/SChernykh/CryptonightR#design-choices