i hope some expert in coding will post a solution for this
also make sure there is a minimum fees also
and as tx fee 2% or minimum is charged which of them is higher
So you want 2% to go directly into the next Block? sounds like a lucky payday for whoever mines that Block.
I've looked into this quite a bit and would only really be possible if you can average out the fees over a large number of Blocks, also you need to take into account the actual cost of the transaction in terms of the amount of data it adds to the Blockchain.
A Coin called FractalCoin tried to implement this but the Coin was abandoned pretty early on and so it didn't progress.
also there should be a minimum and maximum tx fees cap limit