Skip to content

Latest commit

 

History

History
16 lines (15 loc) · 2.63 KB

Removing Liquidity From V3 pools.md

File metadata and controls

16 lines (15 loc) · 2.63 KB

NOTE
PLEASE KEEP IN MIND THAT ALL VALUES (AMOUNTS, ADDRESSES, ETC..) ARE JUST FOR EXAMPLE. WHEN INTERACTING WITH THE SMART CONTRACTS USERS SHOULD USE THEIR OWN WALLET ADDRESSES, CORRESPONDING CONTRACT ADDRESSES AND AMOUNT VALUES !!!

  1. Go to NonfungiblePositionManager contract address on the block explorer (for the desired chain - here we use an Arbitrum example) and select "Read contract"/"Read as proxy" (https://arbiscan.io/address/0xF0cBce1942A68BEB3d1b73F0dd86C8DCc363eF49#readProxyContract)

  2. Scroll down to 11.positions, click on it and enter the ID of the NFT token that represent your liquidity postion. Then click "query"

  3. Copy the liquidity amount image

  4. Select "Write contract"/Write as proxy"

  5. Connect to web3

  6. Scroll down to 5.decreaseLiquidity and click on it

  7. In the first field (decreaseLiquidity) put 0, in the second put the params, which are as follow: your token ID, your liquidty amount (the one you coppied from "Read Contract"), the minimum amopunt of the first token (token0) you would accept, the mininimum amount of second token (token1) you would accept, deadline(the date - in unixtimestamp - after which the transaction should fail if have not been processed yet). Keep in mnind that token amounts should be in unit 256, so check the decimals of each token image

  8. Click "write". If the transaction cost shown on user's wallet is too high it means there is a problem, so should not be confiremed. Have to check all the data and if there are no errors may simulate the transaction on Tennderly to see what the problem may be.

  9. After successfull decreaseLiquidity transaction go to 3.collect. In the first field (collect) put 0. In the second field put the following params: your token ID, YOUR ADDRESS, max amount of token0 you want to receive, max amount of token1 you want to receieve (max amounts can be any nuber greater than the number of tokens your postions holds). image

  10. Click "write". If the transaction cost shown on user's wallet is too high it means there is a problem, so should not be confiremed. Have to check all the data and if there are no errors may simulate the transaction on Tennderly to see what the problem may be.