😀
Nexus Market
  • Introduction
    • 👋Hi !
    • Overview
      • Start BUIDLing
  • Links
    • Money Market App
    • Github
    • Telegram
  • Concepts
    • At a Glance
      • Supply
      • Borrow
      • Repay
      • Withdraw
      • Liquidation
      • Flash Loan
      • Risks
    • Protocol
      • Liquidity Pool
      • Reserve
      • Oracle
      • Governance
      • Incentives
      • Safety Module
  • LST as Collateral
  • Coming Soon
  • Guides
    • User Flows
    • Follow-on Steps
  • Developers
    • Smart Contract
      • Pool
      • L2 Pool
      • Wrapped Token Gateway
      • View Contracts
      • Incentives
      • Tokenisation
      • Interest Rate Strategy
      • Access Control Manager
      • Oracles
      • PoolAddressesProvider
      • Pool Configurator
      • Switch Adapters
    • Safety Module
    • Governance
    • Flash Loan
      • Premium Distribution
      • Example Calculation
  • Credit Delegation
  • Resources
    • Web3
    • Glossary
    • Contracts Dashboard
      • Ethereum Sepolia
      • Base Sepolia
      • BSC Chapel
    • Parameters Dashboard
    • Access Control Dashboard
    • FAQ
      • General
      • Risk
      • Supplying and Earning
      • Borrowing
      • Liquidations
      • Governance
      • Safety Module
      • Developers
      • Other Features
      • Brand-related
Powered by GitBook
On this page

Was this helpful?

  1. Developers
  2. Flash Loan

Premium Distribution

How the 0.09% Flash Loan Premium is Distributed:

  1. Premium Calculation The 0.09% fee is calculated based on the amount borrowed:

premiums[vars.i] = amounts[vars.i].mul(_flashLoanPremiumTotal).div(10000);
  1. Premium is Added to the Liquidity Index _reserves[vars.currentAsset].cumulateToLiquidityIndex() updates the liquidity index for the borrowed asset.

  2. Premium is Sent to the Corresponding zToken Contract The borrowed amount + premium is sent back to the zToken contract (e.g., zZBU for ZBU).

IERC20(vars.currentAsset).safeTransferFrom(
    receiverAddress,
    vars.currentZTokenAddress,
    vars.currentAmountPlusPremium
);
  1. Liquidity Providers Earn More Rewards

    1. The premium increases the exchange rate between zTokens and the underlying asset.

    2. Liquidity providers benefit proportionally based on the amount of zTokens they hold.

PreviousFlash LoanNextExample Calculation

Last updated 27 days ago

Was this helpful?