'Example for addLiquidity method of UniswapV2 Router

I am reading through UniswapV2 docs and can't understand the inputs of addLiquidity method properly. As listed in the docs:

amountAMin (uint): Bounds the extent to which the B/A price can go up before the transaction reverts. Must be <= amountADesired.

amountBMin (uint): Bounds the extent to which the A/B price can go up before the transaction reverts. Must be <= amountBDesired.

What does it mean? Can you please give an example? Let's say, I set amountADesired and amountBDesired to 4 and amountAMin and amountBMin to 1. What will happen?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source