mirror of
https://github.com/alexgo-io/alexlab-doc.git
synced 2026-04-29 10:25:19 +08:00
Merge branch 'main' into feat/restructure-part-1
This commit is contained in:
@@ -15,7 +15,7 @@ layout:
|
||||
|
||||
# 🌾 Farming
|
||||
|
||||
Yield Farming on ALEX is an excellent way to earn exciting returns. By farming (staking or locking up your LP tokens) you earn rewards in addition to the pool fees from being a liquidity provider. Among these rewards are $ALEX and APower tokens.
|
||||
Yield Farming on ALEX is an excellent way to earn exciting returns. By farming (staking or locking up your LP tokens), you earn rewards in addition to the earnings from being a liquidity provider. Among these rewards are $ALEX tokens, APower tokens, and tokens provided by the project.
|
||||
|
||||
To get started with farming, you first deposit two tokens into a liquidity pool, receiving LP tokens in return. Then, you stake these LP tokens in a farm, allowing you to harvest rewards after each farming cycle while still benefiting from the trading fees generated by the pool.
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Yes, farming rewards accumulate over time. It is not mandatory to harvest your r
|
||||
|
||||
<summary>What is the cooldown period?</summary>
|
||||
|
||||
The cooldown period refers to the time between when your LP tokens are staked into the farm and when a new farming cycle begins. Essentially, it is the remaining time (measured in Stacks blocks) of the current staking cycle. This implies that your staked tokens won't start generating reward immediately but in next upcoming cycle. For more details, check the [Cycles and Cooldown Period](key-concepts.md#cycles-and-cooldown-period) section of the Key concepts page.
|
||||
The cooldown period refers to the time between when your LP tokens are staked into the farm and when a new farming cycle begins. Essentially, it is the remaining time (measured in Stacks blocks) of the current staking cycle. This implies that your staked tokens won't start generating rewards immediately but in next upcoming cycle. For more details, check the [Cycles and Cooldown Period](key-concepts.md#cycles-and-cooldown-period) section of the Key concepts page.
|
||||
|
||||
</details>
|
||||
|
||||
@@ -61,12 +61,12 @@ You have several options for your rewards: you can hold them, trade them, or gen
|
||||
|
||||
<summary>How can I restake my rewards in the farm?</summary>
|
||||
|
||||
Restaking your rewards in the farm is an effective strategy for generating compound interest, but not as straight forward. To restake, you will need to transform your rewards into LP tokens first. There are two scenarios to consider:
|
||||
Reinvesting your rewards in the farm is an effective strategy to achieve compound interest, but it requires a few extra steps. To restake, you will need to transform your rewards into LP tokens first. There are two scenarios to consider.
|
||||
|
||||
* **Case 1:** The reward token is one of the trading pair tokens. 
|
||||
* **Case 2:** The reward token is none of the trading pair tokens.
|
||||
|
||||
Here are the steps to "re-farm" your rewards:
|
||||
Here are the steps to restake your farming rewards:
|
||||
|
||||
1. [Swap](https://app.alexlab.co/swap) the rewards in order to obtain the liquidity pool trading pair tokens. This may involve one swap for Case 1 and two swaps for Case 2.
|
||||
2. [Provide liquidity](https://app.alexlab.co/pool) to the pool associated with the trading pair to receive LP tokens.
|
||||
@@ -83,9 +83,9 @@ ALEX Staking Power, or APower, is a non-transferrable and non-tradable token. It
|
||||
1. **Stake $ALEX (1x Multiplier)**
|
||||
2. **Stake LP tokens through Yield Farming (0.3x Multiplier)**
|
||||
|
||||
APower is the lottery ticket that allows you to take part in any future IDO rounds on our [Launchpad](https://app.alexlab.co/launchpad). There is no maximum amount of APower an address can earn over a period of time. If you are interested in frequently participating in IDOs, staking $ALEX would generate APower fastest.
|
||||
APower is the access token for participating in the "Community Round" of any future IDO on our [Launchpad](https://app.alexlab.co/launchpad). IDO tickets allocated to this round can only be purchased by utilizing APower. There is no maximum amount of APower an address can earn over a period of time. If you are interested in frequently participating in IDOs, staking $ALEX would generate APower fastest.
|
||||
|
||||
Every IDO is unique, however, and may have a cap on the amount of APower that can be allocated. This is to prevent IDOs dominated by a small group of "whale" members.
|
||||
Every IDO is unique, however, and may have a cap on the amount of APower that can be utilized to allocate IDO tickets. This prevents IDOs from being dominated by a small group of "whale" members.
|
||||
|
||||
Full Medium post [here](https://medium.com/alexgobtc/what-is-alex-staking-power-and-how-do-i-use-it-1b3de3797fa2).
|
||||
|
||||
@@ -95,7 +95,9 @@ Full Medium post [here](https://medium.com/alexgobtc/what-is-alex-staking-power-
|
||||
|
||||
<summary>What happens to my LP tokens when I stake them?</summary>
|
||||
|
||||
When you stake your LP tokens in a yield farm, they are technically not in your possession anymore. During farming, LP tokens are locked in the ALEX smart contract. Although they belong to you and you are the only one authorized to withdraw them, they are not held in your wallet during the lock-up period.
|
||||
When you stake your LP tokens in a yield farm, they are technically transferred from your wallet to the farming smart contract.
|
||||
|
||||
<!-- Extended answer: When you stake your LP tokens in a yield farm, they are technically not in your possession anymore. During farming, LP tokens are locked in the ALEX smart contract. Although they belong to you and you are the only one authorized to withdraw them, they are not held in your wallet during the lock-up period. -->
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ description: >-
|
||||
|
||||
# How to farm & harvest
|
||||
|
||||
Yield farming takes a few easy steps to get set up. It works very similar to standard staking, with the key difference being that the tokens you stake are LP tokens. As in traditional staking, you lock up your tokens for a certain period (measured in cycles) and earn rewards over time. After each (except for the first cooldown one), you will have rewards available to harvest.
|
||||
Yield farming takes a few easy steps to get set up. It works very similar to standard staking, with the key difference being that the tokens you stake are LP tokens. As with traditional staking, you lock up your tokens for a certain period (measured in cycles) and earn rewards over time. After each cycle (except for the first cooldown one), you will have rewards available to harvest.
|
||||
|
||||
It is very important to understand that farms only accept their specific native LP tokens. For example, the STX-ALEX farm will only accept STX-ALEX LP tokens, which are the tokens you receive in exchange for providing liquidity to the STX-ALEX pool. There are different LP tokens corresponding to each liquidity pool on the ALEX Lab Platform.
|
||||
|
||||
@@ -88,7 +88,7 @@ Next, choose the number of reward cycles you want to lock your tokens into the f
|
||||
<figure><img src="../../.gitbook/assets/farming/add-lp-staking.png" alt="" width="375"><figcaption><p>Example with an amount of LP tokens to stake for 32 cycles.</p></figcaption></figure>
|
||||
|
||||
{% hint style="info" %}
|
||||
Your staked amount will start generating yield from the next upcoming cycle, as the current cycle is in "cooldown" period. To maximize the APR you earn, it's best to stake for longer cycle periods to avoid missing out on any reward cycles due to this cooldown cycle. That's why 32-cycle staking is recommended.
|
||||
Your staked amount will start generating yield from the next upcoming cycle, as the current cycle is in "cooldown" period. To maximize the APR you earn, it's best to stake for longer cycle periods to avoid missing out on any reward cycles due to this cooldown cycle. That's why 32-cycle staking is recommended if your goal is to maximize earnings.
|
||||
{% endhint %}
|
||||
|
||||
### Step 4
|
||||
@@ -154,7 +154,7 @@ After successfully staking your LP tokens in a farm, you will be able to see you
|
||||
|
||||
<figure><img src="../../.gitbook/assets/farming/my-farms.png" alt=""><figcaption><p>Example of the "My Farms" panel. Here you will find all your active farms; click on any of them for detailed information.</p></figcaption></figure>
|
||||
|
||||
By clicking on a farm, you will access the "My Farming" dashboard for that specific farm, which includes detailed metrics. On the right side of the dashborad, you will see that the current cycle has no earnings and no farming tokens. This is due to the cooldown period, farming will start in the next upcoming cycle. This is why it's convenient to stake for long periods: every time you stake, you must wait for the current cycle to end before you start generating rewards in the next cycle.
|
||||
By clicking on a farm, you will access the "My Farming" dashboard for that specific farm, which includes detailed metrics. On the right side of the dashborad, you will see that the current cycle has no earnings and no farming tokens. The reason you can't join the current reward cycle is that it had already started prior to your participation. However, once you successfully stake your LP into the farm, it gets registered for the next cycle. This assures you a proportional share of the farm rewards based on the number of LP tokens you have staked. This is why it's convenient to stake for long periods: every time you stake, you must wait for the current cycle to end before you start generating rewards in the next cycle.
|
||||
|
||||
For more info on the "My Farming" dashboard and metrics, we recommend reading the [Key concepts](key-concepts.md) page.
|
||||
|
||||
@@ -175,7 +175,7 @@ At the end of every staking cycle (525 blocks, approximately 3.5 days), rewards
|
||||
5. Wait for the transaction to be confirmed on the network. Remember, you can turn on [Telegram notifications](https://t.me/stacks\_tx\_notification\_bot) or search for the transaction on the [ALEX Explorer](https://app.alexlab.co/explorer).
|
||||
6. Once the transaction is completed, the reward amounts will be reflected in your wallet balance. You can always check your balance also on the ALEX Lab App, located beside the "Wallet Manager" at the top menu bar.
|
||||
|
||||
You can collect these rewards and use them for various purposes on the ALEX Lab Platform. For example, you can [stake](https://app.alexlab.co/stake) your $ALEX rewards manually to generate compounding interest. You can also use your APower rewards to increase your access to IDOs on the [ALEX Launchpad](https://app.alexlab.co/launchpad). You can even buy more LP tokens!
|
||||
You can collect these rewards and use them for various purposes on the ALEX Lab Platform. For example, you can [stake](https://app.alexlab.co/stake) your $ALEX rewards manually to generate compounding interest. You can also use your APower rewards to increase your access to IDOs on the [ALEX Launchpad](https://app.alexlab.co/launchpad). You can even obtain more LP tokens!
|
||||
|
||||
### How often should I harvest my rewards?
|
||||
|
||||
@@ -189,20 +189,20 @@ Happy Farming! 🥕 🥬 🍅
|
||||
|
||||
Withdrawing you LP tokens takes just a few steps. The important thing is when to do it.
|
||||
|
||||
When farming, you are committed to locking up your tokens for a predefined period (reward cycles, each one ~3.5 days). Once these cycles conclude, you will be able to unstake them and regain control over your LP tokens.
|
||||
When farming, you are committed to locking up your tokens for a predefined period (reward cycles, each cycle contains 525 Stacks blocks, an estimation of ~3.5 days per cycle). Once these cycles conclude, you will be able to unstake them and regain control over your LP tokens.
|
||||
|
||||
If you staked multiple times at different moments, the lock periods apply to each amount separately.
|
||||
|
||||
Let's go through it step-by-step:
|
||||
|
||||
1. Go to the [Farms page](https://app.alexlab.co/farm) on ALEX Lab App, which you can access through the Earn -> Farm tab.
|
||||
2. Find the farm from which you want to withdraw LP tokens and click on it.
|
||||
3. You will see the **My Farming** dashboard. Expand it to see all your farming details.
|
||||
2. You will see the **My Farming** dashboard. Expand it to see all your farming details.
|
||||
3. Find the farm from which you want to withdraw LP tokens and click on it.
|
||||
4. Your LP tokens will automatically be available for withdrawal when your committed cycles end. You will find them under the **LP to claim** title on the dashboard.
|
||||
5. Click on the "Harvest All" button and confirm the transaction in your wallet (just as you did in the previous guides). This will return your LP tokens back to your possession and automatically collect any unharvested rewards.
|
||||
6. Wait for the transaction to be confirmed on the network. Remember, you can turn on [Telegram notifications](https://t.me/stacks\_tx\_notification\_bot) or search for the transaction on the [ALEX Explorer](https://app.alexlab.co/explorer).
|
||||
7. Once the transaction is completed, you will see the changes reflected in your wallet balance and on the platform panels. In particular, you will see your LP token balance on the [Pool page](https://app.alexlab.co/pool) in the **My Liquidity** panel or by selecting the pool from the list. You can also check your balance on the ALEX Lab App, located beside the Wallet Manager at the top menu bar.
|
||||
|
||||
If you want to farm your LP tokens again, remember: your staked amount will start generating yield from the next upcoming cycle, as the current cycle is in cooldown period. To maximize the APR you earn, it's best to stake for longer cycle periods to avoid missing out on any reward cycles due to the cooldown period.
|
||||
If you want to farm your LP tokens again, remember: your staked amount will start generating yield from the next upcoming cycle. To maximize the APR you earn, it's best to stake for longer cycle periods to avoid missing out on any reward cycles due to the cooldown period.
|
||||
|
||||
Thanks for farming on ALEX Lab! 🧑🌾
|
||||
Thanks for farming on ALEX Lab! 🧑🌾
|
||||
|
||||
@@ -8,7 +8,7 @@ description: >-
|
||||
|
||||
## Farm basics
|
||||
|
||||
Yield farming works in a very similar way to standard staking, with the key difference being that the tokens you stake are LP tokens. As in traditional staking, you lock up your tokens for a certain period (measured in cycles) and earn rewards over time. After each cycle, you will have rewards available to harvest.
|
||||
Yield farming works in a very similar way to standard staking, with the key difference being that the tokens you stake are LP tokens. As in traditional staking, you lock up your tokens for a certain period (measured in cycles) and earn rewards over time. After each cycle, you will have rewards available to harvest[^1].
|
||||
|
||||
### What are LP tokens?
|
||||
|
||||
@@ -25,21 +25,25 @@ A farm is a staking pool for a specific LP token. Each liquidity pool has their
|
||||
Farms are identified by these two attributes.
|
||||
|
||||
* **Trading Pair:** The specific LP token that the farm accepts. To obtain these LP tokens, you will have to provide liquidity to the pool associated with the same trading pair.
|
||||
* **Token Rewards:** The token in which the farm rewards the stakers at the end of each cycle. This token is predefined by the farm.
|
||||
* **Token Rewards:** The token in which the farm rewards the stakers at the end of each cycle. This token is predefined by the farm and cannot be changed. Some farms may offer two kind of reward tokens.
|
||||
|
||||
Farms only accept LP tokens of one kind. For example, the STX-ALEX farm only accepts STX-ALEX LP tokens, which you receive in exchange for providing liquidity to the STX-ALEX pool.
|
||||
|
||||
{% hint style="info" %}
|
||||
**Smart Contacts.** During farming, LP tokens are locked in the ALEX smart contract. Although they belong to you and only you have the authority to withdraw them, they are not held by your address during the lock-up period. As a result, you won't be able to view your LP tokens in the My Liquidity panel on the [ALEX Lab Pools page](https://app.alexlab.co/pool) during staking.
|
||||
{% endhint %}
|
||||
|
||||
### Cycles and cooldown period
|
||||
|
||||
Farming is measured in cycles. **One cycle** is 525 Stacks blocks, which is approximately **3.5 days**. This means that when you stake tokens in a farm, you need to specify the number of cycles you want to lock up your tokens in the farm. Rewards are distributed after a cycle ends.
|
||||
Farming is measured in cycles. **One cycle** is 525 Stacks blocks (after Stacks Nakamoto release, the farming cycle will be counted based on tenure height), which is approximately **3.5 days** or **525 Bitcoin blocks**. This means that when you stake tokens in a farm, you need to specify the number of cycles you want to lock up your tokens in the farm. Rewards are distributed after a cycle ends.
|
||||
|
||||
Your staked tokens will start generating yield on the next upcoming cycle, meaning that there is a **cooldown period** between the time you stake and the start of a new cycle. To maximize your earnings, it's best to stake for longer cycle periods, avoiding gaps in rewards due to the cooldown. That's why 32-cycle staking is recommended.
|
||||
Your staked tokens will start generating yield in the next upcoming cycle, which means there will be no reward during the time gap between when you stake and when the upcoming cycle starts. To maximize your earnings, it's best to stake for longer cycle periods, avoiding gaps in rewards due to the cooldown. That's why 32-cycle staking is recommended.
|
||||
|
||||
Let's put it on an example. Say you stake for 1 cycle at a time. When the cycle ends, you can claim the rewards associated to that cycle. To keep generating rewards, you will have to withdraw your LP tokens and restake them. But when you stake them again, that current cycle is in cooldown, so you will have to wait for the next one to obtain rewards. Over 100 cycles, this method would cause you to miss rewards for about 50 cycles. In contrast, if you stake for 32 cycles, you will only miss rewards for 3 cycles.
|
||||
Let's use an example. Assume you stake for one cycle at a time. When that cycle ends, you can claim the rewards associated with that cycle. To continue generating rewards, you will have to withdraw your LP tokens and restake them. However, when you restake them, the current cycle will not be eligible for you to earn rewards. Therefore, you will have to wait until the next cycle to acquire rewards. Over 100 cycles, this method would cause you to miss rewards for about 50 cycles. In contrast, if you stake for 32 cycles, you will only miss rewards for 3 cycles.
|
||||
|
||||
### Reward distribution
|
||||
|
||||
Farms may offer different types of reward tokens, and each farm has a predetermined amount of rewards. For simplicity, we can assume that the total rewards distributed to stakers during each cycle remains constant. At the end of each cycle, the rewards are available to be harvested by the farmers (stakers).
|
||||
Farms may offer different types of reward tokens, and each farm has a predetermined amount of rewards. For simplicity, we can assume that the total rewards distributed to stakers during each cycle remains constant. At the end of each cycle, the rewards are available to be harvested by the farmers (stakers) in proportion to their share of LP tokens within that cycle.
|
||||
|
||||
Rewards are distributed proportionally to each farmer based on their staked amount. This can be represented by the following equation:
|
||||
|
||||
@@ -49,7 +53,7 @@ $$
|
||||
|
||||
Each value in the equation applies to a specific cycle.
|
||||
|
||||
When there are two reward tokens (e.g. $ALEX and APower), the formula is applied separately for each token, resulting in two Farmer Reward amounts, one for each reward token.
|
||||
When there are two reward tokens (e.g., $ALEX and APower), the formula is applied separately for each token, resulting in two **Farming Reward** amounts, one for each reward token.
|
||||
|
||||
### Farm APR
|
||||
|
||||
@@ -99,4 +103,6 @@ Your active farming cycles. Here, there will be shown all the cycles during whic
|
||||
* The **Farm APR**, calculated based on equation (2).
|
||||
* Your **Estimated Earnings**, derived from equation (1).
|
||||
|
||||
For the **current cycle**, all metrics are exact, as the staked tokens are already defined. For the **upcoming cycles**, all metrics are estimates since we cannot predict how many LP tokens will be staked; we can only say how many LP tokens are commited so far for that cycle. This explains why the APR percentage appears higher for more distant cycles, due to the estimated total staked amount.
|
||||
For the **current cycle**, all metrics are exact, as the staked tokens are already defined. For the **upcoming cycles**, all metrics are estimates since we cannot predict how many LP tokens will be staked; we can only say how many LP tokens are commited so far for that cycle. This explains why the APR percentage appears higher for more distant cycles, due to the estimated total staked amount.
|
||||
|
||||
[^1]: Except for the cycle in which you stake, which is within a cooldown period (explained in section in below).
|
||||
|
||||
@@ -53,7 +53,7 @@ Clicking the "Max" button will automatically set the amount to your total availa
|
||||
|
||||
### Step 4
|
||||
|
||||
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.
|
||||
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>
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ The time gap between the farm creation and the start of the first emission cycle
|
||||
|
||||
From the screenshot above, the **Total Farming Rewards** is `15,000 DOGGY`, and **Reward Cycle Length** is `10`, meaning that `15,000 DOGGY / 10 = 1,500 DOGGY` will be the **Farming Rewards Per Cycle**.
|
||||
|
||||
If the user submits, the farm will be created at Cycle #80, leaving 33 blocks for the gathering period (approximately 5 hours and 29 minutes). In these cases, it is recommended to wait for the next cycle, as inidicated in the alert box.
|
||||
If the user submits, the farm will be created at Cycle #80, leaving 33 blocks for the gathering period (approximately 5 hours and 29 minutes). In these cases, it is recommended to wait for the next cycle, as indicated in the alert box. This prevents LP tokens from being committed to the farm too late for the next reward distribution cycle.
|
||||
|
||||
If the user decides to proceed, the **Farm Opening Cycle** will run from Cycle #81 to Cycle #90, lasting approximately 35 days.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user