Mathematical Formulas Reference

This appendix provides a comprehensive reference of all mathematical formulas used throughout the use.com whitepaper. Formulas are organized by category for easy reference.

Trading & Order Book

Order Matching

Price-Time Priority: Priority=(Price_Level,Timestamp)Priority = (Price\_Level, Timestamp)

Orders at better prices execute first; at same price, earlier orders execute first.

Order Book Depth: Depth=i=1nVolumei at price level PiDepth = \sum_{i=1}^{n} Volume_i \text{ at price level } P_i

Mid Price: Mid_Price=Best_Bid+Best_Ask2Mid\_Price = \frac{Best\_Bid + Best\_Ask}{2}

Spread: Spread=Best_AskBest_BidSpread = Best\_Ask - Best\_Bid

Spread Percentage: Spread_%=Best_AskBest_BidMid_Price×100%Spread\_\% = \frac{Best\_Ask - Best\_Bid}{Mid\_Price} \times 100\%

Order Execution

Market Order Fill Price (with slippage): Fill_Price=i=1nVolumei×PriceiVolumeiFill\_Price = \sum_{i=1}^{n} \frac{Volume_i \times Price_i}{\sum Volume_i}

Limit Order Execution:

Execute=1(PricemarketPricelimit, buy)Execute=1(PricemarketPricelimit, sell)Execute=0otherwise\begin{aligned} Execute &= 1 && (Price_{market} \le Price_{limit},\ \text{buy}) \\ Execute &= 1 && (Price_{market} \ge Price_{limit},\ \text{sell}) \\ Execute &= 0 && \text{otherwise} \end{aligned}

Time-Weighted Average Price (TWAP): TWAP=i=1nPriceinTWAP = \frac{\sum_{i=1}^{n} Price_i}{n}

Volume-Weighted Average Price (VWAP): VWAP=i=1n(Pricei×Volumei)i=1nVolumeiVWAP = \frac{\sum_{i=1}^{n} (Price_i \times Volume_i)}{\sum_{i=1}^{n} Volume_i}

Risk Management

Margin & Leverage

Initial Margin: Initial_Margin=Position_ValueLeverageInitial\_Margin = \frac{Position\_Value}{Leverage}

Maintenance Margin: Maintenance_Margin=Position_Value×Maintenance_RateMaintenance\_Margin = Position\_Value \times Maintenance\_Rate

Available Margin: Available_Margin=EquityUsed_MarginAvailable\_Margin = Equity - Used\_Margin

Margin Level: Margin_Level=EquityUsed_Margin×100%Margin\_Level = \frac{Equity}{Used\_Margin} \times 100\%

Maximum Position Size: Max_Position=Available_Balance×LeverageMax\_Position = Available\_Balance \times Leverage

Liquidation

Liquidation Price (Long): Liquidation_Price=Entry_Price×LeverageMaintenance_Rate×LeverageLeverageLiquidation\_Price = Entry\_Price \times \frac{Leverage - Maintenance\_Rate \times Leverage}{Leverage}

Simplified: Liquidation_Pricelong=Entry_Price×(11Leverage+Maintenance_Rate)Liquidation\_Price_{long} = Entry\_Price \times (1 - \frac{1}{Leverage} + Maintenance\_Rate)

Liquidation Price (Short): Liquidation_Priceshort=Entry_Price×(1+1LeverageMaintenance_Rate)Liquidation\_Price_{short} = Entry\_Price \times (1 + \frac{1}{Leverage} - Maintenance\_Rate)

Example (Long position):

  • Entry: $50,000

  • Leverage: 10×

  • Maintenance: 0.5%

  • Liquidation: $50,000 × (1 - 0.1 + 0.005) = $45,250

Distance to Liquidation: Distance=Current_PriceLiquidation_PriceCurrent_Price×100%Distance = \frac{|Current\_Price - Liquidation\_Price|}{Current\_Price} \times 100\%

Profit & Loss

Unrealized PnL (Long): PnLlong=(Current_PriceEntry_Price)×Position_SizePnL_{long} = (Current\_Price - Entry\_Price) \times Position\_Size

Unrealized PnL (Short): PnLshort=(Entry_PriceCurrent_Price)×Position_SizePnL_{short} = (Entry\_Price - Current\_Price) \times Position\_Size

PnL Percentage: PnL_%=PnLInitial_Margin×100%PnL\_\% = \frac{PnL}{Initial\_Margin} \times 100\%

Return on Equity (ROE): ROE=PnLEquity×100%ROE = \frac{PnL}{Equity} \times 100\%

Risk Metrics

Value at Risk (VaR): VaR=Position_Value×Volatility×ZscoreVaR = Position\_Value \times Volatility \times Z_{score}

Where Z-score for 95% confidence = 1.645

Portfolio Risk: Portfolio_Risk=i=1nj=1nwiwjσiσjρijPortfolio\_Risk = \sqrt{\sum_{i=1}^{n} \sum_{j=1}^{n} w_i w_j \sigma_i \sigma_j \rho_{ij}}

Sharpe Ratio: Sharpe=ReturnRisk_Free_RateVolatilitySharpe = \frac{Return - Risk\_Free\_Rate}{Volatility}

Maximum Drawdown: Max_Drawdown=Trough_ValuePeak_ValuePeak_Value×100%Max\_Drawdown = \frac{Trough\_Value - Peak\_Value}{Peak\_Value} \times 100\%

Fee Calculations

Trading Fees

Base Trading Fee: Fee=Trade_Volume×Fee_RateFee = Trade\_Volume \times Fee\_Rate

Fee with Volume Discount: Fee=Trade_Volume×Base_Rate×(1Volume_Discount)Fee = Trade\_Volume \times Base\_Rate \times (1 - Volume\_Discount)

Fee with Token Discount: Fee=Trade_Volume×Base_Rate×(1Volume_Discount)×(1Token_Discount)Fee = Trade\_Volume \times Base\_Rate \times (1 - Volume\_Discount) \times (1 - Token\_Discount)

Effective Fee Rate: Effective_Rate=Base_Rate×(1Volume_Discount)×(1Token_Discount)Effective\_Rate = Base\_Rate \times (1 - Volume\_Discount) \times (1 - Token\_Discount)

Example:

  • Volume: $1M

  • Base rate: 0.10%

  • Volume discount: 20%

  • Token discount: 25%

  • Effective rate: 0.10% × 0.80 × 0.75 = 0.06%

  • Fee: $1M × 0.06% = $600

Maker-Taker Model

Maker Rebate: Rebate=Trade_Volume×Maker_Rebate_RateRebate = Trade\_Volume \times Maker\_Rebate\_Rate

Net Fee (Maker): Net_Fee=Trade_Volume×(Maker_FeeMaker_Rebate)Net\_Fee = Trade\_Volume \times (Maker\_Fee - Maker\_Rebate)

Net Fee (Taker): Net_Fee=Trade_Volume×Taker_FeeNet\_Fee = Trade\_Volume \times Taker\_Fee

Fee Tiers

Volume Tier Calculation: Tier=f(30_Day_Volume)Tier = f(30\_Day\_Volume)

Fee Savings: Savings=(Base_FeeDiscounted_Fee)×Annual_VolumeSavings = (Base\_Fee - Discounted\_Fee) \times Annual\_Volume

Tokenomics

Token Supply

Circulating Supply: Circulating=Total_SupplyLocked_TokensBurned_TokensCirculating = Total\_Supply - Locked\_Tokens - Burned\_Tokens

Inflation Rate: Inflation=New_TokensExisting_Supply×100%Inflation = \frac{New\_Tokens}{Existing\_Supply} \times 100\%

Deflation Rate (with burns): Deflation=Burned_TokensTotal_Supply×100%Deflation = \frac{Burned\_Tokens}{Total\_Supply} \times 100\%

Token Valuation

Market Capitalization: Market_Cap=Circulating_Supply×Token_PriceMarket\_Cap = Circulating\_Supply \times Token\_Price

Fully Diluted Valuation (FDV): FDV=Total_Supply×Token_PriceFDV = Total\_Supply \times Token\_Price

Price-to-Sales Ratio: P/S=Market_CapAnnual_RevenueP/S = \frac{Market\_Cap}{Annual\_Revenue}

Token Velocity: Velocity=Transaction_VolumeAverage_Token_HoldingsVelocity = \frac{Transaction\_Volume}{Average\_Token\_Holdings}

Vesting

Linear Vesting: Unlocked=Total_Allocation×Time_ElapsedVesting_PeriodUnlocked = Total\_Allocation \times \frac{Time\_Elapsed}{Vesting\_Period}

Cliff Vesting:

Unlocked={0t<TcliffAtotaltTcliffTvesttTcliffUnlocked= \begin{cases} 0 & t < T_{cliff} \\ A_{total}\,\dfrac{t-T_{cliff}}{T_{vest}} & t \ge T_{cliff} \end{cases}

Vesting Schedule: Monthly_Unlock=Total_AllocationVesting_MonthsMonthly\_Unlock = \frac{Total\_Allocation}{Vesting\_Months}

Buyback & Burn

Quarterly Burn Amount: Burn_Amount=Quarterly_Profit×Burn_PercentageBurn\_Amount = Quarterly\_Profit \times Burn\_Percentage

Tokens Burned: Tokens_Burned=Burn_BudgetToken_PriceTokens\_Burned = \frac{Burn\_Budget}{Token\_Price}

Annual Burn Rate: Burn_Rate=Quarterly_BurnsTotal_Supply×100%Burn\_Rate = \frac{\sum Quarterly\_Burns}{Total\_Supply} \times 100\%

Supply After Burns: Supplyt=Supply0×(1Burn_Rate)tSupply_t = Supply_0 \times (1 - Burn\_Rate)^t

Price Impact (theoretical): Price_New=Price_Old×Supply_OldSupply_NewPrice\_New = Price\_Old \times \frac{Supply\_Old}{Supply\_New}

Staking Rewards

Annual Percentage Yield (APY): APY=(1+rn)n1APY = \left(1 + \frac{r}{n}\right)^n - 1

Where r = nominal rate, n = compounding periods

Staking Rewards: Rewards=Staked_Amount×APY×Time_Staked365Rewards = Staked\_Amount \times APY \times \frac{Time\_Staked}{365}

Effective Staking Rate: Effective_Rate=Base_APY×(1+Loyalty_Bonus)×(1+Volume_Bonus)Effective\_Rate = Base\_APY \times (1 + Loyalty\_Bonus) \times (1 + Volume\_Bonus)

Market Making

Spread Management

Optimal Spread: Spread=γσ2λSpread^* = \gamma \sigma \sqrt{\frac{2}{\lambda}}

Where:

  • γ = risk aversion

  • σ = volatility

  • λ = order arrival rate

Bid-Ask Quotes: Bid=Mid_PriceSpread2Bid = Mid\_Price - \frac{Spread}{2} Ask=Mid_Price+Spread2Ask = Mid\_Price + \frac{Spread}{2}

Inventory Management

Inventory Risk: Risk=Position×Volatility×TimeRisk = Position \times Volatility \times \sqrt{Time}

Optimal Inventory: q=δγσ2q^* = -\frac{\delta}{\gamma \sigma^2}

Where:

  • δ = drift

  • γ = risk aversion

  • σ = volatility

Inventory Skew: Skew=Current_InventoryTarget_InventoryMax_InventorySkew = \frac{Current\_Inventory - Target\_Inventory}{Max\_Inventory}

Pricing

Mid-Price Adjustment: Midadjusted=Midmarket+α×Inventory_SkewMid_{adjusted} = Mid_{market} + \alpha \times Inventory\_Skew

Quote Adjustment: Bidadjusted=Bidβ×InventorylongBid_{adjusted} = Bid - \beta \times Inventory_{long} Askadjusted=Ask+β×InventoryshortAsk_{adjusted} = Ask + \beta \times Inventory_{short}

Performance Metrics

Latency

Average Latency: Latencyavg=i=1nLatencyinLatency_{avg} = \frac{\sum_{i=1}^{n} Latency_i}{n}

Percentile Latency (e.g., P99): P99=99th percentile of latency distributionP99 = \text{99th percentile of latency distribution}

Throughput: Throughput=Total_TransactionsTime_PeriodThroughput = \frac{Total\_Transactions}{Time\_Period}

Transactions Per Second (TPS): TPS=TransactionsSecondsTPS = \frac{Transactions}{Seconds}

System Performance

Uptime Percentage: Uptime=Available_TimeTotal_Time×100%Uptime = \frac{Available\_Time}{Total\_Time} \times 100\%

Error Rate: Error_Rate=Failed_RequestsTotal_Requests×100%Error\_Rate = \frac{Failed\_Requests}{Total\_Requests} \times 100\%

Success Rate: Success_Rate=100%Error_RateSuccess\_Rate = 100\% - Error\_Rate

Financial Metrics

Revenue Metrics

Average Revenue Per User (ARPU): ARPU=Total_RevenueActive_UsersARPU = \frac{Total\_Revenue}{Active\_Users}

Customer Lifetime Value (LTV): LTV=ARPU×Average_Lifetime×Gross_MarginLTV = ARPU \times Average\_Lifetime \times Gross\_Margin

Customer Acquisition Cost (CAC): CAC=Marketing_SpendNew_CustomersCAC = \frac{Marketing\_Spend}{New\_Customers}

LTV/CAC Ratio: LTV/CAC=LTVCACLTV/CAC = \frac{LTV}{CAC}

Target: >3:1

Payback Period: Payback=CACMonthly_ARPUPayback = \frac{CAC}{Monthly\_ARPU}

Profitability Metrics

Gross Margin: Gross_Margin=RevenueCOGSRevenue×100%Gross\_Margin = \frac{Revenue - COGS}{Revenue} \times 100\%

EBITDA: EBITDA=RevenueOperating_ExpensesEBITDA = Revenue - Operating\_Expenses

EBITDA Margin: EBITDA_Margin=EBITDARevenue×100%EBITDA\_Margin = \frac{EBITDA}{Revenue} \times 100\%

Net Profit Margin: Net_Margin=Net_IncomeRevenue×100%Net\_Margin = \frac{Net\_Income}{Revenue} \times 100\%

Return on Equity (ROE): ROE=Net_IncomeShareholders_Equity×100%ROE = \frac{Net\_Income}{Shareholders\_Equity} \times 100\%

Return on Assets (ROA): ROA=Net_IncomeTotal_Assets×100%ROA = \frac{Net\_Income}{Total\_Assets} \times 100\%

Growth Metrics

Year-over-Year Growth: YoY_Growth=ValuecurrentValuepreviousValueprevious×100%YoY\_Growth = \frac{Value_{current} - Value_{previous}}{Value_{previous}} \times 100\%

Compound Annual Growth Rate (CAGR): CAGR=(Ending_ValueBeginning_Value)1Years1CAGR = \left(\frac{Ending\_Value}{Beginning\_Value}\right)^{\frac{1}{Years}} - 1

Month-over-Month Growth: MoM_Growth=ValuecurrentValuepreviousValueprevious×100%MoM\_Growth = \frac{Value_{current} - Value_{previous}}{Value_{previous}} \times 100\%

Derivatives

Perpetual Futures

Funding Rate: Funding_Rate=Mark_PriceIndex_PriceIndex_PriceFunding\_Rate = \frac{Mark\_Price - Index\_Price}{Index\_Price}

Funding Payment: Payment=Position_Size×Funding_RatePayment = Position\_Size \times Funding\_Rate

Mark Price: Mark_Price=Index_Price×(1+Funding_Basis)Mark\_Price = Index\_Price \times (1 + Funding\_Basis)

Liquidation Price (Perpetual Long): Liq_Price=Entry_Price×LeverageMaintenance_Margin×LeverageFundingLeverageLiq\_Price = Entry\_Price \times \frac{Leverage - Maintenance\_Margin \times Leverage - Funding}{Leverage}

Options

Black-Scholes Call Option: C=S0N(d1)KerTN(d2)C = S_0 N(d_1) - K e^{-rT} N(d_2)

Where: d1=ln(S0/K)+(r+σ2/2)TσTd_1 = \frac{\ln(S_0/K) + (r + \sigma^2/2)T}{\sigma\sqrt{T}} d2=d1σTd_2 = d_1 - \sigma\sqrt{T}

Black-Scholes Put Option: P=KerTN(d2)S0N(d1)P = K e^{-rT} N(-d_2) - S_0 N(-d_1)

Option Greeks:

Delta: Δ=VS\Delta = \frac{\partial V}{\partial S}

Gamma: Γ=2VS2\Gamma = \frac{\partial^2 V}{\partial S^2}

Theta: Θ=Vt\Theta = \frac{\partial V}{\partial t}

Vega: V=Vσ\mathcal{V} = \frac{\partial V}{\partial \sigma}

Rho: ρ=Vr\rho = \frac{\partial V}{\partial r}

Implied Volatility

Implied Volatility (from option price): σimplied=f1(Option_Price,S,K,r,T)\sigma_{implied} = f^{-1}(Option\_Price, S, K, r, T)

Solved numerically using Newton-Raphson method.

Statistical Formulas

Volatility

Historical Volatility: σ=i=1n(RiRˉ)2n1\sigma = \sqrt{\frac{\sum_{i=1}^{n}(R_i - \bar{R})^2}{n-1}}

Annualized Volatility: σannual=σdaily×252\sigma_{annual} = \sigma_{daily} \times \sqrt{252}

Exponentially Weighted Moving Average (EWMA): σt2=λσt12+(1λ)rt12\sigma_t^2 = \lambda \sigma_{t-1}^2 + (1-\lambda) r_{t-1}^2

Correlation

Correlation Coefficient: ρxy=(xixˉ)(yiyˉ)(xixˉ)2(yiyˉ)2\rho_{xy} = \frac{\sum(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum(x_i - \bar{x})^2 \sum(y_i - \bar{y})^2}}

Covariance: Cov(X,Y)=(xixˉ)(yiyˉ)n1Cov(X,Y) = \frac{\sum(x_i - \bar{x})(y_i - \bar{y})}{n-1}

Moving Averages

Simple Moving Average (SMA): SMAn=i=1nPriceinSMA_n = \frac{\sum_{i=1}^{n} Price_i}{n}

Exponential Moving Average (EMA): EMAt=Pricet×k+EMAt1×(1k)EMA_t = Price_t \times k + EMA_{t-1} \times (1-k)

Where $k = \frac{2}{n+1}$

Liquidity Metrics

Order Book Liquidity

Bid-Ask Spread: Spread=AskBidMid_Price×100%Spread = \frac{Ask - Bid}{Mid\_Price} \times 100\%

Market Depth: Depth±x%=Volume within ±x% of mid priceDepth_{\pm x\%} = \sum Volume \text{ within } \pm x\% \text{ of mid price}

Liquidity Score: Liquidity=VolumeSpread×VolatilityLiquidity = \frac{Volume}{Spread \times Volatility}

Slippage

Expected Slippage: Slippage=Execution_PriceExpected_PriceExpected_Price×100%Slippage = \frac{Execution\_Price - Expected\_Price}{Expected\_Price} \times 100\%

Slippage Cost: Cost=Order_Size×Slippage_%Cost = Order\_Size \times Slippage\_\%

Conversion Formulas

Interest Rate Conversions

Daily to Annual: Annual_Rate=(1+Daily_Rate)3651Annual\_Rate = (1 + Daily\_Rate)^{365} - 1

Annual to Daily: Daily_Rate=(1+Annual_Rate)1/3651Daily\_Rate = (1 + Annual\_Rate)^{1/365} - 1

APR to APY: APY=(1+APRn)n1APY = \left(1 + \frac{APR}{n}\right)^n - 1

Where n = compounding periods per year

Price Conversions

Basis Points to Percentage: Percentage=Basis_Points10,000Percentage = \frac{Basis\_Points}{10,000}

Percentage to Basis Points: Basis_Points=Percentage×10,000Basis\_Points = Percentage \times 10,000

Conclusion

This comprehensive formula reference provides the mathematical foundation for all calculations used throughout the use.com platform. These formulas ensure consistent, accurate, and transparent operations across trading, risk management, tokenomics, and financial reporting.


Previous: ← FAQ Next: Back to Table of Contents →arrow-up-right

Related Sections:

Last updated