I'm studying UniswapV2Pair.sol https://github.com/Uniswap/v2-core/blob/master/contracts/UniswapV2Pair.sol and I have some question about mint and burn function.
What I understand:
- When user deposit the token pair,
mintfunction mints the new liquidity token and send to the user - When user withdraw the token pair,
burnfunction burns the new liquidity token and sends the deposited token pair back to user .
What I'm confused:
I'm confused about the bold part of burn function I mentioned above. I think that mint and burn function is like mirror(opposite) function, but mint function doesn't includes the feature which token pair are send to the exchange contract. However, burn function uses _safeTransfer which send the token pair back to user.
I'm confused why did they designed assymetrically.