refactor: rename "liquidity providers" by "liquidity pools" to include pool creation feature

This commit is contained in:
sofinico
2024-10-07 18:02:31 +02:00
parent cc746f555c
commit 692aad9033
10 changed files with 44 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
redirects:
product-features/liquidity-pool: product-features/liquidity-providers/README.md
product-features/liquidity-pool: product-features/liquidity-pools/README.md
product-features/liquidity-pool/self-service-listing: product-features/self-service-listing.md
how-to/how-to-add-remove-liquidity: product-features/liquidity-providers/how-to.md
how-to/how-to-add-remove-liquidity: product-features/liquidity-pools/how-to.md
product-features/swap: product-features/token-swaps/README.md
how-to/swap: product-features/token-swaps/how-to.md
product-features/farm: product-features/farming/README.md

View File

@@ -8,10 +8,10 @@
* [💡 Key concepts](product-features/token-swaps/key-concepts.md)
* [🧑‍🏫 How to swap](product-features/token-swaps/how-to.md)
* [❓ FAQs](product-features/token-swaps/faqs.md)
* [🐋 Liquidity Providers](product-features/liquidity-providers/README.md)
* [💡 Key concepts](product-features/liquidity-providers/key-concepts.md)
* [🧑‍🏫 How to add/remove liquidity](product-features/liquidity-providers/how-to.md)
* [❓ FAQs](product-features/liquidity-providers/faqs.md)
* [🐋 Liquidity Pools](product-features/liquidity-pools/README.md)
* [💡 Key concepts](product-features/liquidity-pools/key-concepts.md)
* [🧑‍🏫 How to add/remove liquidity](product-features/liquidity-pools/how-to.md)
* [❓ FAQs](product-features/liquidity-pools/faqs.md)
* [📝 Self-Service Listing](product-features/self-service-listing.md)
* [🌾 Farming](product-features/farming/README.md)
* [💡 Key concepts](product-features/farming/key-concepts.md)

View File

@@ -8,7 +8,7 @@ description: Common questions you may have when dealing with farms.
<summary>How is farming related to staking?</summary>
Yield farming is a specific type of staking. In farming, you stake **LP tokens**, the tokens received in exchange for providing liquidity to a trading pool. This means that farmers are also [liquidity providers](../liquidity-providers/) (LPs). So while both farming and staking involve locking up tokens to earn rewards, farming always requires participation in a liquidity pool first.
Yield farming is a specific type of staking. In farming, you stake **LP tokens**, the tokens received in exchange for providing liquidity to a trading pool. This means that farmers are also [liquidity providers](../liquidity-pools/) (LPs). So while both farming and staking involve locking up tokens to earn rewards, farming always requires participation in a liquidity pool first.
</details>
@@ -115,6 +115,6 @@ The risk of Impermanent Loss is associated with providing liquidity. To farm, yo
When you provide liquidity, you add assets to a liquidity pool. The market prices of those assets can fluctuate. Impermanent Loss occurs when the prices of the assets change unfavorably compared to their value at the time of deposit. This loss is termed "impermanent" because it only becomes permanent if the LP withdraws their funds when prices have diverged significantly.
For further information, please refer to the [Impermanent Loss subsection](../liquidity-providers/key-concepts.md#impermanent-loss) on the Liquidity Providers page.
For further information, please refer to the [Impermanent Loss subsection](../liquidity-pools/key-concepts.md#impermanent-loss) on the Liquidity Pools page.
</details>

View File

@@ -50,12 +50,12 @@ Now that you've chosen a farm to stake in, you'll need LP tokens, which are obta
1. Click on the Pool tab in the top navigation bar.
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-1-pool-tab.png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-1-pool-tab.png" alt="" width="375"><figcaption></figcaption></figure>
2. Find the pool that matches the **Trading Pair** you noted before. This is the liquidity pool linked to the farm you've selected.&#x20;
3. Click on the pool. This will open the pool control panel, where you can add liquidity.&#x20;
We have a [Guide to Adding Liquidity](../liquidity-providers/how-to.md#adding-liquidity) that you can follow to obtain LP tokens.
We have a [Guide to Adding Liquidity](../liquidity-pools/how-to.md#adding-liquidity) that you can follow to obtain LP tokens.
## :sunflower: How to put LP tokens in a farm (stake)
@@ -181,7 +181,7 @@ You can collect these rewards and use them for various purposes on the ALEX Lab
To maximize your returns, it is best to harvest your rewards at the end of every cycle. This way, you have them available to generate more rewards! 🤩
For example, you can manually stake your \$ALEX rewards to generate compounding interest. If your rewards are another token, you can still [swap](https://app.alexlab.co/swap) and convert them to \$ALEX. Another option would be to use your rewards to buy more LP tokens and benefit from being a [liquidity provider](../liquidity-providers/README.md).
For example, you can manually stake your \$ALEX rewards to generate compounding interest. If your rewards are another token, you can still [swap](https://app.alexlab.co/swap) and convert them to \$ALEX. Another option would be to use your rewards to buy more LP tokens and benefit from being a [liquidity provider](../liquidity-pools/README.md).
Happy Farming! 🥕 🥬 🍅

View File

@@ -12,10 +12,10 @@ Yield farming works very similar to standard staking, with the key difference be
### What are LP tokens?
LP tokens are the tokens you receive when you provide funds to a liquidity pool. These tokens represent your share of the pool's assets. As a liquidity provider, you earn a portion of the fees charged to users who perform swaps within the pool. For a deeper understanding of these concepts, check out the [Liquidity Providers](../liquidity-providers/) section of the docs.
LP tokens are the tokens you receive when you provide funds to a liquidity pool. These tokens represent your share of the pool's assets. As a liquidity provider, you earn a portion of the fees charged to users who perform swaps within the pool. For a deeper understanding of these concepts, check out the [Liquidity Providers](../liquidity-pools/) section of the docs.
{% hint style="warning" %}
You may notice that farming often yields higher rewards than regular staking. Well, farming involves liquidity provision and comes with the risk of Impermanent Loss. It's not as scary as it sounds, but it is worth learning about the concept before you get started. Learn more in the [Impermanent Loss subsection](../liquidity-providers/key-concepts.md#impermanent-loss) from the Liquidity Providers page.
You may notice that farming often yields higher rewards than regular staking. Well, farming involves liquidity provision and comes with the risk of Impermanent Loss. It's not as scary as it sounds, but it is worth learning about the concept before you get started. Learn more in the [Impermanent Loss subsection](../liquidity-pools/key-concepts.md#impermanent-loss) from the Liquidity Pools page.
{% endhint %}
### What exactly is a farm?

View File

@@ -13,7 +13,7 @@ layout:
visible: false
---
# 🐋 Liquidity Providers
# 🐋 Liquidity Pools
By adding liquidity to a pool, you will earn fees from all trades between a token pair proportional to your share of the pool. Fees are added to the pool, automatically accrued in real-time and can be claimed by withdrawing back your liquidity.

View File

@@ -1,5 +1,5 @@
---
description: Common questions you might have as a liquidity provider.
description: Common questions you might have as a liquidity provider or pool creator.
---
# FAQs
@@ -14,7 +14,7 @@ The **swap fee** is the total fee charged to users for executing a token swap. I
On the other hand, the **fee rebate** is the portion of the swap fee that is distributed to liquidity providers as a reward for supplying liquidity to the pool. The remaining portion of the swap fee goes to the ALEX Lab Foundation. You can also find the fee rebate percentage in the Pool Info panel.
![Pool Info panel, with highligthed "Fees" box](../../.gitbook/assets/liquidity-providers/faqs-pool-info-panel-fees.png)
![Pool Info panel, with highligthed "Fees" box](../../.gitbook/assets/liquidity-pools/faqs-pool-info-panel-fees.png)
</details>

View File

@@ -18,7 +18,7 @@ Ready to start? Let's get hands-on!
Go to [https://app.alexlab.co/](https://app.alexlab.co/) and click on navbar's Swap -> Pool tab.
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-1-pool-tab.png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-1-pool-tab.png" alt="" width="375"><figcaption></figcaption></figure>
### Step 2
@@ -31,7 +31,7 @@ All available pools will be displayed including information such as:
Select the token pair to which you want to add liquidity from the displayed list. Note you can sort by pool metrics.
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-2-select-pool.png" alt=""><figcaption><p>Selected STX-ALEX liquidity pool as example.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-2-select-pool.png" alt=""><figcaption><p>Selected STX-ALEX liquidity pool as example.</p></figcaption></figure>
{% hint style="warning" %}
When hovering over a pool, you might notice a "+LP" button. This serves as a visual indicator for the selected pool. Clicking it will take you to the same screen as clicking anywhere on the pool's row.
@@ -45,7 +45,7 @@ When you set the amount for one token, the corresponding amount for the other to
**Need tokens?** Visit the [Token Swaps](../token-swaps/) docs section and to learn how to exchange tokens on ALEX Lab platform.
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-3-pool-control-panel.png" alt=""><figcaption><p>Control panel example for STX-ALEX liquidity pool. Amount is set to 4 STX and ALEX token amount is automatically determined.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-3-pool-control-panel.png" alt=""><figcaption><p>Control panel example for STX-ALEX liquidity pool. Amount is set to 4 STX and ALEX token amount is automatically determined.</p></figcaption></figure>
{% hint style="warning" %}
Clicking the "Max" button will automatically set the amount to your total available balance.
@@ -55,15 +55,15 @@ Clicking the "Max" button will automatically set the amount to your total availa
If you want to adjust slippage, select the "Settings" icon to open the Transaction Settings panel and set your desired tolerance. The default slippage tolerance is set to 4%, meaning your transaction will revert if the exchange rate changes unfavourably by more than this percentage. The displayed number of LP tokens you will receive is approximate due to this potential variation.
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-4-settings-icon.png" alt="" width="375"><figcaption><p>Transaction Settings icon.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-4-settings-icon.png" alt="" width="375"><figcaption><p>Transaction Settings icon.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-4-adjust-slippage.png" alt="" width="375"><figcaption><p>Transaction Settings panel example, with slippage tolerance set to 3%.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-4-adjust-slippage.png" alt="" width="375"><figcaption><p>Transaction Settings panel example, with slippage tolerance set to 3%.</p></figcaption></figure>
### Step 5
One you decide the amount, click the "Add" button. Confirmation panel will appear. Here you can double check balances, slippage and LP tokens. If everything it's okay, click "Confirm" :sunglasses:
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-5-confirm-add-liquidity.png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-5-confirm-add-liquidity.png" alt="" width="375"><figcaption></figcaption></figure>
### Step 6
@@ -78,11 +78,11 @@ To be completely sure, you can check:
<div>
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-6-add-to-position-post-con.png" alt="" width="375"><figcaption><p>Amounts to transfer and post conditions.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-6-add-to-position-post-con.png" alt="" width="375"><figcaption><p>Amounts to transfer and post conditions.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-6-add-to-position-function-args.png" alt="" width="375"><figcaption><p>Function arguments and confirmation button.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-6-add-to-position-function-args.png" alt="" width="375"><figcaption><p>Function arguments and confirmation button.</p></figcaption></figure>
</div>
@@ -90,7 +90,7 @@ To be completely sure, you can check:
Wait for the transaction to be confirmed on the network.&#x20;
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-7-tx-broadcasted.png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-7-tx-broadcasted.png" alt="" width="375"><figcaption></figcaption></figure>
{% hint style="info" %}
Recommended to track transaction status:
@@ -104,21 +104,21 @@ Recommended to track transaction status:
<div>
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-7-tg-tx-pending.png" alt="" width="348"><figcaption><p>Telegram message with transaction pending status.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-7-tg-tx-pending.png" alt="" width="348"><figcaption><p>Telegram message with transaction pending status.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-7-tg-tx-success.png" alt="" width="349"><figcaption><p>Telegram message with transaction success status.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-7-tg-tx-success.png" alt="" width="349"><figcaption><p>Telegram message with transaction success status.</p></figcaption></figure>
</div>
<div>
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-7-leather-tx-pending.png" alt="" width="375"><figcaption><p>Transaction pending displayed on Leather wallet.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-7-leather-tx-pending.png" alt="" width="375"><figcaption><p>Transaction pending displayed on Leather wallet.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-7-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-7-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure>
</div>
@@ -131,7 +131,7 @@ After successfully adding liquidity, you will be able to see your LP tokens and
* The **My Pool Share** shows how much of the overall pool you own, as a percentage.
* The **Indicative Value** reflects the value of your holdings in USD, which can change based on the price action of the underlying assets.
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-8-my-liquidity.png" alt=""><figcaption><p>"My Liquidity" panel.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-8-my-liquidity.png" alt=""><figcaption><p>"My Liquidity" panel.</p></figcaption></figure>
{% hint style="info" %}
You can find the "My Liquidity" panel above the Liquidity Pool control panel (shown in Step 3). A summarized version is also available under the Swap -> Pool tab or at https://app.alexlab.co/pool.
@@ -143,23 +143,23 @@ You can find the "My Liquidity" panel above the Liquidity Pool control panel (sh
As when adding liquidity, go to [https://app.alexlab.co/](https://app.alexlab.co/) and click on navbar's Swap -> Pool tab.
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-1-pool-tab.png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-1-pool-tab.png" alt="" width="375"><figcaption></figcaption></figure>
Once you're on the Pool page, you'll find the "My Liquidity" panel at the top of the pool list. This panel provides a summary of all your pool contributions.
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-1-my-liquidity-main-panel.png" alt=""><figcaption><p>The pools where you are providing liquidity are displayed here. There is only one in this example.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-1-my-liquidity-main-panel.png" alt=""><figcaption><p>The pools where you are providing liquidity are displayed here. There is only one in this example.</p></figcaption></figure>
### Step 2
Select the pool you would like to remove liquidity from, either through the "My Liquidity" panel or directly from the pool list.
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-2-select-pool.png" alt=""><figcaption><p>STX-ALEX pool selection.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-2-select-pool.png" alt=""><figcaption><p>STX-ALEX pool selection.</p></figcaption></figure>
### Step 3
Once in the panel of the pool, select the "Remove Liquidity" tab.
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-3-remove-tab.png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-3-remove-tab.png" alt="" width="375"><figcaption></figcaption></figure>
### Step 4
@@ -169,25 +169,25 @@ When you enter the amount of LP tokens, you are specifiyng amount you will trans
Once you have decided the LP token amount, click the "Remove" button.
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-4-enter-amount.png" alt="" width="375"><figcaption><p>Example of removing all liquidity; the amount matches the LP token balance.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-4-enter-amount.png" alt="" width="375"><figcaption><p>Example of removing all liquidity; the amount matches the LP token balance.</p></figcaption></figure>
### Step 5
A confirmation panel will appear where you can double check the amount. If everything looks correct, click "Confirm" :sunglasses:
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-5-confirm-remove-liquidity.png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-5-confirm-remove-liquidity.png" alt="" width="375"><figcaption></figcaption></figure>
### Step 6
After clicking "Confirm", you will need to confirm the transaction in your wallet. Here, your Stacks wallet is interacting with ALEX smart contract and is asking you for approval. Scroll through the wallet transaction window, review it and confirm the transaction. By doing this, you are allowing the wallet to sign and broadcast the transaction.
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-6-reduce-position-function-args.png" alt="" width="375"><figcaption><p>Function arguments and confirmation button.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-6-reduce-position-function-args.png" alt="" width="375"><figcaption><p>Function arguments and confirmation button.</p></figcaption></figure>
### Step 7
Wait for the transaction to be confirmed on the network.&#x20;
<figure><img src="../../.gitbook/assets/liquidity-providers/adding-liquidity-7-tx-broadcasted.png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/adding-liquidity-7-tx-broadcasted.png" alt="" width="375"><figcaption></figcaption></figure>
{% hint style="info" %}
Recommended to track transaction status:
@@ -201,21 +201,21 @@ Recommended to track transaction status:
<div>
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-7-tg-tx-pending.png" alt="" width="344"><figcaption><p>Telegram message with transaction pending status.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-7-tg-tx-pending.png" alt="" width="344"><figcaption><p>Telegram message with transaction pending status.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-7-tg-tx-success.png" alt="" width="361"><figcaption><p>Telegram message with transaction success status.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-7-tg-tx-success.png" alt="" width="361"><figcaption><p>Telegram message with transaction success status.</p></figcaption></figure>
</div>
<div>
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-7-leather-tx-pending.png" alt="" width="375"><figcaption><p>Transaction pending displayed on Leather wallet.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-7-leather-tx-pending.png" alt="" width="375"><figcaption><p>Transaction pending displayed on Leather wallet.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-7-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-7-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure>
</div>
@@ -223,6 +223,6 @@ Recommended to track transaction status:
Once the transaction is completed, you will see the changes reflected in the "My Liquidity" panel, and the updated token balances should appear in your wallet.
<figure><img src="../../.gitbook/assets/liquidity-providers/removing-liquidity-8-my-liquidity.png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/liquidity-pools/removing-liquidity-8-my-liquidity.png" alt=""><figcaption></figcaption></figure>
[^1]: The APR metric is the same as the displayed in the Fee Rebate column on the previous step.

View File

@@ -48,7 +48,7 @@ The liquidity pool for the pair **Listed Token :rocket: - Anchor Token :anchor:*
</details>
🔎 For more details, check the [FAQs](liquidity-providers/faqs.md#self-service-listing) section.
🔎 For more details, check the [FAQs](./liquidity-pools/faqs.md#self-service-listing) section.
With that said, let's get hands-on!