Withdrawing from a smart contract
Users with liquidity stored in pools can also withdraw their underlying tokens back to their wallets.
#
Using the RouterThe easiest way to safely remove liquidity from a pool is to use the router, which provides simple methods to safely remove liquidity from a pool. If the liquidity is to be removed from an ERC-20 pool, use withdraw. If WETH is involved, use withdrawETH.
There are also variants of these two methods that can be called by providing an EIP-712 compliant signature. Using this method skips having the approve the router to burn the liquidity thereby saving gas fees. Withdrawing liquidity from an ERC-20 pool using an EIP-712 compliant signature can be accomplished by using withdrawWithPermit. If WETH is involved, use withdrawETHWithPermit.