I have a token-tez pool on quipuswap v2 dex.
I want to calculate how much tez should I provide to dex to buy back the
x amount of tokens from the dex.
I want to perform this action in a smartpy contract.
What is the formula to calculate this?
How can I do that?