# Introduction

Introduction to mySwap Concentrated Liquidity AMM

Built on Starknet, mySwap's Concentrated Liquidity Automated Market Maker (AMM) leverages Starknet's cost-effective computation to offer trades at very low gas fees. It marries an intuitive user experience with unparalleled gas efficiency, establishing itself as a premier choice for both traders and liquidity providers. By concentrating liquidity within specific price ranges, mySwap facilitates more efficient trades, drastically reducing slippage and maximizing returns. It not only optimizes capital usage but also provides participants with a seamless and user-friendly interface, ensuring effortless navigation and interaction.

Whether you aim to trade or provide liquidity, mySwap's Concentrated Liquidity AMM presents a compelling solution that blends superior performance with ease of use, transforming the Starknet DeFi landscape.


# Providing Liquidity

How to provide liquidity on mySwap

Providing liquidity on a concentrated liquidity (CL) AMM, such as mySwap, is more intricate than on a traditional constant product (CP) AMM, like Uniswap v2. It demands a deeper understanding of liquidity provisioning and, in some cases (especially for non-stablecoin pairs), active management of liquidity to secure higher yields.&#x20;

The mySwap user interface features a step-by-step guide tailored to both newcomers and experienced users alike.&#x20;

Watch the following video for a live demo on how to add liquidity to mySwap.

{% embed url="<https://youtu.be/Vcm6aXVg3oc>" %}


# Rebalance

Why it is important to balance your position

Rebalancing your position in a concentrated liquidity Automated Market Maker (AMM) is crucial for optimizing investment returns and minimizing risk. In a concentrated liquidity AMM, liquidity is provided within specific price ranges, making positions more susceptible to market volatility and price movements. Without regular rebalancing, your investment might become less effective as the market moves out of your chosen price range, leading to a phenomenon known as "impermanent loss" (IL). By actively managing and rebalancing your position, you ensure that your capital is allocated efficiently, maximizing yield opportunities and staying aligned with current market conditions.&#x20;

Furthermore, rebalancing allows liquidity providers to adjust their risk exposure and capture fees from trades occurring within their specified price ranges.&#x20;

In essence, constant rebalancing is a dynamic strategy that adapts to market shifts, enhancing the potential for profit while mitigating risks in the fast-paced environment of DeFi platforms. However, it is important to take into consideration the transaction gas cost, swaps gas impact and IL.

At mySwap, we've introduced a one-click Rebalance button that lets you adjust your position to the current price within the same range as your original setup. This feature not only saves on gas—by consolidating liquidity removal, swapping, and addition into a single transaction—but also retains your original NFT and eliminates the need for manually performing these three operations and their associated calculations.

The Rebalance button is located in the top right corner of your position card under the Pools tab in the mySwap CL dApp.


# mySwap Leaderboard

Description of mySwap Leaderboard

The mySwap CL Leaderboard offers a dynamic and strategic platform for users to enhance their position within the mySwap ecosystem through an innovative points-based system. This system is designed to reward users for their trading activities, specifically focusing on the lifetime fees generated from both active and settled positions.&#x20;


# Overview

The mySwap CL Leaderboard offers a dynamic and strategic platform for users to enhance their position within the mySwap ecosystem through an innovative points-based system. This system is designed to reward users for their trading activities, specifically focusing on the lifetime fees generated from both active and settled positions. Here's an overview:

* Comprehensive Points Calculation: Points are based on the fees accrued  in each position. These fees are converted into USD and are influenced by a variety of factors including the liquidity pool's specifics, the initiation time of the position, active participation within the mySwap community, and the security measures of the user's account. It's important to note that the calculation formula is subject to refinement and updates without prior notice.
* Strategic Timing and Pool Selection: The system incentivizes early position minting and strategic selection of liquidity pools. Positions created at earlier dates receive a higher points multiplier, rewarding long-term participation. Similarly, engaging with specific pools, especially those with lower transaction fees or designated as special, can significantly enhance points accumulation. This approach encourages a thoughtful and strategic engagement with the platform's offerings.
* Best Practices for Maximization: Users are advised to maintain active and concentrated positions to optimize fee generation and, consequently, points accrual. The platform simplifies this process through features like one-click rebalancing, allowing users to adjust their positions effortlessly to stay within the most lucrative ranges.

This leaderboard system is designed for users who are keen on maximizing their engagement and profitability within the mySwap platform. It rewards foresight, strategic planning, and active participation, aligning user incentives with the overall health and dynamism of the liquidity pools.<br>


# Points Calculation Formula

Each participant in the mySwap protocol earns points. The points are calculated as follows:

$$\text{total points} = \text{fee\_points} \times \text{fee\_points\_factor} + \text{bonus\_points}$$

#### Fee Points

Fee Points are based on fees accrued on all user's positions (live and closed).\
The fees are calculated by converting the accrued fees to USD at the time of the position closing, or at current time for live positions. The fees are converted to points by taking them as their USD value, mutplied by 100.\
For instance, with lifetime fees of 25$ you are eligible for 2,500 points.

#### Fee Points Factor

Fee points are eligible for a multiplicative factors based on:

* providing LP to special pools - up to x5 per position. special pools are:

| Pool       | Factor |
| ---------- | ------ |
| ETH/USDC   | 5      |
| USDC/USDT  | 5      |
| STRK/ETH   | 5      |
| STRK/USDC  | 5      |
| WBTC/ETH   | 5      |
| wstETH/ETH | 5      |
| USDC/DAI   | 5      |

* Early-bird LP: up to x2 for positions minted prior to Feb 1st 2024, x1.8 for positions to be minted prior to Match 1st 2024, x1.5 for positions to be minted prior to May 1st 2024, and decaying going forward. The exact formula is\
  \
  $$factor(days) = 1 + \frac{1}{2^{\frac{days}{90}}}$$

  \
  where $$days$$ are the number of days after the *launch date (Feb 1 2024)* in which  the position was minted, or 0 if minted at or prior to l*aunch date*

<figure><img src="/files/e5LUQuCrqnLqTS5tamui" alt=""><figcaption></figcaption></figure>

#### Bonus Points

Bonus Points based on community activity and campaigns participation:

* Bonus for Alpha-Coins and Yield-Alchemy campaign participation:  Users of mySwap V1 who participated in the two NFT campaigns will receive bonus points. Each of the 8 NFTs is worth between 200 and 500 bonus points.<br>

| NFT              | Bonus Points |
| ---------------- | ------------ |
| Alpha Blue Coin  | 200          |
| Alpha Red Coin   | 300          |
| Alpha Green Coin | 400          |
| Alpha Gold Coin  | 500          |
| Aurora's Ember   | 200          |
| Zephyr's Cascade | 300          |
| Terra's Glimmer  | 400          |
| Aqua's Gleam     | 500          |

* Bonus for secure accounts: Coming soon
* Bonus for mySwap community participation: coming soon


# FAQ

Leaderboard FAQs

### Frequently Asked Questions

**Q: How does the mint time impact my points?**

**A:** Each position has a mint time, the time in which the position was initially created. The older the position is, the higher its factor potentially is.

**Q: How does the position’s pool impact my points?**

**A:** Different pools have different token pairs and fees. We have factors for special pools which get special incentives.

**Q: What are the best practices for gaining higher ranking?**

**A**: In order to earn points, you need to make sure your positions are active, meaning they are balanced around the current price. In case you have an out-of-range position, it will not be earning points (nor fees) until you rebalance it. Luckily, you can now rebalance in a single click, and no math diploma required for the calculations. Just click the ‘Rebalance’ button in the top right corner of your position card.


# More Tips

Useful Leaderboard Tips

* The more concentrated your position is, the more fees and points you will earn. (Note that in non-stable pools, when setting a narrow range, you also have a larger risk of falling out of range).
* Minting your positions early will give you a higher factor for the lifetime of the position. Rebalancing a position does not change the factor - so you can keep the same old position working for you with a high factor, as long as you keep rebalancing it.


