  In this paper, we review the undercutting attacks in the
transaction-fee-based regime of proof-of-work (PoW) blockchains with the
longest chain fork-choice rule. Next, we focus on the problem of fluctuations
in mining revenue and the mining gap - i.e., a situation, in which the
immediate reward from transaction fees does not cover miners' expenditures.
  To mitigate these issues, we propose a solution that splits transaction fees
from a mined block into two parts - (1) an instant reward for the miner of a
block and (2) a deposit sent to one or more fee-redistribution smart contracts
($\mathcal{FRSC}$s) that are part of the consensus protocol. At the same time,
these redistribution smart contracts reward the miner of a block with a certain
fraction of the accumulated funds of the incoming fees over a predefined time.
This setting enables us to achieve several interesting properties that are
beneficial for the incentive stability and security of the protocol.
  With our solution, the fraction of Default-Compliant miners who strictly do
not execute undercutting attacks is lowered from the state-of-the-art result of
66% to 30%.
