Factor Docs
  • 🏭Introduction to Factor
  • Getting Started
    • đŸ•šī¸Quickstart
    • 🔗Supported Protocols
    • 🔐Strategy Cheatsheet
      • Swaps Cheatsheet
        • Conditional Market Order
        • Automated Market Order
        • Multi Swap
        • Automated Swap & Earn
        • Automated Scale Order
        • Scale Order Partial Fill Yield
        • Interest On Pending Trades
        • Leverage Trade
        • Leverage DCA
      • Lending Cheatsheet
        • Lending Pool Zap
        • Multi Lend
        • Market Making To Lending Switch
        • Earn Negative Interest
        • Carry Trade
        • Leveraged Staking Yields
        • Leveraged Fixed Yields
      • Borrowing Cheatsheet
        • Collateralized Borrow
        • Collateralized Borrow Zap
        • Multi Borrow
        • Debt Switching
        • Automated Debt Readjustments
        • Debt Refinancing
        • Asset Switching
      • Liquidity Provision Cheatsheet
        • Liquidity Pool Zap
        • Yield Farm Zap
        • Automated LP Adjustments
        • Yield Farm Adjustments
      • Flash Loan Cheatsheet
    • 🧠Strategy Explainers
      • Leverage
        • Leverage Performance Modelling
        • Leverage Long Simulation
        • Leverage Short Simulation
      • Yield
        • Yield Performance Modelling
      • PT Strategies
        • Leverage Long PT Simulation
      • Delta Neutral Yields
        • Levered USD & ETH Carry
    • 📖Glossary
  • Factor Discover
    • 🔍Factor Discover
      • Public Strategies User Guides
        • Deposit Into User Created Strategies
        • Withdraw From User Created Strategies
      • Leverage User Guides
        • Create A Leveraged Position
        • Adjust Position Leverage
        • Add Collateral To Position
        • Withdraw Collateral From Position
        • Repay Position Debt
      • Yield User Guides
        • Auto-compound Your Yields
      • PT User Guides
        • Redeem Your PT
      • APY Calculations
    • âš™ī¸Factor Operated Strategies
      • Yield Type Strategies
        • Arbitrum (ChainID: 42161)
          • Additional rETH Yields On USDC Lend
          • Amplified rETH Yields On USDC Lend - Aave & Compound
          • Amplified wstETH Yields On USDC Lend - Aave
          • Additional Liquid Staked ETH Yields On USDC Lend
          • Additional Liquid Restaked ETH Yields On USDC Lend
        • Base (ChainID: 8453)
          • 3.5x Leveraged cbETH:ETH Yields - Aave
          • Amplified cbETH Yields On USDC Lend - Aave
          • Additional cbETH Yields On USDC Lend
          • Amplified cbETH Yields On cbBTC Lend - Aave
          • Additional Liquid Staked ETH Yields On USDC Lend
      • Trading Type Strategies
        • WBTC Base Switch On rETH For ETH & USDC Yields
      • Delta Neutral Type Strategies
        • Delta Neutral ETH With rETH & USDC Yields
  • Factor Studio
    • 🎨Factor Studio
      • Automated Strategies
      • Conditional Strategies
    • 🏠Private Strategies
      • User Guide
        • Private Strategy Creation
    • đŸ‘ĨPublic Strategies
      • User Guide
        • Public Strategy Creation
        • Create An Exit Strategy
        • Making Your Strategy Public
        • Strategy Execution
      • Security
      • Exit Strategy
    • đŸ—ī¸Strategy Builder
      • Building Blocks User Guide
        • Lend
        • Borrow
        • Swap
        • Flash Loan
    • 📜Studio Contracts
      • Leverage
        • FactorLeverageDescriptor.sol
        • FactorLeverageVault.sol
        • WrapperFactorLeverageVault.sol
      • LP Management
        • FactorLPVault.sol
        • FactorLPDescriptor.sol
  • Factor SDK
    • đŸ“ĻFactor SDK
    • â†”ī¸REST APIs
      • Utility APIs
        • Pricing
        • Stats
  • Factor Building Blocks
    • 🧱Factor Building Blocks
    • âžĄī¸Lend
    • âŦ…ī¸Borrow
    • 🔄Leverage
      • Concepts
        • Collateralized Lending & Borrowing
        • Looping
      • Leverage Dev Guides
        • Create Leveraged Position
        • Add Leverage To Position
      • Strategy Contracts
        • AAVEV3LeverageStrategy.sol
        • CompoundLeverageStrategy.sol
        • LodeStarLeverageStrategy.sol
        • RadiantLeverageStrategy.sol
        • SiloLeverageStrategy.sol
        • SiloYieldTokenStrategy.sol
        • TenderLeverageStrategy.sol
      • FAQ - Leverage Building Block
    • 💰Yield
      • Concepts
        • Yield Farming
        • Yield Aggregators
      • ⚡Zap
    • 🌊LP Management
      • Concepts
        • Automated Market Maker
        • Concentrated Liquidity
    • đŸĨŠStake
    • 🔀Swap
      • Concepts
        • Market Orders
        • DEX Aggregators
    • đŸĒ„Flash Loan
      • Concepts
        • Uncollateralized Lending & Borrowing
        • Flash Loan
  • Factor Adapters
    • 🔌Factor Adapters
    • 📜Adapter Contracts
      • Leverage
      • Yield
      • Swap
      • Flash Loan
  • Governance
    • đŸ›ī¸FactorDAO
      • Factor Flywheel
      • Factor Participants
      • Governance Incentive Calculations
        • FactorDAO Incentives Model (LTIPP)
      • User Guides
        • Stake FCTR
        • Governance Migration
      • Contracts
        • FactorDAO Contract Addresses
      • FactorDAO Multisig Addresses
      • Platform Fees
    • đŸĒ™FCTR Token
      • Staking and Governance
      • Tokenomics
      • Contract Addresses
      • FAQ - Tokenomics
    • âš–ī¸Factor Scale
      • Arbitrum Foundation LTIPP
      • Emission Multiplier Calculations
        • Emissions Multiplier Model
      • User Guides
        • Stake FCTR
        • Vote On Emissions Distribution
      • Contracts
        • Factor Scale Contract Addresses
      • ❔FAQ - Factor Scale
    • 🚀Factor Boost
      • Contracts
        • Factor Boost Contract Addresses
    • đŸ’ŧFactor Bribes
      • Contracts
        • Factor Bribes Contracts
  • Security
    • đŸ›Ąī¸Security
    • 📋Audits
      • PeckShield
        • Leverage Vault Wrapper
        • Silo Yield
        • Silo Leverage
        • Penpie
        • Factor Boost
      • SourceHat
        • FactorDAO Vaults
        • FCTR & Voting Escrow
  • Reference
    • Discover Pro dApp
    • Studio dApp
    • Discover dApp
    • Official Website
    • Press Kit
    • Partnership Form
    • Media Kit
    • Geo Restrictions
  • Community
    • Factor Contributors
    • X
    • Discord
    • Telegram
    • Medium
    • Email Enquiries
Powered by GitBook
On this page
  • Overview
  • How It Works

Was this helpful?

  1. Factor Building Blocks
  2. Flash Loan
  3. Concepts

Flash Loan

PreviousUncollateralized Lending & BorrowingNextFactor Adapters

Last updated 1 year ago

Was this helpful?

Overview

Flash loans enable trustless of crypto assets which are created and paid back within a single block. Unlike loans based on a , flash loans facilitate instantaneous uncollateralized loans without the lender facing any default risks. This is made possible due to the nature of transaction finality on the blockchain.

Flash loans are usually utilized in the context of a multi-step transaction whereby the loan provides the initial capital required to realize the end-to-end transaction. In other words, flash loans are usually batched together with other trading strategies into a single transaction which is then processed by the network. As such, flash loans are only executed if the end-to-end transaction succeeds else a loan is never initiated in the first place (i.e. atomic execution).

How It Works

Flash loan protocols create a market for such loans by:

  • Incentivizing lenders to deposit their tokens into a smart contract in return for yields generated through flash loan interests

  • Letting borrowers initiate a flash loan from the pool with the repayment terms (i.e. interest per block) specified in the smart contract

What follows below is a simplified example from the perspective of the borrower:

  1. Borrower identifies an opportunity for arbitrage on ETH/USDC pair. Market A is selling ETH at 2,750USDC while Market B is buying ETH at 2,800USDC.

  2. Borrower wants to arbitrage without using their own funds hence decides to use a USDC flash loan. USDC flash loan lenders are charging 0.5% interest.

  3. Borrower constructs a transaction with the following steps:

    1. Take out a flash loan for 100,000USDC

    2. Swap 100,000USDC for 36.36ETH on Market A (1ETH:2,750USDC)

    3. Sell the purchased 36.36ETH for 101,818USDC on Market B (1ETH:2,800USDC)

    4. Pay back the flash loan with interest totalling 100,500USDC

    5. Pocket the 1,318USDC difference between arbitrage profit and flash loan interest (i.e. 1,818USDC - 500USDC)

  4. Borrower executes the transaction on the blockchain.

  5. The blockchain executes the transaction and checks the validity of each step. If any of the steps in the transaction fails, the whole transaction is failed (i.e. as if it was never executed in the first place)

As blockchain transaction is atomic, lenders do not face any default risk as the loan must be created and repaid in the same block. Consequently, borrowers are also able to access practically unlimited capital as long as their trading strategy proves to be successful.

Note that the above example has been simplified for readability. Strategies involving flash loans will also have to take into account market volatility/liquidity as well as more fine-grained configurations such as slippage, price impact, etc.

đŸĒ„
uncollateralized lending
credit system