Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Katana V3 Updates #38

Merged
merged 15 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-pool-confirm-remove.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-pool-remove-liquidity-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/apps/katana/assets/katana-pool-v2-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/apps/katana/assets/katana-pool-v3-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/apps/katana/assets/katana-routing-path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-seed-token-pool.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-seed-token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-starting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-swap-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-swap-from.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-swap-review-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-swap-to-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-swap-to.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/apps/katana/assets/katana-swap-txn-completed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/apps/katana/assets/katana-switch-pools.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 56 additions & 25 deletions docs/apps/katana/guides/add-liquidity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@

## Overview

You can add more liquidity to an existing pool on Katana to earn fees from transactions. When you contribute liquidity to a pool, you receive liquidity pool (LP) tokens in return. These tokens represent your share in the pool and entitle you to a portion of the trading fees generated by the pool's transactions, directly proportional to your contribution.
You can also remove your liquidity from a pool at any time. Removing pool tokens converts your position back into underlying tokens at the current rate, proportional to your share of the pool. Accrued fees are included in the amounts you receive.
You can add more liquidity to an existing pool on Katana to earn fees from trades. When you contribute liquidity to a pool, you receive liquidity pool (LP) tokens as proof of your contribution. In Katana V2, you receive fungible LP tokens that represent a fixed share of the entire pool. In V3, instead, you receive a position tokens which are represented by non-fungible tokens (NFTs) that tied to the specific price range of your liquidity. The pool's fees are also distributed in different ways, depending on the pool is V2 or V3. In V2, fees are distributed based on the amount of LP tokens held. In V3, fees are allocated to positions where the swap price is active in the range they cover, and are also proportional to the liquidity those positions provide.
You can also remove your liquidity from a pool at any time. Removing pool tokens converts your position back into underlying tokens at the current rate. Accrued fees are included in the amounts you receive. Note that fees in V3 are not automatically reinvested like in V2, so you need to claim them separately.

## Add liquidity to a pool
Open the [Liquidity pool](https://app.roninchain.com/liquidity) page and connect your Ronin Wallet.

1. Open [Katana](https://app.roninchain.com/swap) and connect your Ronin Wallet.
2. Select the **Liquidity pool** page, then open the pool you want to contribute to.
![Liquidity pool](../assets/katana-pool.png)
3. Enter the amount of tokens you want to contribute, then click **Add**. Katana automatically calculates the equivalent amount of the other token based on the current exchange rate. You may need to approve both tokens in your Ronin Wallet if you interact with them for the first time.
### For Katana V2 pools

Check warning on line 15 in docs/apps/katana/guides/add-liquidity.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Headings] 'For Katana V2 pools' should use sentence-style capitalization. Raw Output: {"message": "[Google.Headings] 'For Katana V2 pools' should use sentence-style capitalization.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 15, "column": 5}}}, "severity": "WARNING"}
1. Select the **V2 Pools** tab, then open the pool you want to contribute to.
![Liquidity pool](../assets/katana-pool-v2-list.png)

2. Enter the amount of tokens you want to contribute, then click **Add**. Katana automatically calculates the equivalent amount of the other token based on the current exchange rate. You may need to approve both tokens in your Ronin Wallet if you interact with them for the first time.

![Enter amount](../assets/katana-pool-enter-amount.png)

4. Review the details of your liquidity contribution:
3. Review the details of your liquidity contribution:
* The amount of LP tokens you will get in return.
* The amount of tokens you are contributing.
* The share of the pool you will receive.
Expand All @@ -33,42 +35,71 @@

The **My position** panel is now updated with your latest contribution:

* The amount of ERC20 tokens you contributed.
* The amount of ERC-20 tokens you contributed.
* The amount of LP tokens received in return.

![My position](../assets/katana-pool-add-position.png)

### For Katana V3 pools

Check warning on line 43 in docs/apps/katana/guides/add-liquidity.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Headings] 'For Katana V3 pools' should use sentence-style capitalization. Raw Output: {"message": "[Google.Headings] 'For Katana V3 pools' should use sentence-style capitalization.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 43, "column": 5}}}, "severity": "WARNING"}
1. Select the **V3 Pools** tabs, then open the pool you want to contribute to.
![Liquidity pool](../assets/katana-pool-v3-list.png)

2. Select the fee tier for your position. If the pool with the selected fee tier does not exist, your position will create a new pool with the fee tier.

Check warning on line 47 in docs/apps/katana/guides/add-liquidity.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 47, "column": 112}}}, "severity": "WARNING"}
![Create new V3 position](../assets/katana-pool-v3-new-position.png)

3. Enter or adjust the price range your position will provide liquidity for. Note that the minimum and maximum price values are rounded to the nearest tick price. You also see the capital efficiency of your position, which is the amount of liquidity your position provides compared to the liquidity when you provide for the full price range.

Check warning on line 50 in docs/apps/katana/guides/add-liquidity.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 50, "column": 50}}}, "severity": "WARNING"}

If the pool price is in the range of your position, your position will earn fees from the pool. If the price moves out of the range, your position will not earn fees and be concentrated to one of two tokens.

Check warning on line 52 in docs/apps/katana/guides/add-liquidity.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 52, "column": 71}}}, "severity": "WARNING"}

Check warning on line 52 in docs/apps/katana/guides/add-liquidity.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 52, "column": 152}}}, "severity": "WARNING"}

When your price range is above or below the current pool price, your position is called single-sided liquidity. It provides liquidity for only one token, and you will earn fees from the pool when the price moves to your range.

Check warning on line 54 in docs/apps/katana/guides/add-liquidity.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'preceding' instead of 'above'. Raw Output: {"message": "[Google.WordList] Use 'preceding' instead of 'above'.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 54, "column": 30}}}, "severity": "WARNING"}

Check warning on line 54 in docs/apps/katana/guides/add-liquidity.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 54, "column": 167}}}, "severity": "WARNING"}
If you intend to remove the position once the price has crossed the range and the position has been converted to the other token, this strategy is treated as a range order.
![Range order](../assets/katana-pool-range-order.png)

4. Enter the amount of tokens you want to contribute, then click **Add**. Katana automatically calculates the equivalent amount of the other token based on the current pool price and the price range of your position. You may need to approve both tokens in your Ronin Wallet if you interact with them for the first time.

5. Preview the details of your liquidity contribution:
* The amount of tokens you are contributing.
* The price range of your position.

Click **Add liquidity**, then confirm the transaction in your Ronin Wallet.

![Review details](../assets/katana-pool-v3-confirm-add.png)


## View your positions

To see all the pools you contributed to and the fees earned, open the **Liquidity pool** page, then select **My positions**.

![My positions](../assets/katana-pool-my-positions.png)

Here you can see the following information:

* The pools to which you contributed.
* The annual percentage rate (APR) for each pool.
* Your position in each pool.
* The fees you earned from each pool.
* Your claimable rewards from farming, if the pool supports it.
* With V2 pools
* The pools to which you contributed.
* The annual percentage rate (APR) for each pool.
* Your position in each pool.
* The fees you earned from each pool.
* Your claimable rewards from farming, if the pool supports it.
![My V2 Positions](../assets/katana-pool-my-positions-v2.png)

* With V3 pools
* The pools to which you contributed.
* The price range of your position.
* Your position size in each pool and price range respectively.
* The fees you collected from each pool.
* The fees you have not collected yet.
![My V3 Positions](../assets/katana-pool-my-positions-v3.png)

To view more details, such as the amount of LP tokens and the pool's performance over time, select each pool.

## Remove liquidity from a pool

1. Open the **Liquidity pool** page, then select the pool from which you want to withdraw liquidity.
1. Select the position you want to remove liquidity from in the **My positions** tab as described above.

![Liquidity pool](../assets/katana-pool.png)

2. Select the **Remove liquidity** panel.
2. Select the **Remove** liquidity panel.

![Remove liquidity panel](../assets/katana-pool-remove-liquidity-panel.png)

3. Select the portion of your liquidity you want to remove, or enter the amount manually. Then, click **Remove**.

![Enter amount to remove](../assets/katana-pool-remove-amount.png)
3. Select the portion of your liquidity you want to remove, or enter the amount manually (V2), or adjust the percentage (v3). Then, click **Remove**.

4. Review how much you're getting when removing liquidity, then click **Confirm remove liquidity** and confirm the transaction in your Ronin Wallet.
4. Review how much you're getting when removing liquidity, then click **Remove liquidity** and confirm the transaction in your Ronin Wallet.

![Review details](../assets/katana-pool-confirm-remove.png)

Expand All @@ -80,4 +111,4 @@

![My position](../assets/katana-pool-remove-position.png)

You have now removed your liquidity by removing your LP tokens, and have gotten your tokens with the accrued fees, proportionate to your shares. Thank you for your service.
You have now removed your liquidity, and have gotten your tokens with the accrued fees, proportionate to your shares. Thank you for your service.
2 changes: 1 addition & 1 deletion docs/apps/katana/guides/create-farm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ An important metric for farms is the rewards per second. This metric shows how m
## Prerequisites

* Only _whitelisted_ Ronin addresses can create farms. To get whitelisted, submit your Ronin address to Sky Mavis. This address will be linked to our farm contract. **Note:** this address can be the same as the one you used for pool creation, but you still need to get it whitelisted for farm creation.
* A liquidity pool with your ERC20 token created on Katana. For more information, see [Create a liquidity pool](create-pool.mdx).
* A liquidity pool with your ERC-20 token created on Katana. For more information, see [Create a liquidity pool](create-pool.mdx).

## Create a farm

Expand Down
Loading
Loading