Xave Finance
Xave Finance Socials
  • Introduction
  • General FAQs
  • Guides
    • How to Connect Your Wallet
    • How to Supply Liquidity
      • How to Add Liquidity to FXPools
      • How to Remove Liquidity from Xave Liquidity Pools
    • How to Use Xave Strategies
      • How to Deposit to xSGD Thetanuts Strategy
      • How to Withdraw from xSGD Thetanuts Strategy
    • How to Swap
    • How to Lend
    • How to Borrow
    • How to Repay
    • How to Withdraw
    • How to Vote for Xave's Gauges in Balancer using veBAL
      • How to get B-80BAL-20WETH
      • How to Lock veBAL
      • How to Vote for a Liquidity Gauge for Xave's Pool
    • How to Earn BAL Rewards
      • How to Stake into a Liquidity Pool's Gauge
      • How to Unstake from a Liquidity Pool's Gauge
      • How to Claim BAL Rewards
    • How to Claim XSGD Rewards
    • How to Test PHPT:USDC on Sepolia Testnet
  • Product Overview
    • FXPools
      • Pool Operator FAQs
      • Invariant FAQs
    • Lending Market
    • Xave Strategies
      • Strategy # 1: Thetanuts
      • Strategy # 2: USDC Lending
  • Tokenomics
    • XAV
    • XAV Tokenomics
      • XAV MultiSigs
      • Claim Portal for Prior Community Supporters
    • Governance
  • Contract Addresses
  • TOKEN LAUNCH
    • XAV Launches and Exchange Listing
  • Future
    • Roadmap
    • FXMetaPool
  • Contract Audits
    • Overview
    • Price Oracles Final Audit
    • FXPool Final Audit
    • Lending Market
    • Standard Operating Procedure for Security
  • Liquidity Provider and Protocol Fees
    • Avalanche Pools
    • Ethereum Pools
    • Polygon (POS) Pools
  • List of supported Stablecoins
    • 🇸🇬XSGD
    • 🇺🇸USDC
    • 🇪🇺EUROC
    • 🇪🇺EURS
    • 🇬🇧GBPT
  • Socials
    • Twitter
    • Medium
    • Discord
    • Github
  • Branding Assets
    • Xave Finance Brand Assets
Powered by GitBook
On this page

Liquidity Provider and Protocol Fees

These pages describe the breakdown and distribution of fees generated from the FXPools

Last updated 1 year ago

Note: not all FXPools charge the same 8 bps per trade. See the subpages for the actual fees charged

LP Fees

  1. For every successful trade, a percentage of the transaction value is deducted as trading fees and remains in the pool

  2. A portion of these fees is allocated to liquidity providers (LPs) and paid to them upon withdrawal, while the rest is allocated to the protocol. For a detailed breakdown of fee distribution between LPs and the Protocol for individual pools, please refer to the subsections of the Fee page and find the specific pool you are interested in for more details.

Protocol Fees

  1. The FXPool tracks the protocol unclaimed fees from transactions through a public parameter, FXPool.totalUnclaimedFeesInNumeraire, where "numeraire" represents USD value in our code

  2. On every LP deposit/withdraw, FXPool.totalUnclaimedFeesInNumeraire is paid to the protocol fee distributor contract

  3. The disperseFees function can then be called by anyone, distributing half of the unclaimed fees to the Xave fee collector address and the other half to Balancer's fee collector.

_______________________________________________________________________________________________

Simulated Fee Computation

Simulated Transaction

Swap In (XSGD)
Swap Out (USDC)

100

75.57378887

XSGD/USD Price
USDC/USD Price

0.75637240

1.00003892

Sample Parameters and Fee Break Down:

Fee Break Down
Fees value (bps)
Fee Value (Numeraire)

LP Fees

5.04

0.03812117283

Protocol Fees (Xave)

1.48

0.01119431152

Protocol Fees (Balancer)

1.48

0.01119431152

Total Trading Fees

8

0.06050979814

Trading Fees
Disperse Protocol Fees