Maths Behind Potions
How are Metrics, Ratios, Actions & APRs are calculated
The Potions ecosystem is a sophisticated, yield-generating environment designed to leverage volatility and reward participants. It introduces a range of mechanisms - metrics and ratios, action-based calculations, and APRs - that work together to create transparency, sustain ecosystem activity, and drive user engagement.
Participants in the Potions ecosystem interact with original assets and derivative assets through actions like wrapping, unwrapping, and buy/sell trades. These interactions are supported by clear calculations, predictable fee structures, and robust incentives to ensure fair value distribution and ecosystem sustainability.
By understanding the key components of Potions - metrics, ratios, actions, and APRs - users can confidently engage with the ecosystem to generate yield, participate in arbitrage, and contribute to the system's long-term stability. The following sections outline these components in detail.
Metrics & Ratios
The Potions ecosystem relies on several key metrics and ratios to ensure transparency, evaluate performance, and create opportunities for users. These include:
Backing Ratio: Represents the amount of original assets backing each derivative asset;
Fair & Potion Prices: Metrics to determine the value of original and derivative assets and identify arbitrage opportunities;
Assets & Weighting: Defines the composition and proportions of assets within each Potion.
These metrics form the foundation for understanding and engaging with the Potions ecosystem.
Backing Ratio
The Backing Ratio (BR) represents the amount of original assets (e.g., YEL) backing each derivative asset (e.g., lYEL). This ratio is influenced by the Burn Fee, a portion of the derivative asset burned during each wrap or unwrap transaction, driving volatility and ensuring sustainability within the ecosystem.
How it works:
Stable Collateral: The total amount of original assets (e.g., YEL) backing the potion remains constant.
Decreasing Derivatives: Over time, the number of derivative assets (e.g., lYEL) decreases due to the burn mechanism.
Increasing Backing: Each derivative token represents a larger share of the original asset as the backing ratio increases.
The Backing Ratio is calculated using the formula:
BR = Amount of Original Assets / Amount of Derivative Assets
Example: If there are 1,100,000 YEL backing 1,000,000 lYEL, the Backing Ratio is: BR = 1,100,000 / 1,000,000 = 1.1 This means each lYEL is backed by 1.1 YEL.
Derivative asset holders can convert their tokens back into the original asset based on the current backing ratio, ensuring fair value redemption at any time. As the number of derivative tokens decreases relative to the original asset, the backing ratio increases. This means each lYEL becomes progressively more valuable in terms of the YEL it represents. By simply holding derivative assets, users passively increase their stake in the original asset without requiring active management or additional investments.
Fair & Potion Prices
Fair price is the price of udnerlyinging potion asset (e.g. YEL). It is derived from the current market price of the original asset (e.g., YEL) in its original liquidity pair (e.g., YEL/USDC). Is important metric for detecting arbitrage opportunities together with potion price.
Potion Price reflect the price of the wrapped derivative asset (e.g. lYEL). It is calculated by multiplying the price of the original asset by the Backing Ratio. Formula:
Potion Price = Original Asset Price × Backing Ratio
Example Calculation
Original Asset Price: YEL is currently priced at $0.3 in the YEL/USDC liquidity pool.
Backing Ratio: The backing ratio for lYEL is 1.05.
Potion Price = $0.3 × 1.05 = $0.315
The fair & potion price mechanisms ensure that:
Derivative assets (e.g., lYEL) are accurately valued based on their proportion of the underlying original asset;
Users can confidently engage in trading, arbitrage, or liquidity provisioning, knowing the relative value of their assets;
Arbitrage opportunities are created when the market price of the derivative asset deviates from its fair price, enabling users to profit and maintain ecosystem balance.
Assets & Weighting in Potion
Potions can consist of one asset or multiple assets bundled together, creating unique opportunities for liquidity, volatility, and arbitrage. The assets within a Potion and their respective weightings play a critical role in defining its behavior, including price dynamics, liquidity provision, and arbitrage potential.
Assets in Potion: The type of asset(s) included in the Potion defines its structure. Examples:
Single-Asset Potion: YEL → lYEL.
Multi-Asset Potion (future feature): YEL & PEPE → lYELPEPE.
Weighting of Assets: Represents the proportion of each asset within the Potion. Examples:
Single-Asset Potion: lYEL = 100% YEL.
Multi-Asset Potion: lYELPEPE = 60% YEL + 40% PEPE.
Note: Potions are currently crafted with one asset, allowing for simplicity and efficiency in liquidity provision and yield generation. Multi-Brew Potions are coming in Q1 2025, these Potions will support multiple assets, unlocking advanced liquidity and arbitrage opportunities for users.
Actions Calculations
Within the Potions Ecosystem, several actions follow specific maths formulas to support volatility mining and respective yield generation. These actions include wrap, unwrap, and buy/sell. Each action has its own formula to ensure transparency and value alignment.
Wrap
The wrap action converts original assets (e.g., YEL) into derivative assets (e.g., lYEL). The end result of this process determines the amount of derivative tokens minted after accounting for fees and the current Backing Ratio.
The formula to calculate the resulting derivative assets is:
Wrap Derivative Asset Amount = (Original Assets Deposit Amount - Wrap Fees) / Backing Ratio
Wrap fees are deducted from the deposited original assets and consist of multiple components:
Wrap Fees = CBR Burn Fees + LP APR Fees + YEL Burn Fees + Partner Fees + Admin Fees
Key Notes:
All fees are calculated based on the Original Assets Deposit Amount (e.g., YEL)
Some components of the fees might equal 0%, depending on the specific Potion configuration.
Example:
Original Assets Deposited: 100,000 YEL
Backing Ratio: 1.05
Wrap Fees:
CBR Burn Fees: 0.75%
LP APR Fees: 0.71%
YEL Burn Fees: 0.04%
Partner Fees: 0%
Admin Fees: 0%
Step 1: Calculate Total Fees Total Wrap Fees = 0.75% + 0.71% + 0.04% + 0% + 0% = 1.5%
Step 2: Calculate Net Original Assets After Fees Original Assets After Fees = 100,000 YEL × (100% - 1.5%) = 100,000 × 0.985 = 98,500 YEL
Step 3: Calculate Derivative Asset Amount Wrap Derivative Asset Amount = 98,500 YEL / 1.05 = 93,809.52 lYEL
Unwrap
The unwrap action converts derivative assets (e.g., lYEL) into original assets (e.g., YEL). The end result of this process determines the amount of original tokens provided after accounting for fees and the current Backing Ratio.
The formula to calculate the resulting original assets is:
UnWrap Original Asset Amount = (Derivative Assets Holdings Amount - Wrap Fees) * Backing Ratio
Wrap fees are deducted from the deposited original assets and consist of multiple components:
UnWrap Fees = CBR Burn Fees
Key Notes:
All fees are calculated based on the Derivative Assets Holding Amount (e.g., lYEL)
UnWrap fees include only CBR Burn Fees, excluding LP APR, YEL Burn, Partner and Admin Fees.
Example:
Derivative Assets Holdings: 100,000 lYEL
Backing Ratio: 1.05
UnWrap Fees:
CBR Burn Fees: 0.9%
Step 1: Calculate Total Fees Total Wrap Fees = 0.9%
Step 2: Calculate Net Original Assets After Fees Original Assets After Fees = 100,000 lYEL × (100% - 0.9%) = 100,000 × 0.991 = 99,100 lYEL
Step 3: Calculate Derivative Asset Amount Original Assets Unwrap Amount = 99,100 lYEL × 1.05 = 104,055 YEL
Buy/Sell
Buy and sell fees within the Potions ecosystem are specific to derivative assets (e.g., lYEL). These fees are embedded within the token logic of derivative assets and do not apply to original assets (e.g., YEL).
Fee Logic:
Derivative Asset to Derivative Asset:
Sell fees are applied and calculated based on the initial derivative asset (e.g., lYEL).
Original Asset to Derivative Asset:
Buy fees are applied and calculated based on the resulting derivative asset (e.g., lYEL).
Derivative Asset to Original Asset:
Sell fees are applied and calculated based on the initial derivative asset (e.g., lYEL).
Original Asset to Original Asset:
No fees are applied.
The formula to calculate the buy/sell fees is:
Buy/Sell Fees = LP APR Fees + YEL Burn Fees + Partner Fees + Admin Fees
Key Notes:
Buy/Sell fees include only LP APR, YEL Burn, Partner and Admin Fees, excluding CBR Burn Fees.
Example:
Scenario:
A user swaps 100,000 lYEL for lUSDC;
Exchange Rate: 1 lYEL = 0.03 lUSDC.
Liquidity is deep enough and 0% of DEX fees are taken.
Buy/Sell Fees:
LP APR Fees: 0.45%
YEL Burn Fees: 0.025%
Partner Fees: 0%
Admin Fees: 0.025%
Step 1: Calculate Total Fees
Total Buy/Sell Fees = 0.45% + 0.025% + 0% + 0.025% = 0.5%
Step 2: Calculate Net Amount After Fees
Net lYEL After Fees = 100,000 lYEL × (100% - 0.5%) Net lYEL After Fees = 100,000 × 0.995 = 99,500 lYEL
Step 3: Calculate Swap Sum
lUSDC to Receive = Net lYEL After Fees * Exchange Rate
lUSDC to Receive = 99,500 lYEL * 0.03 = 2,985 lUSDC
APRs
There are 2 types of APRs in the Potions: Holder APR for users who created a derivative assets (e.g. YEL -> lYEL) and LP APR for users who provided parallel liquidity (e.g. provided lYEL and USDC to lYEL/USDC Liquidity Pool and received slYEL).
Holder APR
Holder APR is generated passively through changes in the Backing Ratio of the Potion over time. As derivative tokens (e.g., lYEL) are burned during wrap and unwrap actions, the total supply of derivative assets decreases. This increases the Backing Ratio, meaning each derivative token represents a larger share of the original asset (e.g., YEL).
Therefore, by simply holding a derivative asset (e.g., lYEL), users earn APR without active management. Upon exit after reasonable time, users redeem a higher ratio of original assets compared to when they entered.
LP APR
LP APR is generated from multiple sources to incentivize users to provide parallel liquidity within the Potions ecosystem. Liquidity providers (e.g. holders of slYEL) benefit from the following streams:
DEX LP APR: APR derived from trading fees collected by DEXs where the liquidity pair resides;
Wrap LP APR Fees: Fees collected during wrap and unwrap actions are partially redistributed to liquidity providers. These actions generate constant inflows into the liquidity pool, further enhancing LP rewards;
Buy/Sell Fees on Swap Router: Trading fees applied to buy or sell transactions within the parallel liquidity pool. These fees is distributed to liquidity providers.
Last updated