Merge pull request #7 from CoinFabrik/feat/self-service-listing

Self-Service Listing Update
This commit is contained in:
oscartsui
2024-11-08 20:50:15 +08:00
committed by GitHub
17 changed files with 239 additions and 112 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

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>
@@ -117,6 +117,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 in a very similar way to standard staking, with the key diff
### 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.
@@ -21,6 +21,12 @@ By adding liquidity to a pool, you will earn fees from all trades between a toke
<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Key concepts</td><td><a href="key-concepts.md">key-concepts.md</a></td><td><a href="../../.gitbook/assets/cards/key-concepts.png">cards/key-concepts.png</a></td></tr><tr><td>How to add/remove liquidity</td><td><a href="how-to.md">how-to.md</a></td><td><a href="../../.gitbook/assets/cards/how-to.png">cards/how-to.png</a></td></tr><tr><td>FAQs</td><td><a href="faqs.md">faqs.md</a></td><td><a href="../../.gitbook/assets/cards/faqs.png">cards/faqs.png</a></td></tr></tbody></table>
### Looking to create your own pool?
The Self-Service Listing allows you to create your own trading pool within the ALEX decentralized exhange. Visit the dedicated page for more details.
{% content-ref url="../self-service-listing.md" %} [../self-service-listing.md](../self-service-listing.md) {% endcontent-ref %}
## Support
For assistance, please reach out to our Community Managers on [Discord](https://discord.com/invite/alexlab) and [Telegram Channel](https://t.me/AlexCommunity).

View File

@@ -1,9 +1,11 @@
---
description: Common questions you might have as a liquidity provider.
description: Common questions you might have as a liquidity provider or pool creator.
---
# FAQs
## Liquidity Pools & Providers
<details>
<summary>What is the difference between swap fee and fee rebate?</summary>
@@ -12,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>
@@ -99,3 +101,70 @@ However, if Carol had simply held onto her 100 STX and 150 sUSDT, their combined
This shows that Carol would have been better off holding her assets instead of providing liquidity. This is impermanent loss. With that said, this example doesn't account for the trading fees Carol would have earned as a liquidity provider, which could potentially offset or even exceed the loss, making liquidity provision profitable overall.
</details>
<details>
<summary>Can I create my own pool?</summary>
Yes! [Self-Service Listing](../self-service-listing.md) allows you to create your own trading pool on ALEX DEX. This feature lets you list your token for permissionless trading against an anchor token, typically one with a stable value, providing a reliable reference point for pricing your token.
</details>
## Self-Service Listing
<details>
<summary>Which are the anchor tokens supported?</summary>
Native STX token, ALEX token and aBTC token.
</details>
<details>
<summary>Is there a minimum liquidity amount for the anchor token?</summary>
Yes. Initial liquidity of the anchor token must be a minimum of 1,800 STX or the equivalent value in ALEX or aBTC tokens.
</details>
<details>
<summary>How is the listed token initial price determined?</summary>
The initial price is determined by the initial liquidity provided by the creator. The ratio between the pair of funds determines the price relationship between both tokens.
For instance, if the creator provides 8,000 listing tokens and 2,000 anchor tokens, that means the initial ratio is 4:1. Note that pool ratios are calculated as the minimal expression of the fraction between the token balances. In this case, is 8,000 / 2,000.
We can think of this initial ratio in two ways (and they are both equivalent):
- 4 listing tokens equals 1 anchor token.
- 1 listing token equals 0.25 anchor tokens.
</details>
<details>
<summary>How does the price of the listing token change once the pool is created?</summary>
Once the pool is created, the price discovery phase begins. Users can permissionlessly trade the pair of assets, and the [Automated Market Maker (AMM)](../../detailed-information/alexs-automated-market-maker-amm.md) algorithm will determine the price dynamics of the newly listed token. For further information on this topic please refer to the [ALEXGo Trading Pool documentation](https://docs.alexgo.io/automated-market-making/trading-pool).
</details>
<details>
<summary>Is there some requirement to make the listed token visible on <a href="https://app.alexlab.co/token-list">ALEX Token List</a>?</summary>
Yes. ALEX requires a [Coingecko](https://www.coingecko.com/) or [CoinMarketCap](https://coinmarketcap.com/) token listing to verify the provided social media information before uploading it to the official list at [app.alexlab.co/token-list](https://app.alexlab.co/token-list).
Once that is done, click on `Customer Support` on the [Self-Service Listing page](https://app.alexlab.co/self-service-listing) or contact us via Telegram at [t.me/ALEXselfservice ](https://t.me/ALEXselfservice) to submit your information (e.g. X accont, Discord, official website).
</details>
<details>
<summary>What is a wrapped version of a token contract?</summary>
Wrapped token contracts refer to "pass-through" tokens that don't retain economics; their purpose is to simplify development and enhance security. ALEX is responsible for deploying wrapped contracts. As its primarily technical, it is not relevant from a user perspective other than it involves a whole step in the procedure and takes some time.
</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 for non-stable swap token pairs 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

@@ -1,122 +1,174 @@
---
coverY: 0
layout:
cover:
visible: false
size: full
title:
visible: true
description:
visible: false
tableOfContents:
visible: true
outline:
visible: true
pagination:
visible: true
description: Create your own pool and make your token tradeable on ALEX decentralized exchange in simple steps!
---
# 📝 Self-Service Listing
## Self-Service Listing Procedure
{% hint style="warning" %}
**Supported Tokens:** ALEX Self-Service Listing currently supports Stacks Chain Tokens (SIP-010 Standard Token).
{% endhint %}
Step 1: Submit the token information & deposit the anchor token (Token Y)
## 🚀 Getting Started
Step 2: Waiting for the pool contract creation (around 24-48 hours)
### How it works?
Step 3: Deposit the listing token (Token X)
Self-Service Listing allows you to **create your own liquidity pool** on the ALEX DEX, enabling the **permissionless trade** of the **listed token** with an **anchor token** within the exchange. The anchor token is typically one with a stable value, providing a reliable reference point for defining the price of the newly listed token.
Step 4: Open Pool
Pool creation usually takes between 24 to 48 hours. Once the pool is created and live, the price discovery phase begins: users can start trading the listed token against the anchor token and viceversa. Users interested in providing liquidity can contribute to the pool like any other ALEX pool.
Step 5: Provide additional token information
The pool owner is the initial liquidity provider and will receive the corresponding LP tokens upon successful pool creation. Once the pool is live and operational, the owner can withdraw funds just like any other liquidity provider.
***
{% hint style="info" %}
Avaiblable Anchor Tokens: Native STX token, ALEX token and aBTC token.
{% endhint %}
## Example: Self-service listing for “STX-PEPE” pool
The trading pool operates under the [ALEX Automated Market Maker (AMM)](../../detailed-information/alexs-automated-market-maker-amm.md) algorithm, which dynamically determines the exchange rate (price) based on the trades.
### Step1Submit the token information & deposit the anchor token
### Minimum requirements
#### **Step 1.1 Input the SIP-10 token contract address**
👉 **Token Deployment.** Ensure your token is deployed on the Stacks blockchain, as you will need to provide the token contract.
(e.g. Token PEPE SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275.tokensoft-token-v4k68639zxz)
👉 **Select an Anchor Token.** Choose an anchor token from the available options: Stacks native token STX, ALEX token, or aBTC token. Ensure you have at least 1,800 STX or an equivalent value in ALEX or aBTC token to create the pool—this is the minimum anchor token liquidity.
<figure><img src="../.gitbook/assets/image (8).png" alt="" width="375"><figcaption></figcaption></figure>
👉 **Determine Initial Price.** Decide the initial price for your listing token in terms of anchor token units. This should answer the question: how many anchor tokens do users need to buy one listed token?
#### **Step 1.2 Confirm token information provided by the contract**
👉 **Calculate Initial Liquidity.** Once the initial price is determined, you can set the initial liquidity amounts for both tokens in the pool. You may calculate this manually or use the ALEX Lab UI for assistance. If you're planning to [add farming to the pool](self-service-farming.md), make sure to reserve enough tokens for farm rewards.
* Example:
<details>
Token name: Pepe Coin
<summary>Manual calculation example (price, ratio, and initial amounts)</summary>
Token symbol: PEPE
Let's suppose you choose STX as the anchor token and want to provide 4,000 STX as the initial anchor token liquidity.
Description: Greetings, Earthlings! I grant you the opportunity to join my intergalactic economy by embracing Pepe Coin (PEPE).
To determine the price, you will need to decide how many STX equals 1 of your listing token. In other words, decide how many STX users will need to buy 1 listed token. Let's say you set the price of your token at 0.5 STX.
Token contract address SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275
To calculate the initial liquidity for the listed token, you need to divide the anchor token amount by the price. This is `4,000 STX / 0.5 STX = 8,000`, resulting in the initial amount for the listed token.
Token logo
The liquidity pool for the pair **Listed Token :rocket: - Anchor Token :anchor:** will have an initial ratio of 2:1. This ratio is calculated as the minimal expression of the fraction `8,000 / 4,000` (initial listed token amount slash initial anchor token amount).
#### **Step 1.3 Confirm the initial liquidity**
</details>
* Example
🔎 For more details, check the [FAQs](./liquidity-pools/faqs.md#self-service-listing) section.
Token X: 1,000,000 PEPE
With that said, let's get hands-on!
Token Y: 1,800 STX
## 🛠️ Procedure
Initial exchange rate
### Step 0: Go to Self-Service Listing page
1 Pepe Coin =0.0018STX
Head to the [Self-Service Listing page](https://app.alexlab.co/self-service-listing) at the ALEX Lab App. Alternatively, you can access it via the [app.alexlab.co](https://app.alexlab.co) homepage by navigating to the `Swap` -> `Pool` tab. Once on the Pool main page, hit the `+ Create` button and select the `Creating a new pool` option.
\*Once the AMM pool opens, the exchange rate of the AMM pool will automatically re-balance as users buy or sell the token.
<figure><img src="../.gitbook/assets/self-service-listing/main-page.png" alt="Self-Service Listing page" width=""><figcaption></figcaption></figure>
#### **Step 1.4 Advanced pool settingsyou can keep the default settings**
### Step 1: Submit token information & deposit the anchor token
* Example
In this step, you will set up the pool trading pair and configuration parameters. As part of this same transaction, you will transfer the anchor token's initial liquidity :moneybag: :anchor:.
STX-PEPE pool setting
<figure><img src="../.gitbook/assets/self-service-listing/step-1-submit.png" alt="Self-Service Listing page" width=""><figcaption></figcaption></figure>
STX-PEPE swap fee rate = 0.3% fee-rate-x,fee-rate-y
<details>
Threshold of a single transaction = pool size\*10% max-in-ratio, max-out-ratio
<summary>Step 1.1: Input the SIP-10 token contract address</summary>
Start block: on finalization trading will commence once the creation process is finalized
Provide the listed token contract address. Ensure it complies with the [SIP-010 Fungible Token Standard](https://github.com/stacksgov/sips/blob/main/sips/sip-010/sip-010-fungible-token-standard.md) trait. In the example, the contract address is `SP108J6F4C7JD93BGJ91TEB5D3CFB5XW39QHDJ3MV.rabby-token`.
#### **Step 1.5 Submit**
</details>
Click to submit Pool information and deposit the initial liquidity of the Anchor Token.
<details>
* Example
<summary>Step 1.2: Confirm token information provided by the contract</summary>
PEPE deposit 1,800 STX
Verify that the token information retrieved from the contract is correct. In the example:
### Step 2Waiting for pool contract creation
- **Token name** -> `RABBY Token`
- **Token symbol** -> `RABBY`
- **Description** -> Unlock the potential of programmable adventures within Bitcoin's rabbit holes.
- **Token deployment address** -> `SP108J6F4C7JD93BGJ91TEB5D3CFB5XW39QHDJ3MV`
- **Token logo**
* Once the pool contract is created, 'Contract Ready' status will display 'Ready'.
</details>
<figure><img src="../.gitbook/assets/image (9).png" alt=""><figcaption></figcaption></figure>
<details>
### Step3Deposit Token X
<summary>Step 1.3: Set the initial liquidity and price</summary>
* After creating the contract, click on 'Deposit' to add an amount of Token X matching the amount you previously submitted.
* Example
Enter the initial balances for both tokens. You can experiment with different amounts to observe how the exchange rate changes, though we recommend calculating these values beforehand.
```
PEPE needs to deposit 1,000,000 $PEPE token
```
In the screenshot example, this is:
<figure><img src="../.gitbook/assets/image (10).png" alt=""><figcaption></figcaption></figure>
- **Anchor Token ⚓** (a.k.a `token-x`) -> `4,000 STX ($7,200)`
- **Listing Token 🚀** (a.k.a `token-y`) -> `200,000 RABBY`
- **Exchange Rate ⚖️** -> `1 RABBY = 0.02 STX ($0.03)`
### Step4Open Pool
Once the pool opens, the AMM algorithm will automatically rebalance the exchange rate as users trade the tokens.
Once the 'Open Pool' status appears as "Succeeded," it indicates that the pool has been launched and is listed under ALEX Pool -> self-service pool ([https://app.alexlab.co/pool](https://app.alexlab.co/pool) ). You can now proceed with trading your token on the ALEX DEX.
</details>
<figure><img src="../.gitbook/assets/image (11).png" alt=""><figcaption></figcaption></figure>
<details>
### **Step5Provide additional token information**
<summary>Step 1.4: Advanced pool settings (optional)</summary>
Click “Contact Us” or "Customer Support" in the Self-Service Listing guide, to add social media information such as Twitter, Official website, etc.
This step is optional, as the default settings are usually sufficient. If you have questions to ask before customization, reach out via [Discord](https://discord.com/invite/alexlab) or [Telegram](https://t.me/AlexCommunity).
ALEX requires a “Coingecko” or “CoinMarketcap” token listing to verify the provided social media information.
</details>
The token's social media information will be displayed on the ALEX Token List: [https://app.alexlab.co/token-list](https://app.alexlab.co/token-list).
<details>
<summary>Step 1.5: Submit transaction</summary>
Keep in mind that as part of this same transaction, you will transfer the anchor token's initial liquidity. By confirming the transaction, you are accepting the transfer of specific amount of anchor tokens from your wallet to the ALEX smart contract.
Click `Submit` and scroll through the wallet transaction window, ensuring the parameters and transfer amount are correct. If everything looks good, confirm the transaction on your wallet. This will allow your wallet to sign and broadcast the transaction.
{% hint style="info" %}
Recommended to track transaction status:
* Turn on [Telegram notifications](https://t.me/stacks\_tx\_notification\_bot), you will get notified when the transaction is confirmed.
* Search for the transaction on the [ALEX Explorer](https://app.alexlab.co/explorer).
* Check your address activity on the wallet.
{% endhint %}
</details>
### Step 2: Contract creation
Once the transaction from Step 1 is completed, you will see the checkbox labeled `Deposit Anchor Token ✅` marked as done. The ALEX team will review the submitted information and create a specific contract (a wrapped version) for your token to interact with the AMM DEX. This process may take between 24 and 48 hours.
### Step 3: Deposit listing token
Once the `Contract ready ✅` checkbox is marked as done, you're ready to deposit the listing token balance. This step involves interacting with a smart contract, so be sure to review the transaction details, paying particular attention to the amount to transfer. By accepting this transaction, you agree to transfer the initial liquidity of the listing token from your wallet to the ALEX smart contract.
### Step 4: Pool creation success
Once the `Deposit Listing Token ✅` transaction is completed and the `Open pool ✅` checkbox is marked as done, your pool will be automatically ready for use. The new pool will appear as an ALEX Pool under the `Self Listed` tab on [app.alexlab.co/pool](https://app.alexlab.co/pool).
🤝 After completing this step, you (and everyone) can start trading the token pair on ALEX DEX 🤝
<figure><img src="../.gitbook/assets/self-service-listing/pool-creation-successful.jpg" alt="Pool creation successful" width=""><figcaption><p>Pool creation successful.</p></figcaption></figure>
{% hint style="warning" %}
If you have added a custom `start-block` configuration, the pool will be unavailabe until that block is reached.
{% endhint %}
### Step 5: Provide additional token information (optional)
To make your token visible on the ALEX Token List at [app.alexlab.co/token-list](https://app.alexlab.co/token-list), provide additional token information. Click on `Customer Support` on the [Self-Service Listing page](https://app.alexlab.co/self-service-listing) or contact us via Telegram at [t.me/ALEXselfservice ](https://t.me/ALEXselfservice) to submit the information (e.g. X accont, Discord, official website).
<figure><img src="../.gitbook/assets/self-service-listing/token-list.png" alt="Token List example" width=""><figcaption><p>Token List example.</p></figcaption></figure>
ALEX requires a [Coingecko](https://www.coingecko.com/) or [CoinMarketCap](https://coinmarketcap.com/) token listing to verify the provided social media information before uploading it to the official list at [app.alexlab.co/token-list](https://app.alexlab.co/token-list).
Thanks for creating your pool on the ALEX DEX 🎉 📈
<!--
Summarized Steps:
1) User submits token information, balances and config params. Within this same transaction, transfers the anchor token balance.
2) User waits for token confirmation from ALEX side.
3) User deposits the listed token balance.
4) Once this tx is confirmed, the pool is automatically created and available (if start-block is configured "On finalization").
-->

View File

@@ -30,6 +30,6 @@ Now, suppose you want to trade MEME1 for MEME2, but there isn't a specific MEME1
Swaps on ALEX's decentralized exchange (DEX) operate through smart contracts built on the Stacks network. These smart contracts manage liquidity pools, which are collections of crypto assets deposited by users. When you perform a swap, you trade tokens with the liquidity pool, eliminating the need for a direct counterparty. For example, if a user wants to trade Stacks' native currency (STX) for ALEX's governance token (ALEX), they would interact with the STX-ALEX liquidity pool on ALEX's smart contracts.
The [Automated Market Maker (AMM)](../../detailed-information/alexs-automated-market-maker-amm.md) protocol controls prices, fees, and token amounts. For further information on this topic please refer to the [ALEXGo Trading Pool documentation](https://docs.alexgo.io/trading-lending-and-borrowing/trading-pool).
The [Automated Market Maker (AMM)](../../detailed-information/alexs-automated-market-maker-amm.md) protocol controls prices, fees, and token amounts. For further information on this topic please refer to the [ALEXGo Trading Pool documentation](https://docs.alexgo.io/automated-market-making/trading-pool).
</details>