Gloop
WebsiteTwitterDiscord
  • gLoop Litepaper v2
    • Introduction
    • The Two Tokens
    • Roadmap
  • PRODUCTS
    • GM Index
      • Providing/Removing Liquidity
      • Fees and Reflection
      • Deposit/Withdrawal Examples
    • GM Lend/Borrow
      • Lending USDC
      • Depositing Collateral Assets
      • Withdrawing Assets
      • Borrowing USDC
      • Repaying Debt
      • gLooping GM Assets
      • Position Management
        • Withdrawing Assets
        • Health Factor and Liquidations
      • Lending/Borrowing GMI (Coming Soon)
      • Frequently Asked Questions (FAQs)
    • GLOOP Staking (Coming Soon)
  • GM Points (COMING SOON)
  • Technical
    • Gloop Protocol Parameters
    • Gloop Parameters
    • Contracts
      • GM Lending and Looping
        • GM Lending Pool
        • GM Price Oracle
        • GM Vaults
        • GM Interest Rate Model
        • GM Incentives
      • GMI
        • GM Index
        • GMI USDC Zap
        • Token Banks
        • Token Oracles
        • Fees
  • FREQUENTLY ASKED QUESTIONS (FAQs)
    • GM Index (GMI)
    • GM Lending/Looping
    • GLOOP Staking (Coming Soon)
  • GLoop Ecosystem
    • Tokenomics
  • Security and Risk
    • Risks
    • Audits
  • Social
    • Socials
Powered by GitBook
On this page
  • Fees
  • Reflection
  1. PRODUCTS
  2. GM Index

Fees and Reflection

Sustainability of the protocol

PreviousProviding/Removing LiquidityNextDeposit/Withdrawal Examples

Last updated 5 months ago

GMI incorporates fee and reflection mechanisms to improve Total Value Locked (TVL) via Protocol Owned Liquidity, to increase the resiliency of the Index, and to generate funds to maintain the protocol.

GMI incorporates fee and reflection mechanisms to improve Total Value Locked (TVL) via Protocol Owned Liquidity, to increase the resiliency of the Index, and to generate funds to maintain the protocol.

Please refer to the for full deposit and withdraw function logic.

Fees

Fees will slide between a minimum and maximum fee based on if the token transfer benefits the Index or not. A transaction benefits the Index when it brings the GM asset being transferred closer to its target weighting (see for example calculations). This mechanism encourages user behavior that brings the entire Index toward its algorithmically determined, ideal token balances of the best performing assets.

  • Minimum Fee Bps = 33 basis points (0.33%)

  • Fee Bps (Nominal Base Fee) = 100 basis points (1%)

  • Tax Bps (Nominal Base Tax) = 60 basis points (0.6%)

With these fee parameters in mind, there are two scenarios possible for any given transaction:

  1. If the transaction improves the GM asset's weighting in the Index, a rebate is generated, which will be subtracted from the set Fee Bps. The further the asset is away from its target weighting/balance, the higher the rebate is until the fee subtraction hits the Minimum Fee Bps. The fee would then become the Minimum Fee Bps. Any transactions of the asset with an initial balance worse than that will generate the Minimum Fee Bps.

  2. If the transaction worsens the GM asset's weighting in the Index, a tax is levied, which will be added to the set Fee Bps. When comparing the before and after asset balances with the target weight balance, the further that average difference is, the higher the tax is. If the average difference is equal to or greater than the gm Asset's target balance, then the maximum tax of 60 basis points will be incurred, bringing the final maximum transaction fee to 160 basis points (1.6%).

For deposits, the calculated fee (in basis points) gets multiplied by the amount of GMI tokens to be minted, before being divided by the FEE_DIVISOR (done second to avoid math underflow), which converts the fee into a token amount called feeAmount. This amount gets subtracted from the amount of GMI tokens to be minted. The user then receives the amountOut:

feeAmount = (mintAmount * fee) / FEE_DIVISOR

amountOut = mintAmount - feeAmount

It's the same calculation for withdrawals, except the calculated fee (in basis points) gets multiplied by the amount of GM tokens to be withdrawn.

feeAmount = (withdrawAmount * fee) / FEE_DIVISOR

amountOut = withdrawAmount - feeAmount

Reflection

In order to grow TVL and make the Index more robust, the deposit fees (feeAmount) generated are split into two buckets. The bucket percentages are currently set to:

  • 60% for reflection

  • 40% for USDC Lending/Looping Platform liquidity

Deposits

The leftover portion of the feeAmount, in the form of freshly minted GMI tokens, gets sent to the protocolFeeRecipient address (set by the owner), which is in charge of the USDC looping liquidity transactions. More info on this coming soon.

Withdrawals

The leftover portion of the feeAmount again gets sent to the protocolFeeRecipient address in the form of GM tokens.

By subtracting the feeAmount from the mintAmount, the amount of GMI that would be minted (amountOut) for the depositor is reduced slightly. The "reflected" amount stays in the Index in the form of the small amount of GM tokens that the Index did not mint GMI for. This increases the amount of GM tokens per GMI and raises TVL for the Index (see for example calculations).

The reflection portion of the withdrawal fee (feeAmount) is taken from the GM tokens requested to be withdrawn. This small amount stays in the Index, thereby increasing TVL and buoying GMI price (see for example calculations).

GM Index contract
Deposit/Withdrawal Examples
Deposit/Withdrawal Examples
Deposit/Withdrawal Examples