Merge branch 'main' into feat/staking

This commit is contained in:
maquirriaincf
2024-12-18 11:38:49 -03:00
committed by GitHub
50 changed files with 430 additions and 291 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 530 KiB

After

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 KiB

View File

@@ -22,7 +22,8 @@
* [💡 Key concepts](product-features/staking/key-concepts.md)
* [🧑‍🏫 How to stake](product-features/staking/how-to.md)
* [❓ FAQs](product-features/staking/faqs.md)
* [🚀 Launchpad](product-features/launchpad.md)
* [🚀 Launchpad](features/launchpad/README.md)
* [Join the ALEX Launchpad!](features/launchpad/join-the-alex-launchpad.md)
## Resources
@@ -30,14 +31,14 @@
* [🪙 Token List](https://app.alexlab.co/token-list)
* [🔮 ALEX Ecosystem Explorer](https://app.alexlab.co/explorer)
* [✅ Security Audit](resources/security-audit.md)
* 📃 Whitepapers
* [Whitepaper (1): Automated Market Making of the Yield Token Pool](whitepapers/whitepaper-1-automated-market-making-of-the-yield-token-pool.md)
* [Whitepaper (2): Automated Market Making of the Collateral Rebalancing Pooltitled](whitepapers/whitepaper-2-automated-market-making-of-the-collateral-rebalancing-pooltitled.md)
* [Whitepaper (3): Diving into Collateral Rebalancing Pools!](whitepapers/whitepaper-3-diving-into-collateral-rebalancing-pools.md)
* [📃 Whitepapers](resources/whitepapers/README.md)
* [📃 Whitepaper (1): Automated Market Making of the Yield Token Pool](whitepapers/whitepaper-1-automated-market-making-of-the-yield-token-pool.md)
* [📃 Whitepaper (2): Automated Market Making of the Collateral Rebalancing Pooltitled](whitepapers/whitepaper-2-automated-market-making-of-the-collateral-rebalancing-pooltitled.md)
* [📃 Whitepaper (3): Diving into Collateral Rebalancing Pools!](whitepapers/whitepaper-3-diving-into-collateral-rebalancing-pools.md)
## Detailed Information
* [Tokenomics](detailed-information/tokenomics.md)
* [🪙 Tokenomics](detailed-information/tokenomics.md)
* [ALEX DAO](detailed-information/alex-dao.md)
* [ALEX AMM](detailed-information/alexs-automated-market-maker-amm.md)
* [ALEX APower](detailed-information/what-is-alex-staking-power-and-how-do-i-use-it.md)

View File

@@ -4,4 +4,4 @@ Our launchpad is where emerging projects on Stacks are connected with our core c
If you are a project wishing to apply to our launchpad, please start by clicking [here](https://blocksurvey.io/survey/t/ae87cacb-d736-456d-a3b4-7e404e184ae8/r/l).
<figure><img src="../.gitbook/assets/image (16).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (15) (1).png" alt=""><figcaption></figcaption></figure>

View File

@@ -0,0 +1,248 @@
---
description: >-
If you are looking to launch your projects on the Bitcoin ecosystem, there's
no better place to launch than on the ALEX Launchpad—powered by the ALEX
community!
layout:
title:
visible: true
description:
visible: true
tableOfContents:
visible: true
outline:
visible: true
pagination:
visible: true
---
# Join the ALEX Launchpad!
<figure><img src="../../.gitbook/assets/ALEX_Launchpad_XLINK.png" alt=""><figcaption><p>Welcome to the ALEX Launchpad!</p></figcaption></figure>
Welcome to the ALEX Launchpad — the best launchpad built on Bitcoin!
{% hint style="info" %}
**Backstory:** The ALEX Launchpad is the first launchpad built on Bitcoin since February 2022, having facilitated more than 10+ successful launches with up to \~355.9 BTC committed by the community to date! Plus, the options to bridge to more than 18+ networks!
{% endhint %}
### What is the ALEX Launchpad?&#x20;
The ALEX Launchpad is a community-based IDO integrated with [XLink](https://www.xlink.network/) to enable multichain support for projects to raise funds and launch their projects on up to 18 different networks, including Bitcoin (BRC20, Runes), Stacks, Ethereum, BNB, Base, Core, Bsqure, BOB, Bitlayer, Merlin, AILayer, Mode, X Layer, Arbitrum, Aurora, Manta, Linea and more to come.&#x20;
<figure><img src="../../.gitbook/assets/Stacks_network (2).png" alt=""><figcaption></figcaption></figure>
### Why Raise with the ALEX Launchpad?
The ALEX Launchpad provides you with the highest probability of success while incurring the least amount of downside risk. Here's why:
* \#1: ALEX has the highest DEX activity and social metrics.
* \#2: ALEX is expansive and backed by strong momentum.
* \#3: We provide top-class support from our team before, during, and after the launch to ensure maximum success.
* \#4: Our IDO terms are designed to be fair with very low risks for both you and your community.
### #1: ALEX by the Numbers
<figure><img src="../../.gitbook/assets/ALEX_Stacks_TVL_DEX_a.png" alt=""><figcaption><p>DeFillama Stats</p></figcaption></figure>
As of December 2024, the ALEX Ecosystem is ranked the #1 for the highest, here are the stats:
* **TVL :** $219.8M
* **Total Trading Volume:** $2.4B+
* **Active Users:** 69K+
* **Supported Networks:** 19+ Network (via XLink)
* **Funds Raised:** 11.32 BTC , 400K USDT, 16.5K ALEX
* **Appx. Funds Committed:** \~355.9 BTC (_Excluding other tokens_)&#x20;
* **Average Oversubscribed Ratio:** 5X+
* **ALEX in STX Ecosystem TVL Ratio: \~**&#x35;6.4%&#x20;
* **ALEX Social Metrics:**&#x20;
* 110.5K Followers on 𝕏
* 50.2K Members on Discord
* 5.8K Members on Telegram
* 500+ Members on Chinese TG
* 1.6K Members on Korean TG
* 1.3K Members on Japan TG
* 46.5K Followers on XLink's 𝕏
<figure><img src="../../.gitbook/assets/Launchpad_06_12.png" alt=""><figcaption><p>Oversubscription for IDO</p></figcaption></figure>
#### What is **Oversubscribed Ratio?**
The '**Oversubscribed Ratio'** refers to instances where projects receive funding that surpasses their fundraising target. For instance, if a project aims to raise $100,000 but ends up collecting $250,000, the filled percentage would exceed 100%.
In such scenarios, for every $1 pledged beyond the 100% mark, the amount is divided by the Oversubscribed Ratio, which in this example would be 2.5X. Therefore, if you allocated $100 towards the IDO, only $40 would be utilized for participation, with the remaining $60 being refunded to the community investor.
* **Appx. Funds Committed:** \~355.9 BTC (_Excluding other tokens_)&#x20;
* **Funds Raised:** 11.32 BTC , 400K USDT, 16.5K ALEX
{% hint style="info" %}
**\~355.9 BTC is equivalent to over $33.8 million** committed to the ALEX Launchpad to date, excluding other forms of tokens! (_Assuming each BTC costs $95,000_)
{% endhint %}
A higher rate of oversubscription leads to a more dispersed allocation of tokens, ensuring the distribution is as equitable as possible.&#x20;
Historical data from past launches on the ALEX Launchpad indicate a higher likelihood of projects being oversubscribed rather than undersubscribed, thereby increasing your project's chances for a successful fundraising outcome.
### #2: ALEX DEX Momentum
<figure><img src="../../.gitbook/assets/TVL_Dec.png" alt=""><figcaption><p>Average ALEX AMM Data for 1D/7D/30D</p></figcaption></figure>
The ALEX DEX is currently experiencing peak momentum, positioning it as the optimal platform for token listings.
When evaluating DEX momentum, we consider it a key indicator for assessing the potential visibility of your token. Higher momentum translates to greater exposure for your token, enhancing its market presence and trading opportunities.
At average, our DEX receives up to:
* \~$7-10M daily trading volume
* \~$30-40M weekly trading volume
* \~$80-110M monthly trading volume&#x20;
_These volumes does not include Bridge volume from XLink._&#x20;
### #3: Support from the ALEX Lab Foundation
<figure><img src="../../.gitbook/assets/Smartest_People_B.png" alt=""><figcaption></figcaption></figure>
Raising a round can be challenging but we are help to support you through and through, here are some of the supports we will be providing during the Launchpad:
* Amplification of your project across our Socials
* 𝕏 Space sessions with our communities
* Cross borders beyond English communities; we will push your contents to our partners who manages Chinese, Japanese and Korean communities
* (Optional) Tokenomic advisory
* Tap into our vast network of connections that can help
### Requirements for the Launchpad
Some of the requirements we look for from projects looking to raise with the ALEX Launchpad:
* Strong organic social followings on 𝕏&#x20;
* Working product or usable MVP(s)
* User activities metrics of your products / ecosystems
* Revenue model of your project
* Strong team background&#x20;
* (Optional) Interest from notable CEXs&#x20;
* (Optional) Revenue data of your projects&#x20;
* All IDO terms has be to agreed on.
<figure><img src="../../.gitbook/assets/ALEX_IDO_TERMS_a (3).png" alt=""><figcaption></figcaption></figure>
### ALEX Launchpad IDO Terms
By launching on the ALEX you agree to the below terms:
1. **Fundraising Requirement:** Raise at least $100,000 through the ALEX Launchpad.
2. **Buyback Mechanism:** Agree to a one-week buyback mechanism where, if the token price falls below the Buyback price, you will buy back all tokens sold during the IDO. Example: If the IDO price is $1, the Buyback price is $0.9, and the price drops to $0.8 a week after launch, the buyback is triggered at $0.9.
3. **Liquidity Commitment:** Commit to 6-months LP staking contributing at least 10% of the funds raised and an equivalent value of 10% of your total token supply to the liquidity pool (LP) to enable trading immediately after the Launchpad concludes.&#x20;
1. Example: For a $100,000 raise, this means contributing $10,000 in BTC/STX/sUSDT and another $10,000 worth of your token.
2. Note: Additional liquidity can be added by anyone after the launch.
4. **Launchpad Fees:**&#x20;
1. We charge a 0% service fee for listing
2. < 1.0% token supply for marketing budgets&#x20;
Please review the above terms and reach out to the ALEX team with any questions or concerns by sending us a DM via our emails available in the[ Official Links](../../resources/official-links.md).
<figure><img src="../../.gitbook/assets/ALEX_IDO_PROCESS_WALKTHROUGH_a (3).png" alt=""><figcaption></figcaption></figure>
### The Launchpad Process
Now that you have made your mind and decided that the ALEX Launchpad is for your project, here's what to expect to happen:
#### #1: Introduction to the ALEX Team
After you've reviewed all the Launchpad information above and decided to proceed with ALEX, we'll set up a communication channel (e.g., Telegram) for an initial interaction.&#x20;
Here, we'll discuss your needs, get to know you and your project better, and a team member will schedule an introductory meeting or call to delve into your project's details and the launch process.
#### #2: Project Information Submission for Due Diligence
We will ask your team to complete a Blocksurvey form for due diligence purposes. This form will request information such as:
* Project brief & summary
* Team background
* Product information & Use cases
* Revenue Model
* Official Links & Documentation
* Current Development Phase
* Roadmaps
* Estimated IDO valuation
#### #3: Initial Call (Brief Process & Terms)
Once we receive the completed Blocksurvey form, we'll arrange a call to:
* Get to know you and your team better (preferably with video enabled)
* Discuss your current milestones, CEX listing strategies, onboarded partners, product functionality, and IDO terms.
* Breakdown how the Launchpad user experience works—for your users and our users.
After this call, you'll have a clear understanding of the process, terms of the IDO, how the Launchpad works, and an opportunity to ask any initial questions or seek clarifications.
#### #4: Agreement to the IDO Terms
During or after the call, we'll confirm if you fully agree to the following IDO terms:
* Raise a minimum of $100K.
* Implement a buyback mechanism if the price falls below the IDO price within a week of launch.
* Commit 10% of raised funds and 10% of total token supply for initial liquidity.
* **Accept the fees terms:** 0 % service fee and <1.0% marketing budget of the token supply .
By agreeing to these terms, you commit to fulfilling these obligations during and post-IDO.
#### #5: Launchpad Fundraising Documentation Submission
If you've agreed to the IDO terms and our Launchpad Committee has vetted your project:
You'll be asked to fill out the IDO Notion Application form, detailing launch specifics, tokenomics, financial projections, marketing strategies, and other operational details.
<figure><img src="../../.gitbook/assets/ALEX_APower.png" alt=""><figcaption></figcaption></figure>
#### #6: Community Vote
Once the IDO Notion Application is completed, a community vote will be conducted using all provided project information and the fundraising goal.
If the vote results in a majority YES, your project will be listed on the ALEX Launchpad.&#x20;
Users vote with their ALEX or LiALEX tokens, which are non-transferable and earned by participating in Stake and Farm within the ALEX Ecosystem.
#### #7: Launchpad Setup Post community approval:
We'll coordinate with you to set the launch date and configure settings for Community, Whitelist, and Public Round portions.
<figure><img src="../../.gitbook/assets/ALEX_Launchpad_Marketing.png" alt=""><figcaption></figcaption></figure>
#### #8: Launchpad Marketing (Pre, During, and Post)
With the launchpad set up and the countdown initiated, we'll engage in co-marketing efforts as follows:
* **Pre-launch:** We will focus on announcements, teasers, and community engagement to build anticipation. &#x20;
* **During Launch:** Live updates, AMAs (Ask Me Anything sessions), and real-time interactions will keep the community engaged.&#x20;
* **Post-Launch:** We'll provide reports on the success of the IDO, send thank-you messages, and continue with ongoing community updates.
We will collaborate with you to enhance social amplification not only through our channels but also via our network connections, including Key Opinion Leaders (KOLs), ALEX holders, and investors.
If you lack a clear path to Centralized Exchange (CEX) listings, we can assist in establishing these connections.
Our marketing collaboration goes beyond merely listing your project on our website. We will also co-run marketing campaigns designed to maximize visibility and impressions for your IDO round.
During the co-marketing phase, we will host an AMA in the form of 𝕏 Spaces, allowing our 110K followers to participate live or watch the recorded session to gain a better understanding of your project.
#### #9: Launchpad Goes Live!
Once all preparations are complete, the IDO officially commences at the scheduled time. Investors can then participate in the token sale, marking the beginning of your project's fundraising phase on the ALEX Launchpad.
During the launchpad, you can decide to have up to three phases:
* **Community Launch:** Open to anyone with APower on a first-come, first-served (FCFS) basis.
* **Public Launch:** Open to anyone, does not require Apower to participate, and is conducted through a fair random number drawing process.
* **Whitelist Launch:** This phase is optional and allows the project team to whitelist specific addresses (community members, KOLs, partners, etc.) for marketing purposes. This can be set up either at the start of the IDO or later on.
These phases are optional, depending on how you would ideally want your IDO round to be.
{% hint style="info" %}
During the Launchpad call in [#id-3-initial-call-brief-process-and-terms](join-the-alex-launchpad.md#id-3-initial-call-brief-process-and-terms "mention"), we will dive deep into the Launchpad mechanism: **IDO Lottery, Launchpad phases and fair random number drawing process.**
{% endhint %}
Each step ensures that your project is vetted, prepared, and promoted effectively within the ALEX ecosystem, leading up to a successful token launch.&#x20;
After the launchpad has completed, the unallocated funds will be returned to the investors, while the allocated funds will be converted into the IDO tokens based on the IDO launch price.
<figure><img src="../../.gitbook/assets/baaa.png" alt=""><figcaption><p><strong>Send us a message via our</strong> <a href="https://t.me/AlexCommunity"><strong>ALEX Official Telegram channel</strong></a><strong>, and we will get back to you!</strong> </p></figcaption></figure>

View File

@@ -2,7 +2,7 @@
description: Common questions you may have when dealing with farms.
---
# FAQs
# FAQs
<details>
@@ -52,7 +52,7 @@ For example, if you want to farm for 12 cycles and choose to stake three times f
You have several options for your rewards: you can hold them, trade them, or generate compound interest. Compound interest occurs when your rewards generate more rewards. Here are some ways to achieve this within the ALEX Lab Platform:
* Stake the rewards on [ALEX Staking](../stake.md). You can even buy LiALEX for auto-compounding rewards, maximizing your long-term yield.
* Stake the rewards on [ALEX Staking](../../../product-features/stake.md). You can even buy LiALEX for auto-compounding rewards, maximizing your long-term yield.
* Provide liquidity to a pool to earn a share of the trading fees. To further enhance your yield, stake the LP tokens in a farm.
</details>
@@ -63,7 +63,7 @@ You have several options for your rewards: you can hold them, trade them, or gen
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.&#x20;
* **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 restake your farming rewards:
@@ -97,8 +97,6 @@ Full Medium post [here](https://medium.com/alexgobtc/what-is-alex-staking-power-
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>
<details>

View File

@@ -4,7 +4,7 @@ description: >-
rewards and remove LP tokens from the farm.
---
# How to farm & harvest
# 🧑‍🏫 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 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.
@@ -27,20 +27,20 @@ Before proceeding, choose a farm that aligns with your goals. Go to [https://app
<figure><img src="../../.gitbook/assets/farming/farm-tab.png" alt="" width="563"><figcaption></figcaption></figure>
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.&#x20;
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.
<figure><img src="../../.gitbook/assets/farming/farm-list.png" alt=""><figcaption></figcaption></figure>
#### Farm Basics
* **Trading Pair:** The specific LP token the farm accepts.&#x20;
* **Trading Pair:** The specific LP token the farm accepts.
* **Reward:** The earnings you obtain when harvesting the farm.
#### Farm Metrics
* **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](https://app.alexlab.co/pool).&#x20;
* **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](https://app.alexlab.co/pool).
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.
@@ -50,10 +50,10 @@ 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-pools/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;
2. Find the pool that matches the **Trading Pair** you noted before. This is the liquidity pool linked to the farm you've selected.
3. Click on the pool. This will open the pool control panel, where you can add liquidity.
We have a [Guide to Adding Liquidity](../liquidity-pools/how-to.md#adding-liquidity) that you can follow to obtain LP tokens.
@@ -63,7 +63,7 @@ If you have LP tokens, you're ready to start staking them in a farm and earning
### Step 1
Go to the [Farms page](https://app.alexlab.co/farm) and locate your farm of interest. You can access it by navigating to [https://app.alexlab.co/](https://app.alexlab.co/) and selecting the Earn -> Farm tab.&#x20;
Go to the [Farms page](https://app.alexlab.co/farm) and locate your farm of interest. You can access it by navigating to [https://app.alexlab.co/](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.
@@ -81,7 +81,7 @@ When hovering over a farm, you may notice a "+ Stake LP" button. This serves as
### Step 3
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.&#x20;
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.
@@ -107,7 +107,7 @@ At this point, your Stacks wallet is interacting with ALEX smart contract and is
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](https://docs.stacks.co/stacks-101/post-conditions).&#x20;
* The amounts you will transfer to the smart contract, covered by [Stacks post conditions](https://docs.stacks.co/stacks-101/post-conditions).
{% endhint %}
<figure><img src="../../.gitbook/assets/farming/stake-tokens-function-args.png" alt="" width="375"><figcaption><p>Wallet pop-up with function arguments and confirmation button.</p></figcaption></figure>
@@ -121,32 +121,14 @@ Wait for the transaction to be confirmed on the network.
{% 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.
* 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 %}
<!-- Real tx: https://explorer.hiro.so/txid/0x0445e0ce8a1872e0aea18971e421fcc137048f91473ddbdf931c0660d5ed087c?chain=mainnet -->
<div><figure><img src="../../.gitbook/assets/farming/tg-tx-pending.png" alt="" width="352"><figcaption><p>Telegram message with transaction pending status.</p></figcaption></figure> <figure><img src="../../.gitbook/assets/farming/tg-tx-success.png" alt="" width="358"><figcaption><p>Telegram message with transaction success status.</p></figcaption></figure></div>
<div>
<figure><img src="../../.gitbook/assets/farming/tg-tx-pending.png" alt="" width="352"><figcaption><p>Telegram message with transaction pending status.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/farming/tg-tx-success.png" alt="" width="358"><figcaption><p>Telegram message with transaction success status.</p></figcaption></figure>
</div>
<div>
<figure><img src="../../.gitbook/assets/farming/leather-tx-pending.png" alt="" width="375"><figcaption><p>Transaction pending displayed on Leather wallet.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/farming/leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed.</p></figcaption></figure>
</div>
<div><figure><img src="../../.gitbook/assets/farming/leather-tx-pending.png" alt="" width="375"><figcaption><p>Transaction pending displayed on Leather wallet.</p></figcaption></figure> <figure><img src="../../.gitbook/assets/farming/leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed.</p></figcaption></figure></div>
### Step 7
@@ -168,11 +150,11 @@ 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:
1. Go to the [Farms page](https://app.alexlab.co/farm) on ALEX Lab App, which you can access through the Earn -> Farm tab.&#x20;
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. 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.
3. Expand the **My Farming** dashboard. If a cycle has ended, you will see rewards available to claim.
4. Click on the "Harvest All" button and confirm the transaction on your wallet (just as you did in the previous guides).
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).
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 obtain more LP tokens!
@@ -181,7 +163,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-pools/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/).
Happy Farming! 🥕 🥬 🍅
@@ -189,7 +171,7 @@ 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.
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.
@@ -200,7 +182,7 @@ Let's go through it step-by-step:
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).
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. 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.

View File

@@ -4,7 +4,7 @@ description: >-
dashboard metrics!
---
# Key concepts
# 💡 Key concepts
## Farm basics

View File

@@ -2,7 +2,7 @@
description: Common questions you might have as a liquidity provider or pool creator.
---
# FAQs
# FAQs
## Liquidity Pools & Providers
@@ -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-pools/faqs-pool-info-panel-fees.png)
<img src="../../../.gitbook/assets/liquidity-pools/faqs-pool-info-panel-fees.png" alt="Pool Info panel, with highligthed &#x22;Fees&#x22; box" data-size="original">
</details>
@@ -68,7 +68,7 @@ In this panel, the **Pooled** amount reflects your total token holdings in the l
<summary>How is liquidity provision related to farming?</summary>
Liquidity providers can stake or lock up their LP tokens for a fixed period of time (a selected number of ALEX cycles) to earn additional rewards. These rewards are separate from the earnings generated through liquidity provision, that come from swap operations fees (trading fees). This process is known as Yield Farming, or simply 'Farming'. For more details, explore the [ALEX Farming](../farm.md) feature.
Liquidity providers can stake or lock up their LP tokens for a fixed period of time (a selected number of ALEX cycles) to earn additional rewards. These rewards are separate from the earnings generated through liquidity provision, that come from swap operations fees (trading fees). This process is known as Yield Farming, or simply 'Farming'. For more details, explore the [ALEX Farming](../../../product-features/farm.md) feature.
</details>
@@ -140,8 +140,8 @@ For instance, if the creator provides 8,000 listing tokens and 2,000 anchor toke
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.
* 4 listing tokens equals 1 anchor token.
* 1 listing token equals 0.25 anchor tokens.
</details>

View File

@@ -4,7 +4,7 @@ description: >-
to withdraw liquidity from ALEX DEX pools.
---
# How to add/remove liquidity
# 🧑‍🏫 How to add/remove liquidity
When **adding liquidity**, you will deposit an equivalent value of both tokens into the pool. In return, you'll receive LP tokens, which represent your share of that specific liquidity pool.
@@ -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-pools/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
@@ -27,11 +27,11 @@ All available pools will be displayed including information such as:
* **Trading Pair:** The token pair that constitute liquidity pools to which you can add liquidity.
* **Liquidity:** The total liquidity in the pool, expressed in USD value.
* **Volume:** The trading volume between the token pair over the last 7 days. By hovering on the trading volume for a specific row/pool, the 24-hour volume is also displayed.
* **Fee Rebate:** Potential LP earnings from swap fees over a year, based on the last week's average. This metric, also known as Pool APR, reflects the potential profitability of participating in a pool over a year, assuming similar trading activity continues.&#x20;
* **Fee Rebate:** Potential LP earnings from swap fees over a year, based on the last week's average. This metric, also known as Pool APR, reflects the potential profitability of participating in a pool over a year, assuming similar trading activity continues.
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-pools/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.
@@ -39,13 +39,13 @@ When hovering over a pool, you might notice a "+LP" button. This serves as a vis
### Step 3
After selecting a pool, you will be taken to a control panel for that specific liquidity pool, where you can add liquidity to the token pair and view more detailed metrics[^1].&#x20;
After selecting a pool, you will be taken to a control panel for that specific liquidity pool, where you can add liquidity to the token pair and view more detailed metrics[^1].
When you set the amount for one token, the corresponding amount for the other token is automatically calculated, as liquidity must be provided in equal value for both tokens.
**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-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>
<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-pools/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-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>
<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-pools/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
@@ -76,51 +76,25 @@ To be completely sure, you can check:
* The amounts you will transfer to the smart contract, covered by [Stacks post conditions](https://docs.stacks.co/stacks-101/post-conditions). Note that one transfer amount is exactly determined (STX in the example) while the other is subject to a "less than or equal to" condition. This accounts the potential slippage variation, and here you can see the exact upper bound. If these conditions are not met, the transaction will abort.
{% endhint %}
<div>
<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-pools/adding-liquidity-6-add-to-position-function-args.png" alt="" width="375"><figcaption><p>Function arguments and confirmation button.</p></figcaption></figure>
</div>
<div><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-pools/adding-liquidity-6-add-to-position-function-args.png" alt="" width="375"><figcaption><p>Function arguments and confirmation button.</p></figcaption></figure></div>
### Step 7
Wait for the transaction to be confirmed on the network.&#x20;
Wait for the transaction to be confirmed on the network.
<figure><img src="../../.gitbook/assets/liquidity-pools/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:
* Turn on [Telegram notifications](https://t.me/stacks_tx_notification_bot), you will get notified when the transaction is confirmed.&#x20;
* Search for the transaction on the [ALEX Explorer](https://app.alexlab.co/explorer). &#x20;
* 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 %}
<!-- Real tx: https://explorer.hiro.so/txid/0x588d949ea697b325237eb20d5d3a6af5f6f496668cf0c7428ba79068573efba9?chain=mainnet -->
<div><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-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-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-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-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-pools/adding-liquidity-7-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure>
</div>
<div><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-pools/adding-liquidity-7-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure></div>
### Step 8
@@ -131,7 +105,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-pools/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 +117,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-pools/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-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>
<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-pools/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-pools/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,60 +143,42 @@ 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-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>
<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-pools/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-pools/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;
Wait for the transaction to be confirmed on the network.
<figure><img src="../../.gitbook/assets/liquidity-pools/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:
* Turn on [Telegram notifications](https://t.me/stacks_tx_notification_bot), you will get notified when the transaction is confirmed.&#x20;
* Search for the transaction on the [ALEX Explorer](https://app.alexlab.co/explorer). &#x20;
* 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 %}
<!-- Real tx: https://explorer.hiro.so/txid/0xd34372393d5467dc5a0e161beeb3d376222690d24ab964edbd7f5bc80835559b?chain=mainnet -->
<div><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-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-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-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-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-pools/removing-liquidity-7-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure>
</div>
<div><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-pools/removing-liquidity-7-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure></div>
### Step 8
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-pools/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

@@ -4,7 +4,7 @@ description: >-
AMMs, and their function within the ALEX decentralized exchange.
---
# Key concepts
# 💡 Key concepts
## What are Liquidity Pools?
@@ -43,15 +43,11 @@ Impermanent loss in decentralized finance (DeFi) occurs when a liquidity provide
Here's how it works:
* In most DeFi protocols, LPs provide two assets (e.g., STX and a stablecoin) in equal value to a liquidity pool.
* If the price of one asset (e.g., STX) rises or falls relative to the other, arbitrage traders will trade against the pool, ensuring that the asset prices in the pool reflect current market conditions.
* These trades lead to a different balance of assets in the pool (ratio). When the LP eventually withdraws their funds, they may receive a different amount of each asset than what they initially provided.
* If the value of the assets in the pool has diverged significantly, the LP might have been better off simply holding the assets outside of the pool, resulting in a perceived **loss**.
* This loss is termed **impermanent** because it can be mitigated if the token prices return to their original values. Additionally, this loss can be offset by trading fees earned from the pool, meaning the LP might still come out ahead if the accumulated fees exceed the loss.
{% hint style="info" %}
You can check a complete walkthrough example in the FAQs: [**How does impermanent loss happen?**](faqs.md#how-does-impermanent-loss-happen)
You can check a complete walkthrough example in the FAQs: [**How does impermanent loss happen?**](broken-reference)
{% endhint %}

View File

@@ -5,17 +5,17 @@ description: Add the farming feature to your pool and reward LPs with an additio
# 🧑‍🌾 Self-Service Farming
{% hint style="warning" %}
You can only add farming to liquidity pools that you have created via the ALEX Self-Service Listing. If you don't have your own pool yet and want to create one, check the [Self-Service Listing](self-service-listing.md) page to find out how.
You can only add farming to liquidity pools that you have created via the ALEX Self-Service Listing. If you don't have your own pool yet and want to create one, check the [Self-Service Listing](broken-reference) page to find out how.
{% endhint %}
## 🚀 Getting started
### How does it work?
- The pool owner creates the farm by specifying the number of cycles and depositing the total reward amount. These two inputs determine the rewards distributed per cycle, which are equal for each cycle.
- The pool's liquidity providers stake their LP tokens in the newly created farm, earning rewards at the end of each cycle, just like any other farm within the ALEX Lab Platform.
* The pool owner creates the farm by specifying the number of cycles and depositing the total reward amount. These two inputs determine the rewards distributed per cycle, which are equal for each cycle.
* The pool's liquidity providers stake their LP tokens in the newly created farm, earning rewards at the end of each cycle, just like any other farm within the ALEX Lab Platform.
For further details on how farms operate within ALEX, refer to the [Farming Key concepts](farming/key-concepts.md) section of the docs.
For further details on how farms operate within ALEX, refer to the [Farming Key concepts](broken-reference) section of the docs.
### Considerations

View File

@@ -1,5 +1,7 @@
---
description: Create your own pool and make your token tradeable on ALEX decentralized exchange in simple steps!
description: >-
Create your own pool and make your token tradeable on ALEX decentralized
exchange in simple steps!
---
# 📝 Self-Service Listing
@@ -22,7 +24,7 @@ The pool owner is the initial liquidity provider and will receive the correspond
Avaiblable Anchor Tokens: Native STX token, ALEX token and aBTC token.
{% endhint %}
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.
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.
### Minimum requirements
@@ -44,11 +46,11 @@ To determine the price, you will need to decide how many STX equals 1 of your li
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.
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).
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).
</details>
🔎 For more details, check the [FAQs](./liquidity-pools/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!
@@ -58,13 +60,13 @@ With that said, let's get hands-on!
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.
<figure><img src="../.gitbook/assets/self-service-listing/main-page.png" alt="Self-Service Listing page" width=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/self-service-listing/main-page.png" alt="Self-Service Listing page"><figcaption></figcaption></figure>
### Step 1: Submit token information & deposit the anchor token
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:.
<figure><img src="../.gitbook/assets/self-service-listing/step-1-submit.png" alt="Self-Service Listing page" width=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/self-service-listing/step-1-submit.png" alt="Self-Service Listing page"><figcaption></figcaption></figure>
<details>
@@ -80,11 +82,11 @@ Provide the listed token contract address. Ensure it complies with the [SIP-010
Verify that the token information retrieved from the contract is correct. In the example:
- **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**
* **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**
</details>
@@ -96,9 +98,9 @@ Enter the initial balances for both tokens. You can experiment with different am
In the screenshot example, this is:
- **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)`
* **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)`
Once the pool opens, the AMM algorithm will automatically rebalance the exchange rate as users trade the tokens.
@@ -122,13 +124,11 @@ Keep in mind that as part of this same transaction, you will transfer the anchor
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.
* 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>
@@ -160,7 +160,7 @@ Once the `Deposit Listing Token ✅` transaction is completed and the `Open 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>
<figure><img src="../.gitbook/assets/self-service-listing/pool-creation-successful.jpg" alt="Pool creation successful"><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.
@@ -170,7 +170,7 @@ If you have added a custom `start-block` configuration, the pool will be unavail
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>
<figure><img src="../.gitbook/assets/self-service-listing/token-list.png" alt="Token List example"><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).

View File

@@ -1,4 +1,4 @@
# FAQs
# FAQs
<details>
@@ -94,10 +94,3 @@ There is no maximum amount of APower an address can earn over a period of time.
LiALEX is the transferable utility token that allows you to maintain liquidity while staking your $ALEX. When you stake $ALEX through LISA, you mint LiALEX that allow you to participate in other DeFi activities, such as requesting stablecoin loans or investing them in farming pools. For more information, refer to the [LISA Documentation](https://docs.lisalab.io/)
</details>
<!--
## What is the difference between APR and APY?
How long should I stake my $ALEX for?
-->

View File

@@ -1,5 +1,4 @@
# How to stake on ALEX
# 🧑‍🏫 How to stake
Staking on ALEX takes a few easy steps. In short, it consists of locking up your tokens temporarily to earn rewards. In staking, time is measured in cycles, and at the end of each cycle, you will be able to harvest your rewards.
This section explains how to stake your $ALEX manually. For liquid staking with LISA, please consult the [LISA Documentation](https://docs.lisalab.io/).
@@ -142,7 +141,3 @@ Recommended to track transaction status:
<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>
</div>

View File

@@ -1,4 +1,4 @@
# Key concepts
# 💡 Key concepts
## Staking Basics

View File

@@ -2,7 +2,7 @@
description: Common questions that may arise when trading tokens.
---
# FAQs
# FAQs
<details>

View File

@@ -1,9 +1,8 @@
---
description: >-
This guide will showcase how to swap two tokens on ALEX Lab App.
description: This guide will showcase how to swap two tokens on ALEX Lab App.
---
# How to swap
# 🧑‍🏫 How to swap
When performing a token swap, you transfer an amount of the token you want to exchange (base token) to the ALEX smart contract. In return, you receive a pre-agreed amount of the desired token (target token) from the ALEX smart contract, all within a single swap transaction. The resulting balance changes will be reflected in your wallet.
@@ -15,19 +14,11 @@ That said, let's get hands-on!
Go to [https://app.alexlab.co/](https://app.alexlab.co/) to see the Swap panel. You can also navigate to it by clicking the "Swap" tab on the top menu bar.
<div>
<figure><img src="../../.gitbook/assets/token-swaps/1-swap-panel.png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/token-swaps/1-swap-tab.png" alt="" width="375"><figcaption></figcaption></figure>
</div>
<div><figure><img src="../../.gitbook/assets/token-swaps/1-swap-panel.png" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="../../.gitbook/assets/token-swaps/1-swap-tab.png" alt="" width="375"><figcaption></figcaption></figure></div>
### Step 2
Select the tokens you want to exchange and the amount.&#x20;
Select the tokens you want to exchange and the amount.
* The token at the top is the **base** token, the token you currently hold and want to exchange.
* The token below is the **quoted** or **target** token, the token you will receive in the trade.
@@ -49,8 +40,8 @@ Clicking the "Max" button will automatically set the amount to your total availa
Check the transaction details by clicking the dropdown "Details" arrow below the amounts. This will expand a Details panel with relevant trading information.
* **Route:** The exchange route to convert from the base token into the target token. In the example we see STX -> ALEX, indicating it is a one-step or direct swap.&#x20;
* **Liquidity Provider Fee:** The swap fee, which is shared between the Liquidity Providers (LPs) and the ALEX Lab Platform.&#x20;
* **Route:** The exchange route to convert from the base token into the target token. In the example we see STX -> ALEX, indicating it is a one-step or direct swap.
* **Liquidity Provider Fee:** The swap fee, which is shared between the Liquidity Providers (LPs) and the ALEX Lab Platform.
* **Price Impact:** How much your swap affects the exchange rate.
* **Slippage Tolerance:** The maximum percentage of price movement you'll accept between the time you submit the transaction and its execution. The default slippage tolerance setting is 4%, but you can select a custom percentage. If price movement exceeds the slippage tolerance, the transaction will be reverted.
* **Minimum Received:** The minimum amount of target token you will receive considering the maximum slippage variation.
@@ -59,7 +50,7 @@ Check the transaction details by clicking the dropdown "Details" arrow below the
#### Transaction Settings
If you want to adjust slippage tolerance, select the "Settings" icon to open the Transaction Settings panel. Set your desired tolerance and click "Confirm". This will determine your allowed range for price movement. Your transaction will revert if the price changes unfavourably by more than this percentage.&#x20;
If you want to adjust slippage tolerance, select the "Settings" icon to open the Transaction Settings panel. Set your desired tolerance and click "Confirm". This will determine your allowed range for price movement. Your transaction will revert if the price changes unfavourably by more than this percentage.
<figure><img src="../../.gitbook/assets/token-swaps/3-tx-settings-icon.png" alt="" width="375"><figcaption><p>Transaction Settings icon.</p></figcaption></figure>
@@ -84,15 +75,7 @@ To be completely sure, you can check:
* The amount the smart contract transfers to you (ALEX in the example) is subject to an "equal to or greater than" condition. This accounts the potential slippage variation, and here you can see the exact lower bound.
{% endhint %}
<div>
<figure><img src="../../.gitbook/assets/token-swaps/5-swap-helper-post-con.png" alt="" width="375"><figcaption><p>Transfer amounts involved and post conditions.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/token-swaps/5-swap-helper-function-args.png" alt="" width="375"><figcaption><p>Function arguments and confirmation button.</p></figcaption></figure>
</div>
<div><figure><img src="../../.gitbook/assets/token-swaps/5-swap-helper-post-con.png" alt="" width="375"><figcaption><p>Transfer amounts involved and post conditions.</p></figcaption></figure> <figure><img src="../../.gitbook/assets/token-swaps/5-swap-helper-function-args.png" alt="" width="375"><figcaption><p>Function arguments and confirmation button.</p></figcaption></figure></div>
### Step 6 <a href="#step-7" id="step-7"></a>
@@ -106,30 +89,12 @@ Recommended to track transaction status:
* Check your address activity on the wallet.
{% endhint %}
<!-- Real tx: https://explorer.hiro.so/txid/0x4018603651b9fbed296a575b7eb7e08e12764e97faf7448a7862eccad26dfb35?chain=mainnet -->
<div><figure><img src="../../.gitbook/assets/token-swaps/6-tg-tx-pending.png" alt="" width="345"><figcaption><p>Telegram message with transaction pending status.</p></figcaption></figure> <figure><img src="../../.gitbook/assets/token-swaps/6-tg-tx-success.png" alt="" width="350"><figcaption><p>Telegram message with transaction success status.</p></figcaption></figure></div>
<div>
<figure><img src="../../.gitbook/assets/token-swaps/6-tg-tx-pending.png" alt="" width="345"><figcaption><p>Telegram message with transaction pending status.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/token-swaps/6-tg-tx-success.png" alt="" width="350"><figcaption><p>Telegram message with transaction success status.</p></figcaption></figure>
</div>
<div>
<figure><img src="../../.gitbook/assets/token-swaps/6-leather-tx-pending.png" alt="" width="375"><figcaption><p>Transaction pending displayed on Leather wallet.</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/token-swaps/6-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure>
</div>
<div><figure><img src="../../.gitbook/assets/token-swaps/6-leather-tx-pending.png" alt="" width="375"><figcaption><p>Transaction pending displayed on Leather wallet.</p></figcaption></figure> <figure><img src="../../.gitbook/assets/token-swaps/6-leather-tx-success.png" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure></div>
### Step 7
Once the transaction is completed, you will see the balance updated in your wallet.&#x20;
Once the transaction is completed, you will see the balance updated in your wallet.
Thank you for successfully swapping on ALEX! :arrows\_counterclockwise: :moneybag: :white\_check\_mark:&#x20;
Thank you for successfully swapping on ALEX! :arrows\_counterclockwise: :moneybag: :white\_check\_mark:

View File

@@ -1,9 +1,8 @@
---
description: >-
Learn the key terms involved in ALEX swap operations.
description: Learn the key terms involved in ALEX swap operations.
---
# Key concepts
# 💡 Key concepts
### Token Swap

View File

@@ -40,13 +40,13 @@ description: >-
Chiente Hsu: [https://twitter.com/RuleBasedInvest](https://twitter.com/RuleBasedInvest)
Rachel: [https://twitter.com/rachel\_alexgo](https://twitter.com/rachel\_alexgo)
Rachel: [https://twitter.com/rachel\_alexgo](https://twitter.com/rachel_alexgo)
### Verified Tag on Discord for Team Authenticity:&#x20;
![Discord Role Verification](<../.gitbook/assets/image (3) (1).png>)
![Discord Role Verification](<../.gitbook/assets/image (2) (1) (1).png>)
If you are looking for help with something beyond our Gitbook resources or trying to report issues on the platform, you may reach out to our team with the ALEX Team role.

View File

@@ -4,12 +4,16 @@ ALEX has reached out to two security audit firms for a complete smart contract a
[CoinFabrik](https://www.coinfabrik.com/) and [Least Authority](https://leastauthority.com/) audit report is available for a full review here.
We are also working with some of our top community security and smart contract experts like Hank & Jeff from Oby and the folks from [Syvita Guild](https://syvita.org/).
We are also working with some of our top community security and smart contract experts like Hank & Jeff from Oby and the folks from Syvita Guild.
Check the audit reports here:
- [Security Audit (1): CoinFabrik Security Review](https://drive.google.com/file/d/1sCxr-H\_NpnN-nZ8GPdi\_l7eGgtlBaxuz/view)
- [Security Audit (2): CoinFabrik Launchpad Vault and Reserv-Pool](https://blog.coinfabrik.com/smart-contract-audit/alexgo-audit-launchpad-vault-and-reserve-pool/)
- [2021-11 Pool Equation](https://cdn.alexgo.io/pdf/AlexGo_Audit_202111_Pool_Equation.pdf)
- [2022-01 Launchpad Vault Reserve](https://cdn.alexgo.io/pdf/AlexGo_Audit_202201_Launchpad_Vault_Reserve.pdf)
- [2022-02 DAO](https://cdn.alexgo.io/pdf/AlexGo_Audit_202202_DAO.pdf)
- [2022-04 AutoAlex CRP](https://cdn.alexgo.io/pdf/AlexGo_Audit_202204_Launchpadv1.1_AutoALEX_CRP.pdf)
- [2022-07 Orderbook](https://cdn.alexgo.io/pdf/AlexGo_Audit_20220709-Order_Book_(Spot).pdf)
- [2022-10 Orderbook (perpetual)](https://cdn.alexgo.io/pdf/Alex_Audit_2022-10.pdf)
## Immunefi Bounty Program

View File

@@ -0,0 +1,2 @@
# 📃 Whitepapers

View File

@@ -24,25 +24,25 @@ We will first review some desirable features of the AMM that ALEX hopes to exhib
## **Properties of AMM**
![https://miro.medium.com/max/1400/1\*3YqkqWB-v4ItOamoGNwocQ.png](https://miro.medium.com/max/1400/1\*3YqkqWB-v4ItOamoGNwocQ.png)
![https://miro.medium.com/max/1400/1\*3YqkqWB-v4ItOamoGNwocQ.png](https://miro.medium.com/max/1400/1*3YqkqWB-v4ItOamoGNwocQ.png)
Meanwhile, _f_ can usually be interpreted as a form of mean, for example, [mStable](https://docs.mstable.org/) relates to arithmetic mean, where _x_₁+_x_₂=L (constant sum formula); one of the most popular platforms [Uniswap](https://uniswap.org/whitepaper-v3.pdf) relates to geometric mean, where _x_₁_x_₂=L (constant product formula); [Balancer](https://balancer.fi/whitepaper.pdf), which our collateral rebalancing pool employs, applies weighted geometric mean. Its AMM is:
Meanwhile, _f_ can usually be interpreted as a form of mean, for example, [mStable](https://docs.mstable.org/) relates to arithmetic mean, where _&#x78;_&#x2081;+_&#x78;_&#x2082;=L (constant sum formula); one of the most popular platforms [Uniswap](https://uniswap.org/whitepaper-v3.pdf) relates to geometric mean, where _&#x78;_&#x2081;_&#x78;_&#x2082;=L (constant product formula); [Balancer](https://balancer.fi/whitepaper.pdf), which our collateral rebalancing pool employs, applies weighted geometric mean. Its AMM is:
![https://miro.medium.com/max/338/1\*PJRDEL52vRfvHKI7mjNYsA.png](https://miro.medium.com/max/338/1\*PJRDEL52vRfvHKI7mjNYsA.png)
![https://miro.medium.com/max/338/1\*PJRDEL52vRfvHKI7mjNYsA.png](https://miro.medium.com/max/338/1*PJRDEL52vRfvHKI7mjNYsA.png)
where _w_₁ and _w_ are fixed weights. However, none of these three protocols consider time to maturity, which is essential in modern interest rate theory.
where _&#x77;_&#x2081; and _&#x77;_&#x2082; are fixed weights. However, none of these three protocols consider time to maturity, which is essential in modern interest rate theory.
## **ALEX AMM**
After extensive research, we consider it possible for ALEX AMM to be connected to generalised mean defined as:
![https://miro.medium.com/max/1400/1\*uui14K4E2efhu7QA7v2SKw.png](https://miro.medium.com/max/1400/1\*uui14K4E2efhu7QA7v2SKw.png)
![https://miro.medium.com/max/1400/1\*uui14K4E2efhu7QA7v2SKw.png](https://miro.medium.com/max/1400/1*uui14K4E2efhu7QA7v2SKw.png)
![https://miro.medium.com/max/1400/1\*6ZBbIERf5zMOd4lHgQl\_0A.png](https://miro.medium.com/max/1400/1\*6ZBbIERf5zMOd4lHgQl\_0A.png)
![https://miro.medium.com/max/1400/1\*6ZBbIERf5zMOd4lHgQl\_0A.png](https://miro.medium.com/max/1400/1*6ZBbIERf5zMOd4lHgQl_0A.png)
In the benchmark research piece by [Yield Space](https://yield.is/YieldSpace.pdf), the invariant function above is formalized from the perspective of zero coupon bond. _p_ is replaced by 1_t_ where _t_ is time to maturity and _L_ is a function of _t_, so that
![https://miro.medium.com/max/1400/1\*IUsRchNH0bS3j93YG7Vsaw.png](https://miro.medium.com/max/1400/1\*IUsRchNH0bS3j93YG7Vsaw.png)
![https://miro.medium.com/max/1400/1\*IUsRchNH0bS3j93YG7Vsaw.png](https://miro.medium.com/max/1400/1*IUsRchNH0bS3j93YG7Vsaw.png)
In the rest of the paper, to be consistent with [Yield Space](https://yield.is/YieldSpace.pdf), we employ notations below
@@ -50,9 +50,9 @@ In the rest of the paper, to be consistent with [Yield Space](https://yield.is/Y
* _y_ : balance of ayToken
* _r_ : implied interest rate, defined as the natural logarithm of balance of ayToken and Token
![https://miro.medium.com/max/1400/1\*rJFBOIh\_J-RuH8OI68mCBA.png](https://miro.medium.com/max/1400/1\*rJFBOIh\_J-RuH8OI68mCBA.png)
![https://miro.medium.com/max/1400/1\*rJFBOIh\_J-RuH8OI68mCBA.png](https://miro.medium.com/max/1400/1*rJFBOIh_J-RuH8OI68mCBA.png)
![https://miro.medium.com/max/1400/1\*Gvu2JnE2aNKjpscVID-6NA.png](https://miro.medium.com/max/1400/1\*Gvu2JnE2aNKjpscVID-6NA.png)
![https://miro.medium.com/max/1400/1\*Gvu2JnE2aNKjpscVID-6NA.png](https://miro.medium.com/max/1400/1*Gvu2JnE2aNKjpscVID-6NA.png)
Though purely theoretical at this stage, [Appendix 2](https://medium.com/whitepaper/automated-market-making-of-alex#appendix-2-liquidity-mapping-to-uniswap-v3) maps _L_ to the liquidity distribution of [Uniswap V3](https://uniswap.org/whitepaper-v3.pdf). This is motivated by an independent research from [Paradigm](https://www.paradigm.xyz/2021/06/uniswap-v3-the-universal-amm/).
@@ -62,54 +62,54 @@ Market transactions, which involves exchange of Token and ayToken, satisfies the
## **Out-Given-In**
![https://miro.medium.com/max/1400/1\*8WMeCR7XkOhMFfBbOREQ-Q.png](https://miro.medium.com/max/1400/1\*8WMeCR7XkOhMFfBbOREQ-Q.png)
![https://miro.medium.com/max/1400/1\*8WMeCR7XkOhMFfBbOREQ-Q.png](https://miro.medium.com/max/1400/1*8WMeCR7XkOhMFfBbOREQ-Q.png)
![https://miro.medium.com/max/1400/1\*WrwxJAhbY2baGGHE3xguiw.png](https://miro.medium.com/max/1400/1\*WrwxJAhbY2baGGHE3xguiw.png)
![https://miro.medium.com/max/1400/1\*WrwxJAhbY2baGGHE3xguiw.png](https://miro.medium.com/max/1400/1*WrwxJAhbY2baGGHE3xguiw.png)
![https://miro.medium.com/max/1400/1\*r5JHkckZev3K9N9Sa5pSfw.png](https://miro.medium.com/max/1400/1\*r5JHkckZev3K9N9Sa5pSfw.png)
![https://miro.medium.com/max/1400/1\*r5JHkckZev3K9N9Sa5pSfw.png](https://miro.medium.com/max/1400/1*r5JHkckZev3K9N9Sa5pSfw.png)
![https://miro.medium.com/max/1400/1\*04K06US94bsXUAy4I5d6kg.png](https://miro.medium.com/max/1400/1\*04K06US94bsXUAy4I5d6kg.png)
![https://miro.medium.com/max/1400/1\*04K06US94bsXUAy4I5d6kg.png](https://miro.medium.com/max/1400/1*04K06US94bsXUAy4I5d6kg.png)
![https://miro.medium.com/max/1400/1\*wwJMeWllkefYct7oi-G5Ig.png](https://miro.medium.com/max/1400/1\*wwJMeWllkefYct7oi-G5Ig.png)
![https://miro.medium.com/max/1400/1\*wwJMeWllkefYct7oi-G5Ig.png](https://miro.medium.com/max/1400/1*wwJMeWllkefYct7oi-G5Ig.png)
![https://miro.medium.com/max/1400/1\*5ViCy9rX05OJBCSRlYK3pw.png](https://miro.medium.com/max/1400/1\*5ViCy9rX05OJBCSRlYK3pw.png)
![https://miro.medium.com/max/1400/1\*5ViCy9rX05OJBCSRlYK3pw.png](https://miro.medium.com/max/1400/1*5ViCy9rX05OJBCSRlYK3pw.png)
[https://miro.medium.com/max/820/0\*io5bXLFMARJOxplP](https://miro.medium.com/max/820/0\*io5bXLFMARJOxplP)
[https://miro.medium.com/max/820/0\*io5bXLFMARJOxplP](https://miro.medium.com/max/820/0*io5bXLFMARJOxplP)
Figure 1
![https://miro.medium.com/max/1400/1\*oHNB8jZmKW5R8iNC1x-LYQ.png](https://miro.medium.com/max/1400/1\*oHNB8jZmKW5R8iNC1x-LYQ.png)
![https://miro.medium.com/max/1400/1\*oHNB8jZmKW5R8iNC1x-LYQ.png](https://miro.medium.com/max/1400/1*oHNB8jZmKW5R8iNC1x-LYQ.png)
![https://miro.medium.com/max/1400/1\*qcXdKb7xpc\_rumRAM3dWTw.png](https://miro.medium.com/max/1400/1\*qcXdKb7xpc\_rumRAM3dWTw.png)
![https://miro.medium.com/max/1400/1\*qcXdKb7xpc\_rumRAM3dWTw.png](https://miro.medium.com/max/1400/1*qcXdKb7xpc_rumRAM3dWTw.png)
![https://miro.medium.com/max/1400/1\*EugLUkC1QWy0bsFmTIk59Q.png](https://miro.medium.com/max/1400/1\*EugLUkC1QWy0bsFmTIk59Q.png)
![https://miro.medium.com/max/1400/1\*EugLUkC1QWy0bsFmTIk59Q.png](https://miro.medium.com/max/1400/1*EugLUkC1QWy0bsFmTIk59Q.png)
![https://miro.medium.com/max/1400/1\*PLKTpDZuCLliU1ykDGIv0w.png](https://miro.medium.com/max/1400/1\*PLKTpDZuCLliU1ykDGIv0w.png)
![https://miro.medium.com/max/1400/1\*PLKTpDZuCLliU1ykDGIv0w.png](https://miro.medium.com/max/1400/1*PLKTpDZuCLliU1ykDGIv0w.png)
![https://miro.medium.com/max/1400/1\*knOe6WwHMlRKP9Wklg6S8g.png](https://miro.medium.com/max/1400/1\*knOe6WwHMlRKP9Wklg6S8g.png)
![https://miro.medium.com/max/1400/1\*knOe6WwHMlRKP9Wklg6S8g.png](https://miro.medium.com/max/1400/1*knOe6WwHMlRKP9Wklg6S8g.png)
![https://miro.medium.com/max/1400/1\*VpA4DEJXfl3OH1RhW8xMxQ.png](https://miro.medium.com/max/1400/1\*VpA4DEJXfl3OH1RhW8xMxQ.png)
![https://miro.medium.com/max/1400/1\*VpA4DEJXfl3OH1RhW8xMxQ.png](https://miro.medium.com/max/1400/1*VpA4DEJXfl3OH1RhW8xMxQ.png)
![https://miro.medium.com/max/1400/1\*NkE8mAW8LsHQWY9nbHcApw.png](https://miro.medium.com/max/1400/1\*NkE8mAW8LsHQWY9nbHcApw.png)
![https://miro.medium.com/max/1400/1\*NkE8mAW8LsHQWY9nbHcApw.png](https://miro.medium.com/max/1400/1*NkE8mAW8LsHQWY9nbHcApw.png)
[https://miro.medium.com/max/1104/0\*wKYLoNXy2EaX-fpL](https://miro.medium.com/max/1104/0\*wKYLoNXy2EaX-fpL)
[https://miro.medium.com/max/1104/0\*wKYLoNXy2EaX-fpL](https://miro.medium.com/max/1104/0*wKYLoNXy2EaX-fpL)
Figure 2
![https://miro.medium.com/max/1400/1\*oaYS5hBSITx1C79rpT1Mpw.png](https://miro.medium.com/max/1400/1\*oaYS5hBSITx1C79rpT1Mpw.png)
![https://miro.medium.com/max/1400/1\*oaYS5hBSITx1C79rpT1Mpw.png](https://miro.medium.com/max/1400/1*oaYS5hBSITx1C79rpT1Mpw.png)
![https://miro.medium.com/max/1400/1\*E4rkTP8zXBuB1fK9-GMQSQ.png](https://miro.medium.com/max/1400/1\*E4rkTP8zXBuB1fK9-GMQSQ.png)
![https://miro.medium.com/max/1400/1\*E4rkTP8zXBuB1fK9-GMQSQ.png](https://miro.medium.com/max/1400/1*E4rkTP8zXBuB1fK9-GMQSQ.png)
![https://miro.medium.com/max/1400/1\*7WJPUmndF9AOgmsPlfN6uw.png](https://miro.medium.com/max/1400/1\*7WJPUmndF9AOgmsPlfN6uw.png)
![https://miro.medium.com/max/1400/1\*7WJPUmndF9AOgmsPlfN6uw.png](https://miro.medium.com/max/1400/1*7WJPUmndF9AOgmsPlfN6uw.png)
![https://miro.medium.com/max/1400/1\*IE9uG1WxODh7w3ynTC0ybA.png](https://miro.medium.com/max/1400/1\*IE9uG1WxODh7w3ynTC0ybA.png)
![https://miro.medium.com/max/1400/1\*IE9uG1WxODh7w3ynTC0ybA.png](https://miro.medium.com/max/1400/1*IE9uG1WxODh7w3ynTC0ybA.png)
![https://miro.medium.com/max/1400/1\*FwND\_W14vRbt05pFiyTNdg.png](https://miro.medium.com/max/1400/1\*FwND\_W14vRbt05pFiyTNdg.png)
![https://miro.medium.com/max/1400/1\*FwND\_W14vRbt05pFiyTNdg.png](https://miro.medium.com/max/1400/1*FwND_W14vRbt05pFiyTNdg.png)
![https://miro.medium.com/max/1400/1\*LroQGwF17qftskZ-FeO5hg.png](https://miro.medium.com/max/1400/1\*LroQGwF17qftskZ-FeO5hg.png)
![https://miro.medium.com/max/1400/1\*LroQGwF17qftskZ-FeO5hg.png](https://miro.medium.com/max/1400/1*LroQGwF17qftskZ-FeO5hg.png)
![https://miro.medium.com/max/1400/1\*wbIXxhBDwY\_cobmf-Y5LCA.png](https://miro.medium.com/max/1400/1\*wbIXxhBDwY\_cobmf-Y5LCA.png)
![https://miro.medium.com/max/1400/1\*wbIXxhBDwY\_cobmf-Y5LCA.png](https://miro.medium.com/max/1400/1*wbIXxhBDwY_cobmf-Y5LCA.png)
[https://miro.medium.com/max/970/0\*dt0RxVxz0DKLxnIu](https://miro.medium.com/max/970/0\*dt0RxVxz0DKLxnIu)
[https://miro.medium.com/max/970/0\*dt0RxVxz0DKLxnIu](https://miro.medium.com/max/970/0*dt0RxVxz0DKLxnIu)
Figure 3

View File

@@ -16,7 +16,7 @@ ALEXs algorithmic engine and diversified pools minimize the risk of a borrowe
Protocols for loanable funds (PLF) enable borrowing and lending activities. Examples PLFs are Compound and Aave on Ethereum. The lender provides a token in need and earns interest in return. The borrower deposits collateral and gets access to a preferred asset. The borrower must pay back the borrowed asset in due time. Protocols enabling this borrowing and lending functionality are incredibly useful. Simply, they enable the present consumption on future earnings. This idea is powerful, and has been at the core of DeFis rise, including the rise of protocols such as Uniswap.
![https://miro.medium.com/max/1400/1\*Dj-HeVOc9nH1C7GNnbIBLw.gif](https://miro.medium.com/max/1400/1\*Dj-HeVOc9nH1C7GNnbIBLw.gif)
![https://miro.medium.com/max/1400/1\*Dj-HeVOc9nH1C7GNnbIBLw.gif](https://miro.medium.com/max/1400/1*Dj-HeVOc9nH1C7GNnbIBLw.gif)
Simulation of ALEXs AMM of Collateral Rebalancing Pool during high market volatility
@@ -50,23 +50,23 @@ GMMMs were first introduced by Balancer. A GMMM represents an extension to the A
Mathematically, a GMMM consisting of two assets can be expressed as follows:
![https://miro.medium.com/max/1400/1\*EhhHu9KcyuSFrdqVY9Wc0A.png](https://miro.medium.com/max/1400/1\*EhhHu9KcyuSFrdqVY9Wc0A.png)
![https://miro.medium.com/max/1400/1\*EhhHu9KcyuSFrdqVY9Wc0A.png](https://miro.medium.com/max/1400/1*EhhHu9KcyuSFrdqVY9Wc0A.png)
where _x(t)_ and _y(t)_ are the balance of the risky asset and the riskless asset respectively, whereas _w_ₓ\*(_t_)\* and _w_ᵧ\*(_t_)\* are the corresponding weights and _w_ₓ\*(_t_) + w_ᵧ_(_t_) =_1. L_(_t_)\* is the invariant constant, which remains unchanged when weights are fixed in between rebalancing time.
where _x(t)_ and _y(t)_ are the balance of the risky asset and the riskless asset respectively, whereas _&#x77;_&#x2093;\*(_t_)\* and _&#x77;_&#x1D67;\*(_t_)\* are the corresponding weights and _&#x77;_&#x2093;\*(_t_) + &#x77;_&#x1D67;_(_t_) =_1. L_(_t_)\* is the invariant constant, which remains unchanged when weights are fixed in between rebalancing time.
Prices _p_ₓ\*(_t_)\* and _p_c\*(_t_)\*, which share the same numeraire such as USD, satisfy the following no-arbitrage condition:
Prices _&#x70;_&#x2093;\*(_t_)\* and _&#x70;_&#x63;\*(_t_)\*, which share the same numeraire such as USD, satisfy the following no-arbitrage condition:
![https://miro.medium.com/max/1400/1\*qHqjeSZsCNNm9MAoJju7xQ.png](https://miro.medium.com/max/1400/1\*qHqjeSZsCNNm9MAoJju7xQ.png)
![https://miro.medium.com/max/1400/1\*qHqjeSZsCNNm9MAoJju7xQ.png](https://miro.medium.com/max/1400/1*qHqjeSZsCNNm9MAoJju7xQ.png)
Denote the pool values as _v(t)=x(t)p_ₓ(t)+_y(t)pᵥ(t)._ Combining with a no-arbitrage condition, we can show that:
Denote the pool values as _v(t)=x(t)&#x70;_&#x2093;(t)+_y(t)pᵥ(t)._ Combining with a no-arbitrage condition, we can show that:
![https://miro.medium.com/max/1400/1\*S0o0Uy1ArP01mZEQUeX5sw.png](https://miro.medium.com/max/1400/1\*S0o0Uy1ArP01mZEQUeX5sw.png)
![https://miro.medium.com/max/1400/1\*S0o0Uy1ArP01mZEQUeX5sw.png](https://miro.medium.com/max/1400/1*S0o0Uy1ArP01mZEQUeX5sw.png)
This means that a pools weight represents the underlying asset value in proportion to the pools value.
Lastly, GMMM is related to the generalized mean AMM employed in the Yield Token Pool by setting _w_ₓ(t)=_w_ᵧ(t)=0.5 because:
Lastly, GMMM is related to the generalized mean AMM employed in the Yield Token Pool by setting _&#x77;_&#x2093;(t)=_&#x77;_&#x1D67;(t)=0.5 because:
![https://miro.medium.com/max/1400/1\*lglIssQwvz2taKXnkT0H9A.png](https://miro.medium.com/max/1400/1\*lglIssQwvz2taKXnkT0H9A.png)
![https://miro.medium.com/max/1400/1\*lglIssQwvz2taKXnkT0H9A.png](https://miro.medium.com/max/1400/1*lglIssQwvz2taKXnkT0H9A.png)
## **Rebalancing Set-up and Collateral Pool Valuation**
@@ -74,15 +74,15 @@ In conventional finance, rebalancing results in updated allocation of underlying
Assume the loan is borrowed at time 0 and returned at time T. There are k-1 rebalancing events throughout the life time of the loan:
![https://miro.medium.com/max/1232/1\*iH5-4FbUQ\_5gz2yUKqCF5A.png](https://miro.medium.com/max/1232/1\*iH5-4FbUQ\_5gz2yUKqCF5A.png)
![https://miro.medium.com/max/1232/1\*iH5-4FbUQ\_5gz2yUKqCF5A.png](https://miro.medium.com/max/1232/1*iH5-4FbUQ_5gz2yUKqCF5A.png)
At the start of the contract _t_=0, initially deposited risky asset is split into _x(t_₀) and _y(t_). The split may occur using any trading platform, including our in-house DEX.
At the start of the contract _&#x74;_&#x2080;=0, initially deposited risky asset is split into _x(&#x74;_&#x2080;) and _y(&#x74;_&#x2080;). The split may occur using any trading platform, including our in-house DEX.
At rebalancing time _t_ᵢ(\*i=1,2,\*⋯,_k_-1), price will deviate from the market as soon as weights are updated. Our system relies on arbitrageurs to align the price with the market by trading in the pool. This subsequently impacts token balances, the invariant constant, and portfolio value.
At rebalancing time _&#x74;_&#x1D62;(\*i=1,2,\*⋯,_k_-1), price will deviate from the market as soon as weights are updated. Our system relies on arbitrageurs to align the price with the market by trading in the pool. This subsequently impacts token balances, the invariant constant, and portfolio value.
The process is summarized below:
![https://miro.medium.com/max/1400/1\*e6RykjNfAVbXIasML\_9tiQ.png](https://miro.medium.com/max/1400/1\*e6RykjNfAVbXIasML\_9tiQ.png)
![https://miro.medium.com/max/1400/1\*e6RykjNfAVbXIasML\_9tiQ.png](https://miro.medium.com/max/1400/1*e6RykjNfAVbXIasML_9tiQ.png)
## **Dynamic Rebalancing**
@@ -90,21 +90,21 @@ ALEXs rebalancing collateral pool is dynamic. It integrates the concept of as
In the current version, a collateral pools allocation mechanism has close ties with option delta. Option delta measures the sensitivity of the options valuation to the underlying asset price movement. The delta of a call option ranges between 0 and 1 depending on an assets spot price and the options strike price, as shown in Figure 1. The higher the spot price, the larger the delta. Therefore, the more weight would be assigned to risky asset. When the strike price is set to be the same as asset spot price (at-the-money option), the delta is around 0.5. In ALEXs design, this means holding an equal amount of the risky and of the riskless assets.
[https://miro.medium.com/max/794/0\*mcJ5LmUNj\_xsGVm4](https://miro.medium.com/max/794/0\*mcJ5LmUNj\_xsGVm4)
[https://miro.medium.com/max/794/0\*mcJ5LmUNj\_xsGVm4](https://miro.medium.com/max/794/0*mcJ5LmUNj_xsGVm4)
In mathematical terms, option delta δ(t) is calculated from Black Scholes model as follows:
![https://miro.medium.com/max/1400/1\*oWEaop1P3M0ytfDz72JQbQ.png](https://miro.medium.com/max/1400/1\*oWEaop1P3M0ytfDz72JQbQ.png)
![https://miro.medium.com/max/1400/1\*oWEaop1P3M0ytfDz72JQbQ.png](https://miro.medium.com/max/1400/1*oWEaop1P3M0ytfDz72JQbQ.png)
Ideally, the relative weights of the risky and riskless assets should be updated continuously to reflect spot price movements and delta changes. In practice, we are updating the weights periodically (e.g. daily). However as cryptoassets typically exhibit higher volatility than other asset classes, delta changes can be significantly different between time periods. Significant movements tend to imply considerable price deviations from the market after rebalancing. This leads to significant profits for arbitrageurs, but arbitrageurs gains are often a collateral pool losses. This is similar to impermanent loss. However, while impermanent loss is caused by token balances moving along an AMM curve, here it is caused by weight changes and the effort to preserve price.
[https://miro.medium.com/max/940/0\*P-d-Fo0\_g7QIgqjS](https://miro.medium.com/max/940/0\*P-d-Fo0\_g7QIgqjS)
[https://miro.medium.com/max/940/0\*P-d-Fo0\_g7QIgqjS](https://miro.medium.com/max/940/0*P-d-Fo0_g7QIgqjS)
To mitigate the impact of weight changes, ALEX smooths the delta using an exponential moving average. At rebalancing time _t_ᵢ, the holding of a risky asset is calculated as
To mitigate the impact of weight changes, ALEX smooths the delta using an exponential moving average. At rebalancing time _&#x74;_&#x1D62;, the holding of a risky asset is calculated as
![https://miro.medium.com/max/882/1\*4IbQoNYoKw5SSvGgvUbpcA.png](https://miro.medium.com/max/882/1\*4IbQoNYoKw5SSvGgvUbpcA.png)
![https://miro.medium.com/max/882/1\*4IbQoNYoKw5SSvGgvUbpcA.png](https://miro.medium.com/max/882/1*4IbQoNYoKw5SSvGgvUbpcA.png)
where α is the smoothing factor. Allocation to the riskless asset is thus 1_w_ₓ(_t_ᵢ). Figure 2 compares the risky asset weight and the option delta of a simulated bitcoin path over a three-month period.
where α is the smoothing factor. Allocation to the riskless asset is thus 1_&#x77;_&#x2093;(_&#x74;_&#x1D62;). Figure 2 compares the risky asset weight and the option delta of a simulated bitcoin path over a three-month period.
In comparison with a collateral pool consisting of single asset, a collateral rebalancing pool could underperform when the market is risk-on and a risky asset exhibits strong upward price momentum. This is because holding a risky asset is a smoothed version of option delta, suggesting the assets weight hardly reaches 100%. However, when the market is tumbling and the risky asset depreciates, more weight is assigned to the riskless asset, reducing losses. This rebalancing slows down portfolio value depreciation. It also increases the chance of the loan staying afloat. Taken together, both these effects ensure robust performance with dynamic collateral pools across market conditions.
@@ -141,7 +141,7 @@ Most of the contents below are discussed in the main sections. Nonetheless, we l
* **Rebalancing Frequency**: Theoretically, continuous rebalancing is preferred for price continuity. In practice, ALEX updates the weights periodically to avoid over-calibration.
* **Smoothing Factor of Exponential Moving Average (EMA)**: EMA is an averaging method that places more weight on more recent observations. Assume y(t) is the observation value of y at time t, and that {y}(t) is the corresponding moving average, where α is the smoothing factor. Then:
![https://miro.medium.com/max/706/1\*fHHgHEoR2HEb7EdnI8sokA.png](https://miro.medium.com/max/706/1\*fHHgHEoR2HEb7EdnI8sokA.png)
![https://miro.medium.com/max/706/1\*fHHgHEoR2HEb7EdnI8sokA.png](https://miro.medium.com/max/706/1*fHHgHEoR2HEb7EdnI8sokA.png)
## **Flight to Quality**