-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add docs for APR calculation (#232)
* feat: add staking APR * feat: try making equations appear * feat: change to image * feat: fix explanation
- Loading branch information
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
sidebar_position: 11 | ||
--- | ||
|
||
# APR Calculation | ||
|
||
## Introduction | ||
APR for each pools is a metric that indicates the expected annualized return on investment for liquidity providers. APRs are calculated differently for CL pools and normal pools due to their distinct operational mechanisms. | ||
|
||
## Concentrated Liquidity Pools | ||
|
||
### Calculation: | ||
- **APR for CL Pools**: | ||
![](../../assets/apr-cl.png) | ||
Where: | ||
- **Spread Reward per Unit Liquidity**: This is the reward earned from the spread for providing liquidity, expressed per unit. | ||
- **Incentive Reward per Unit Liquidity**: This is any additional incentive reward for providing liquidity, also expressed per unit. | ||
- **Base Price**: The standardized value of one unit of liquidity in the pool, used to convert the reward values into a comparable base. | ||
- **Seconds in a Year**: Represents the total number of seconds in a year, used for annualizing the return. It's calculated as \( 365.25 \times 24 \times 60 \times 60 \) to account for leap years. | ||
- **Calculation Time Duration**: The duration in seconds over which the rewards were calculated | ||
|
||
## CFMM Liquidity Pools(Balancer pools, Stableswap Pools) | ||
|
||
1. **Standard APR Calculation** (for 1 day, 7 days, and 14 days): | ||
- The APR is calculated for each time frame using the formula: | ||
![](../../assets/apr-normal.png) | ||
- Where: | ||
- `Distribured Amount_timeframe` is the sum of distributed rewards for the time frame (1 day, 7 days, or 14 days). | ||
- `Exponent` is a factor related to the coin denomination. | ||
- `Liquidity` is the total liquidity in USD for the pool, adjusted by the percentage bonded (if applicable). | ||
- `Coin Price` is the current price of the coin. | ||
- The multiplier \(36500\) annualizes the rate. | ||
|
||
2. **Superfluid APR Calculation** (if applicable): | ||
- The Superfluid APR is calculated additionally for pools where it's relevant, using the formula: | ||
![](../../assets/apr-superfluid.png) | ||
- Where: | ||
- \(\text{Staking APR}\) is the APR from staking. | ||
- `Superfluid Percentage` is the percentage of the pool that is superfluid. | ||
- `Superfluid Risk Factor` is a risk adjustment factor. | ||
- `APR_14d` is the 14-day APR calculated as above. |
275f998
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs – ./
docs-osmo-labs.vercel.app
docs-beta-olive.vercel.app
docs-git-main-osmo-labs.vercel.app
docs.osmosis.zone