1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00
docs/user-guides/remove-liquidity-pools.md

43 lines
2.4 KiB
Markdown
Raw Normal View History

# Liquidity Pools \[deprecated]
2022-07-28 17:13:12 +02:00
Liquidity pools and dynamic pricing used to be supported in previous versions of the Ocean Market. However, these features have been deprecated and now we advise everyone to remove their liquidity from the remaining pools. It is no longer possible to do this via Ocean Market, so please follow this guide to remove your liquidity via etherscan.
## Remove liquidity using Etherscan
### Get your balance of pool share tokens
2022-07-28 17:13:12 +02:00
1. Go to the pool's Etherscan/Polygonscan page. You can find it by inspecting your transactions on your account's Etherscan page under _Erc20 Token Txns_.
2. Click _View All_ and look for Ocean Pool Token (OPT) transfers. Those transactions always come from the pool contract, which you can click on.
3. On the pool contract page, go to _Contract_ -> _Read Contract_.
<figure><img src="../.gitbook/assets/liquidity/read-contract.png" alt=""><figcaption><p>Read Contract</p></figcaption></figure>
2022-07-31 16:20:10 +02:00
4\. Go to field `20. balanceOf` and insert your ETH address. This will retrieve your pool share token balance in wei.
2023-06-30 16:01:40 +02:00
<figure><img src="../.gitbook/assets/liquidity/remove-liquidity-2.png" alt=""><figcaption><p>Balance Of</p></figcaption></figure>
2022-07-31 16:20:10 +02:00
5\. Copy this number as later you will use it as the `poolAmountIn` parameter.
2022-07-28 17:13:12 +02:00
2022-07-31 16:20:10 +02:00
6\. Go to field `55. totalSupply` to get the total amount of pool shares, in wei.
<figure><img src="../.gitbook/assets/liquidity/total-supply.png" alt=""><figcaption><p>Total Supply</p></figcaption></figure>
2022-07-31 16:20:10 +02:00
7\. Divide the number by 2 to get the maximum of pool shares you can send in one pool exit transaction. If your number retrieved in former step is bigger, you have to send multiple transactions.
2022-07-28 17:13:12 +02:00
2022-07-31 16:20:10 +02:00
8\. Go to _Contract_ -> _Write Contract_ and connect your wallet. Be sure to have your wallet connected to network of the pool.
<figure><img src="../.gitbook/assets/liquidity/write-contract.png" alt=""><figcaption><p>Write Contract</p></figcaption></figure>
2022-07-31 16:20:10 +02:00
9\. Go to the field `5. exitswapPoolAmountIn`
2023-05-04 18:33:48 +02:00
* For `poolAmountIn` add your pool shares in wei
* For `minAmountOut` use anything, like `1`
* Hit _Write_
*
<figure><img src="../.gitbook/assets/liquidity/remove-liquidity.png" alt=""><figcaption><p>Remove Liquidity</p></figcaption></figure>
2022-07-31 16:20:10 +02:00
10\. Confirm transaction in Metamask
2023-06-30 16:01:40 +02:00
<figure><img src="../.gitbook/assets/liquidity/remove-liquidity-6.png" alt=""><figcaption><p>Confirm transaction</p></figcaption></figure>