We've solved the 2nd task in the Peanut Trade bounty Category.
UniswapV2Router Sandwich Alterter
By adding a swaps per block log to our version of a UniswapV2 Router, after detecting a sequence of swaps (buy, buy, sell) or (sell, sell, buy) we can simulate the sandwich'd users trade if there was no sandwich, and then compare the output amounts. If the result of the comparison confirms the trade would be better had the trade that backrun the user not happened we can confirm the user got sandwiched! Then we just mint an NFT to him.
Sandwich-less UniswapV2 pool
Classic UniV2 pools are vulnerable to sandwich attacks when hackers take advantage of user swaps by leveraging the token price with users' liquidity.
Current implementation solves this problem, as it allows to get the output token only on the next block, therefore making it impossible for hackers to use their liquidity in a sandwich attack.
At the same time, due to batching, the current approach allows to average of the output amounts for different users ignoring the swap orders.