🧑🏫How to farm & harvest
Step-by-step guides to learn how to stake LP tokens into a farm, harvest rewards and remove LP tokens from the farm.
Last updated
Step-by-step guides to learn how to stake LP tokens into a farm, harvest rewards and remove LP tokens from the farm.
Last updated
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.
With this information in mind, choose the guide that best fits your needs.
Before proceeding, choose a farm that aligns with your goals. Go to https://app.alexlab.co/ and navigate to the Earn -> Farm tab.
You'll see a list of all the available farms along with key information. You can sort the farms by various metrics and scroll to explore different reward tokens offered.
Trading Pair: The specific LP token the farm accepts.
Reward: The earnings you obtain when harvesting the farm.
Liquidity: The total USD value of the staked tokens in the farm.
Farm APR: Potential annual earnings from farming, based on the most recent cycle yields. This metric represents the potential profitability of participating in a farm over a year, assuming the total staked tokens remain similar to the last cycle.
Fee Rebate: Potential annual earnings from providing liquidity. Also known as Pool APR, it reflects the potential profitability of participating in a liquidity pool over a year, assuming similar trading activity continues. This value matches the one displayed on the ALEX Lab Pool list.
Once you find a farm that fits your goals, note the Trading Pair (e.g., STX-aBTC) as you will need it in the next step.
Now that you've chosen a farm to stake in, you'll need LP tokens, which are obtained by adding liquidity to a pool.
Click on the Pool tab in the top navigation bar.
Find the pool that matches the Trading Pair you noted before. This is the liquidity pool linked to the farm you've selected.
Click on the pool. This will open the pool control panel, where you can add liquidity.
We have a Guide to Adding Liquidity that you can follow to obtain LP tokens.
If you have LP tokens, you're ready to start staking them in a farm and earning rewards!
Go to the Farms page and locate your farm of interest. You can access it by navigating to https://app.alexlab.co/ and selecting the Earn -> Farm tab.
At the top of the farm list, you'll see the farms suggested by the ALEX Lab Platform based on your LP tokens balance. In the example below, the suggested farm is STX-ALEX. This indicated that the user has provided liquidity in the STX-ALEX pool and has LP tokens available for farming.
Select the farm you want to stake in from the farm list.
When hovering over a farm, you may notice a "+ Stake LP" button. This serves as a visual indicator for the selected farm. Clicking it will take you to the same screen as clicking anywhere on the farm's row.
Once you have selected the farm, enter the amount of LP tokens you would like to stake, or click "Max" to use all available LP Tokens.
Next, choose the number of reward cycles you want to lock your tokens into the farm. Each cycle is approximately 3.5 days.
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.
Once you have entered the amount, click the "Stake" button. Confirmation panel will appear. Here you can double check amount and reward cycles. If everything looks okay, click "Confirm" 😎
After clicking "Confirm", you will need to confirm the transaction in your wallet. Remember that farming locks up LP tokens in a smart contract for the selected number of reward cycles.
At this point, 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.
To be completely sure, you can check:
Transaction is requested by "Alex app" (app.alexlab.co)
The amounts you will transfer to the smart contract, covered by Stacks post conditions.
Wait for the transaction to be confirmed on the network.
Recommended to track transaction status:
Turn on Telegram notifications, you will get notified when the transaction is confirmed.
Search for the transaction on the ALEX Explorer.
Check your address activity on the wallet.
After successfully staking your LP tokens in a farm, you will be able to see your active farms in the "My Farms" panel on the main Farms page.
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 page.
Now that you have your tokens staked on a farm, you rewards are growing 🌱. Be patient 🧘 and when the time comes, check out the following guide on how to harvest your rewards.
Farming will earn you rewards over time.
At the end of every staking cycle (525 blocks, approximately 3.5 days), rewards will be available to harvest. To claim your rewards, follow these steps:
Go to the Farms page on ALEX Lab App, which you can access through the Earn -> Farm tab.
You will find the My Farms panel which your active farms. Click on the farm you want to harvest, either from the panel or from the farm list.
Expand the My Farming dashboard. If a cycle has ended, you will see rewards available to claim.
Click on the "Harvest All" button and confirm the transaction on your wallet (just as you did in the previous guides).
Wait for the transaction to be confirmed on the network. Remember, you can turn on Telegram notifications or search for the transaction on the ALEX Explorer.
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 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. You can even obtain more LP tokens!
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 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.
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 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:
Go to the Farms page on ALEX Lab App, which you can access through the Earn -> Farm tab.
You will see the My Farming dashboard. Expand it to see all your farming details.
Find the farm from which you want to withdraw LP tokens and click on it.
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.
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.
Wait for the transaction to be confirmed on the network. Remember, you can turn on Telegram notifications or search for the transaction on the ALEX Explorer.
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 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. 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! 🧑🌾