# Liquidity

In XdYe Liquidity users will be able to add and remove liquidity from XDYE Dapp. They can also check for the corresponding theoretical ratios based on Pair reserves.

As it happened with Exchange in here users will need to allow the Router contract to operate both tokens, so liquidity can be added.

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2FOjlHaza03XIwDLtMd2pY%2FCaptura%20de%20pantalla%202022-10-14%20a%20las%2013.39.36.png?alt=media&#x26;token=3ed5d49c-0061-48cc-8f72-dd31ba6a10ce" alt=""><figcaption><p>XdYe Liquidity</p></figcaption></figure>

Once both tokens have been approved user can input the amount of any of both tokens and XdYe DEX will tell the necessary amount of the other token he needs too provide in order to become a liquidity provider for that specific pair.

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2FNEKp2VqQwaBLG0vmaNu5%2FCaptura%20de%20pantalla%202022-10-14%20a%20las%2013.49.10.png?alt=media&#x26;token=b907a83f-b317-42a0-b539-cbe628641cd4" alt=""><figcaption><p>User types on 1st Input Field, XdYe Dex writes on 2nd Input Field the needed amount</p></figcaption></figure>

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2F2iDicl9TfxvFSTFdhAfG%2FCaptura%20de%20pantalla%202022-10-14%20a%20las%2013.51.56.png?alt=media&#x26;token=b1ce447a-5436-4419-9e62-edda6a9759de" alt=""><figcaption><p>User types on 2nd Input Field, XdYe Dex writes on 1st Input Field the needed amount</p></figcaption></figure>

As we can see the XdYe Dapp also retrieves the Ratios for both tokens and the pool share you will represent. The bigger pool share the more % of each trade liquidity provider fee you will get.

Once we click on Add Liquidity button, we will get prompt with a pop up that summarizes all transaction information.

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2F4DnqFfMOKPLDFETnMeV5%2FCaptura%20de%20pantalla%202022-10-14%20a%20las%2013.55.15.png?alt=media&#x26;token=cee3cceb-33e4-4a43-9f87-1a73de0c56f8" alt=""><figcaption><p>Summary Pop Up before adding liquidity</p></figcaption></figure>

A Metamask Transaction will prompt, in here we just need to Confirm. So user signs that the liquidity can be provided to XdYe through Router Contract.

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2Fz8BMaoyqZMkBJNcwr0NB%2FCaptura%20de%20pantalla%202022-10-14%20a%20las%2013.56.10.png?alt=media&#x26;token=bf65c7f9-7320-4372-99b3-2416152ec585" alt=""><figcaption></figcaption></figure>

Once liquidity has been added a Notification will appear on TOP-RIGHT corner of the screen. You can also check transaction status on your Metamask Activity Tab.

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2FH7U3tHTywyo6UxDbh48L%2FCaptura%20de%20pantalla%202022-10-14%20a%20las%2013.58.21.png?alt=media&#x26;token=cb739ea6-e442-4444-bc63-e5f0debbac85" alt=""><figcaption></figcaption></figure>

Page will refresh data and if user clicks on My Pool Ratio he would be able to see his Pool Share and an estimate of how many tokens do their LP correspond to.

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2FkwHWnr0LgLVhP9fdy60C%2FCaptura%20de%20pantalla%202022-10-14%20a%20las%2014.00.17.png?alt=media&#x26;token=d4e6b2c8-8de1-4c87-8d17-700a88e84c92" alt=""><figcaption></figcaption></figure>

Finally user can decide to remove his liquidity this is done through clicking on Liquidity Remove Tab. If user does that he will be able to choose a percentage of the Liquidity he wants to withdraw.

Obviously he will need to allow Router to manipulate his LP so he can perform the remove liquidity action.

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2FhIw2D17ZuFlVjeX2tVkN%2FCaptura%20de%20pantalla%202022-10-14%20a%20las%2014.03.00.png?alt=media&#x26;token=939f7fae-20a0-4db3-b78f-bdba9ce8d85a" alt=""><figcaption></figcaption></figure>

Once user removes liquidity he will get a TOP-RIGHT notification telling him if transaction was or not success.

<figure><img src="https://1716109615-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaLpsXqP00Znm3KwSX02Z%2Fuploads%2FRsSKugoQQWBnNTNXJWbN%2FCaptura%20de%20pantalla%202022-10-14%20a%20las%2014.05.08.png?alt=media&#x26;token=72895fae-5236-4885-a940-a9e5851452bd" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Good to know:** If the pair did not exist user will be able to create it and define the ratios, in other words the pair price.
{% endhint %}

You can check it out on:

{% embed url="<https://rogercapone.github.io/xdye/#/liquidity>" %}
XdYe Liquidity
{% endembed %}

{% hint style="warning" %}
**Attention:** If you want to check it out and see real data you will need to make sure to have [added Volta TestNet Network to your Metamask](https://rogercapone.gitbook.io/xdye-documentation/technology/blockchain#which-one-are-we-picking-for-xdye). If you want to interact with XdYe Dapp be sure to have [claimed some VT from Volta Faucet](https://voltafaucet.energyweb.org/).
{% endhint %}
