Skip to content

Commit

Permalink
feat: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
RodinGolodin committed May 21, 2024
1 parent d161875 commit 05c0e9e
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 113 deletions.
82 changes: 82 additions & 0 deletions docs/apps/katana/guides/add-liquidity.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
title: Add liquidity to a pool
description: Add your tokens to a liquidity pool to earn fees from transactions.
---

## 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.

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

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Parens] Use parentheses judiciously. Raw Output: {"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 8, "column": 158}}}, "severity": "INFO"}
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.

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

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('are included'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('are included').", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 9, "column": 207}}}, "severity": "INFO"}

## Add liquidity to a pool

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.

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

4. Review the details of your liquidity contribution:
* The amount of LP tokens you will get in return.

Check warning on line 21 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": 21, "column": 35}}}, "severity": "WARNING"}
* The amount of tokens you are contributing.
* The share of the pool you will receive.

Check warning on line 23 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": 23, "column": 33}}}, "severity": "WARNING"}

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

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

Your transaction is now submitted to the blockchain. When it completes, Katana displays a confirmation pop-up. Close it or click **View on explorer** to see the detailed information about the transaction.

![Successful liquidity addition](../assets/katana-pool-add-success.png)

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

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

![My position](../assets/katana-pool-add-position.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.

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

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Parens] Use parentheses judiciously. Raw Output: {"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 49, "column": 30}}}, "severity": "INFO"}

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

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Acronyms] Spell out 'APR', if it's unfamiliar to the audience. Raw Output: {"message": "[Google.Acronyms] Spell out 'APR', if it's unfamiliar to the audience.", "location": {"path": "docs/apps/katana/guides/add-liquidity.mdx", "range": {"start": {"line": 49, "column": 31}}}, "severity": "INFO"}
* Your position in each pool.
* The fees you earned from each pool.
* Your claimable rewards from farming, if the pool supports it.

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.

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

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)

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

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

Your transaction is now submitted to the blockchain. When it completes, Katana displays a confirmation pop-up. Close it or click **View on explorer** to see the detailed information about the transaction.

![Successful liquidity removal](../assets/katana-pool-remove-success.png)

The **My position** panel is now updated with your latest position after removing liquidity:

![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.
27 changes: 14 additions & 13 deletions docs/apps/katana/guides/create-farm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,26 @@ 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](pool.mdx#create-a-liquidity-pool).
* 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.

Check warning on line 33 in docs/apps/katana/guides/create-farm.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/create-farm.mdx", "range": {"start": {"line": 33, "column": 129}}}, "severity": "WARNING"}
* A liquidity pool with your ERC20 token created on Katana. For more information, see [Create a liquidity pool](create-pool.mdx).

## Create a farm

1. Go to [Katana](https://app.roninchain.com/liquidity) and connect your whitelisted Ronin address for farm creation. This address can be the same as the one you used for pool creation, or a different one.
1. On the **Liquidity pool** page, select the pool you want to create a farm for, then click **Incentivize a pool**.
<img src={katanaIncentivizePool} alt="Incentivize a pool" width="800" />
![Incentivize a pool](../assets/katana-incentivize-pool.png)
2. In the **Incentivize a pool** section, configure the farm rewards:
* Set the start and end dates for reward distribution. The start date must be at least 7 days in the future.
* Select the token you want to distribute as a reward, and enter the amount. You may need to approve the spending cap for the token in your Ronin Wallet.
<img src={katanaConfigureFarmRewards} alt="Configure farm rewards" width="800" />
![Configure farm rewards](../assets/katana-configure-farm-rewards.png)
3. Click **Incentivize pool** to finish configuring your farm.
<img src={katanaConfirmPoolIncentive} alt="Confirm incentives" width="800" />
![Confirm pool incentive](../assets/katana-confirm-pool-incentive.png)
4. Click **Incentivise pool & Supply**, then confirm the transaction in your Ronin Wallet.
<img src={katanaIncentivizeSupply} alt="Supply liquidity for farm rewards" width="800" />
![Supply liquidity for farm rewards](../assets/katana-incentivize-supply.png)

Your farm is now created and scheduled for publishing on the start date. As long as the farm is in a scheduled state, only you can see it. On the start date, the farm becomes visible to everyone.

<img src={katanaIncentivizePoolSuccess} alt="Successful farm creation" width="800" />
![Successful farm creation](../assets/katana-incentivize-pool-success.png)

Click **View farm details** to see the farm details and if you need to, edit the duration or the reward amount of the farm before it's published.

Expand All @@ -60,17 +60,18 @@ Before your farm is published, you can change the initial reward amount and adju
1. Go to [Katana](https://app.roninchain.com/liquidity) and connect your whitelisted Ronin address for farm creation.
2. On the **Liquidity pool** page, select the scheduled farm that you want to edit, then click **Incentivize a pool**.
3. In the **Edit pool incentives** section, modify the farm duration or reward amount. Then, click **Confirm changes**.
<img src={katanaEditScheduledFarm} alt="Edit a scheduled farm" width="800" />
![Edit a scheduled farm](../assets/katana-edit-scheduled-farm.png)
4. Review the amount of tokens you need to top up or receive due to the changes, then press **Confirm**, and then confirm the transaction in your Ronin Wallet.
<img src={katanaEditScheduledFarmConfirm} alt="Confirm farm edit" width="800" />
![Confirm farm edit](../assets/katana-edit-scheduled-farm-confirm.png)

## Edit a published farm

After the farm is published, you can extend the reward distribution period or end it earlier. If you decide to extend the farm, the system will calculate the amount of rewards you need to pay on top of the initial rewards. If you want to end the farm earlier, the system will issue a refund for the remaining rewards.
After publishing your farm, you can extend its reward distribution period or end it earlier. If you decide to extend the farm, the system will calculate the amount of rewards you need to pay on top of the initial rewards. If you want to end the farm earlier, the system will issue a refund for the remaining rewards.

1. Go to [Katana](https://app.roninchain.com/liquidity) and connect your whitelisted Ronin address for farm creation.
2. On the **Liquidity pool** page, select the published farm that you want to edit, then click **Incentivize a pool**.
3. In the **Edit pool incentives** section, edit the end date. The reward amount will be recalculated automatically. Then, click **Confirm changes**.
<img src={katanaEditPublishedFarm} alt="Edit a published farm" width="800" />
3. In the **Edit pool incentives** section, edit the end date. Then, click **Confirm changes**.
![Edit a published farm](../assets/katana-edit-published-farm.png)
4. Click **Confirm changes**, review the details, then confirm the transaction in your Ronin Wallet.
<img src={katanaEditPublishedFarmConfirm} alt="Confirm farm edit" width="800" />
![Confirm farm edit](../assets/katana-edit-published-farm-confirm.png)

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Create new liquidity pools and contribute to existing pools on Katana to earn swap fees.
description: Create new liquidity pools on Katana to earn trading fees from transactions.
slug: /apps/katana/pool
title: Create a liquidity pool
---
Expand All @@ -8,14 +8,6 @@ title: Create a liquidity pool

You can create your own liquidity pools (LP) on Katana, contribute your liquidity to existing pools, and earn trading fees from the resulting transactions. This guide explains how to create a new pool, add liquidity to an existing pool, and remove liquidity from a pool.

:::info
If you're a token creator, you can launch your own ERC20 token on Katana and create a liquidity pool with it. This is a unique opportunity to bootstrap liquidity for your tokens and incentivize trading. By creating a pool, you provide a platform for users to trade your token with other tokens, increasing its utility and value.

During an initial whitelisting period, only you as the owner of the Ronin address that deployed the ERC20 token can create liquidity pools with your token. After the whitelisting period ends, users can contribute liquidity to your pool or create their own pools with your token.

After creating a liquidity pool, you can [create a farm](create-farm.mdx) to encourage users to contribute liquidity to your pool.
:::

When creating a new pool, you choose two tokens to pair together. These tokens can be any ERC20 tokens, including ["main" and "seed" tokens](../overview.mdx#trade-main-and-seed-tokens). The system deposits your tokens into a smart contract, effectively increasing the pool's liquidity.

For example, if you decide to contribute to the AXS-RON pool, you need to
Expand All @@ -28,12 +20,18 @@ These tokens not only signify your stake but also entitle you to a portion
of the trading fees generated by the pool's transactions, directly
proportional to your contribution. These fees are added to pool and accrue in real-time. You can claim them by withdrawing your liquidity.

You can also stake your LP tokens to earn farm rewards. For more information, see [Farm](farm.mdx).

Be aware that earning a profit through providing liquidity isn't guaranteed.
You may face what's known as _impermanent loss_, a risk that arises from
fluctuations in the value of the deposited tokens.

:::info Token creators
If you're a token creator, you can launch your own ERC20 token on Katana and create a liquidity pool with it. This is a unique opportunity to bootstrap liquidity for your tokens and incentivize trading. By creating a pool, you provide a platform for users to trade your token with other tokens, increasing its utility and value.

During an initial whitelisting period, only you as the owner of the Ronin address that deployed the ERC20 token can create liquidity pools with your token. After the whitelisting period ends, users can contribute liquidity to your pool or create their own pools with your token.

After creating a liquidity pool, you can [create a farm](create-farm.mdx) to encourage users to contribute liquidity to your pool.
:::

## Prerequisites

* Only _whitelisted_ Ronin addresses can create liquidity pools during a token whitelisting period. To apply, submit your Ronin address to Sky Mavis. This address will be linked to your token contract after you deploy it.
Expand Down Expand Up @@ -97,85 +95,14 @@ As a token creator, you can also create a farm for your token. For more informat

## Edit a pool

You can change the amount of tokens in a pool as long as the pool is in a scheduled state.
You can change the initial amount of tokens in a pool as long as the pool is in a scheduled state.

1. On the **Liquidity pool** page, select the pool you want to edit.
2. Add or remove tokens from the pool. For more information, see [Add liquidity to a pool](#add-liquidity-to-a-pool) and [Remove liquidity from a pool](#remove-liquidity-from-a-pool).
2. Add or remove tokens from the pool. For more information, see [Add liquidity to a pool](add-liquidity.mdx).
3. Click **Confirm**, review the details, then confirm the transaction in your Ronin Wallet.

## Add liquidity to a pool

You can contribute liquidity to existing pools to earn fees from the pool's transactions.

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.

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

4. 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.

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

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

Your transaction is now submitted to the blockchain. When it completes, Katana displays a confirmation pop-up. Close it or click **View on explorer** to see the detailed information about the transaction.

![Successful liquidity addition](../assets/katana-pool-add-success.png)

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

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

![My position](../assets/katana-pool-add-position.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.

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

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.

1. Open the **Liquidity pool** page, then select the pool from which you want to withdraw liquidity.

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

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)

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

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

Your transaction is now submitted to the blockchain. When it completes, Katana displays a confirmation pop-up. Close it or click **View on explorer** to see the detailed information about the transaction.

![Successful liquidity removal](../assets/katana-pool-remove-success.png)

The **My position** panel is now updated with your latest position after removing liquidity:

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

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.
* [Add liquidity to a pool](add-liquidity.mdx)
* [Create a farm](create-farm.mdx)
* [Farm tokens](farm-tokens.mdx)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ When you provide liquidity to a pool on Katana, you receive liquidity pool (LP)

## Prerequisites

To farm tokens on Katana, you need to have LP tokens that you can stake. To acquire LP tokens, add your liquidity to a pool as described in the [Pool](pool.mdx#add-liquidity-to-a-pool) guide.
To farm tokens on Katana, you need to have LP tokens that you can stake. To acquire LP tokens, add your liquidity to a pool. For more information, see [Add liquidity to a pool](add-liquidity.mdx).

## Start farming

Expand Down
File renamed without changes.
8 changes: 5 additions & 3 deletions docs/apps/katana/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ Katana ([app.roninchain.com/swap](https://app.roninchain.com/swap)) is a decentr

## Key features

* [Swap](./guides/swap.mdx) between pairs of various ERC20 tokens, including wrapping RON to wRON to make offers on Mavis Market and participate in Ronin token launches, and swapping between "main" and "seed" tokens.
* [Create liquidity pools](./guides/pool.mdx) with two tokens, provide liquidity to existing pools, and earn trading fees.
* [Stake](./guides/farm.mdx) your liquidity pool (LP) tokens in a farm to earn rewards in the form of another ERC20 token.
* [Swap](./guides/swap-tokens.mdx) between pairs of various ERC20 tokens, including wrapping RON to wRON to make offers on Mavis Market and participate in Ronin token launches, and swapping between "main" and "seed" tokens.
* [Create liquidity pools](./guides/create-pool.mdx) with two tokens to earn trading fees.
* [Add liquidity](./guides/add-liquidity.mdx) to existing pools to earn fees from transactions.
* [Create farms](./guides/farm-tokens.mdx) to encourage users to contribute liquidity to your pool.
* [Stake](./guides/farm-tokens.mdx) your liquidity pool (LP) tokens in a farm to earn rewards in the form of another ERC20 token.

Some features are only available on the Katana web app, while others are available on the Ronin Wallet mobile app and browser extension:

Expand Down
Loading

0 comments on commit 05c0e9e

Please sign in to comment.