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 !!!
-
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)
-
Scroll down to 11.positions, click on it and enter the ID of the NFT token that represent your liquidity postion. Then click "query"
-
Select "Write contract"/Write as proxy"
-
Connect to web3
-
Scroll down to 5.decreaseLiquidity and click on it
-
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
-
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.
-
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).
-
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.