amount = amount which user wants to swap
expectedAmount = expected amount, received using runLocal on contract (https://github.com/broxus/ton-dex/blob/a2b6972f325ae3d5c9147ff1971962a58b94b846/contracts/DexPair.sol#L882-L890)
leftBalance = left currency supply
rightBalance = right currency supply
minimumReceive = expectedAmount * (100 - slippage) / 100
start = leftBalance / rightBalance
end = (leftBalance + amount) / (rightBalance - expectedAmount)
priceImpact = end / start * 100