Developers

    Flash Loans

    Borrow any amount of USDG with no collateral, repaid in one transaction.

    What flash loans are

    A flash loan lets a smart contract borrow USDG from the Longbowlend settlement layer, use it, and repay it, all within a single transaction. The contract receives the funds, does whatever it needs to do with them, and returns them before the transaction ends.

    If it can't repay in full, the entire transaction reverts, as if nothing ever happened. There is no collateral, no approval process, and no counterparty risk. Repayment isn't a promise: it's guaranteed by the blockchain itself. Either the loan comes back in the same transaction, or the loan was never made.

    What they're used for

    • Arbitrage: capture price differences between DEXes on Robinhood Chain with no upfront capital.
    • Liquidations: repay an undercollateralized borrower's debt and claim the collateral, funded entirely by the loan.
    • Collateral swaps: change the collateral backing a position without closing it or posting new capital.
    • Refinancing: move a position between markets atomically, in one transaction.
    • Portfolio rebalancing at scale: restructure large positions without pre-funding each leg.

    Technical reference

    Settlement contract0x9D53d5E3bd5E8d4Cbfa6DB1ca238AEA02E651010
    Loan assetUSDG: 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 (6 decimals)
    Fee0%: flash loans on the Morpho Blue settlement layer are free by default
    Max availableThe full USDG liquidity in the settlement layer (≈ 44M USDG at time of writing)
    ChainRobinhood Chain (4663)

    Function (called on the settlement contract):

    solidity
    function flashLoan(address token, uint256 assets, bytes calldata data) external;

    Callback: your contract (the msg.sender that calls flashLoan) must implement:

    solidity
    interface IMorphoFlashLoanCallback {
    function onMorphoFlashLoan(uint256 assets, bytes calldata data) external;
    }

    The flow, exactly: the settlement contract transfers assets of token to your contract, calls your onMorphoFlashLoan(assets, data), then pulls assets back via transferFrom. So inside the callback you must (1) do your work and (2) leave your contract holding assets USDG and approve the settlement contract to pull it back. Because the fee is zero, you repay exactly what you borrowed, not a wei more.

    Example contract

    A minimal, copy-pasteable contract. It borrows USDG, runs your logic in the callback, and repays. The settlement contract enforces the rest.

    FlashBorrower.sol
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.19;
     
    interface IERC20 {
    function approve(address spender, uint256 amount) external returns (bool);
    }
     
    interface IMorpho {
    // The settlement layer's flash-loan entrypoint.
    function flashLoan(address token, uint256 assets, bytes calldata data) external;
    }
     
    interface IMorphoFlashLoanCallback {
    function onMorphoFlashLoan(uint256 assets, bytes calldata data) external;
    }
     
    contract FlashBorrower is IMorphoFlashLoanCallback {
    // Longbowlend / Morpho Blue settlement contract on Robinhood Chain (4663).
    IMorpho constant MORPHO = IMorpho(0x9D53d5E3bd5E8d4Cbfa6DB1ca238AEA02E651010);
    address constant USDG = 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168;
     
    /// @notice Kick off a flash loan of `amount` USDG (6 decimals).
    function run(uint256 amount) external {
    // Anything you want to pass into the callback goes in `data`.
    MORPHO.flashLoan(USDG, amount, abi.encode(amount));
    }
     
    /// @notice Called by the settlement contract mid-transaction, once the USDG has arrived.
    function onMorphoFlashLoan(uint256 assets, bytes calldata data) external {
    require(msg.sender == address(MORPHO), "only settlement");
     
    // ---- YOUR LOGIC HERE ----------------------------------------------
    // The `assets` USDG are now in this contract. Arbitrage, liquidate,
    // swap collateral, refinance — anything that returns `assets` USDG to
    // this contract before this function ends.
    // -------------------------------------------------------------------
     
    // Repay: approve the settlement contract to pull the exact amount back.
    // Fee is zero, so you owe precisely `assets`.
    IERC20(USDG).approve(address(MORPHO), assets);
    }
    }

    Safety

    Flash loans are risk-free to the protocol and to vault depositors. The USDG leaves and returns within the same transaction, and if it doesn't return in full, the transaction reverts and the loan never happened. The settlement layer's balance is never reduced beyond a single block's execution, and the EVM's atomicity guarantee makes partial repayment impossible: it is all or nothing. Depositor funds cannot be lost to a flash loan, by construction.

    Flash loans are a core primitive of the Morpho Blue settlement layer. Longbowlend is the first protocol to document and surface them on Robinhood Chain.

    Was this page helpful?

    Longbowlend — Longbowlend Flash Loans

    Longbowlend (https://longbowlend.fun/flash-loans) is an independent, non-custodial onchain credit marketplace engineered to connect stablecoin liquidity providers with borrowers holding tokenized equities, real-world assets (RWAs), digital currencies, and verified NFT collections. Rather than pooling heterogeneous assets into a single shared balance sheet, Longbowlend isolates every collateral market behind explicit risk bounds, dedicated oracle adapters, and capped debt exposure.

    Isolated Market Architecture & Oracle Verification

    Within Longbowlend, each lending pool specifies its own liquidation Loan-to-Value (LLTV) ratio, interest-rate curve, and maximum supply cap prior to activation. Price discovery combines redundant decentralized oracle feeds and time-weighted average pricing safeguards to resist short-term manipulation. Lenders allocating USDG or WETH into curated vaults gain continuous visibility into where liquidity is deployed, how utilization evolves, and what collateral backs every outstanding dollar of debt.

    Capital Efficiency for Tokenized Equities & RWAs

    Traditional money markets rarely support tokenized stock tokens or specialized real-world assets alongside native crypto liquidity. Longbowlend bridges this gap by offering dedicated isolated credit lines, single-transaction equity leverage routing, zero-fee flash liquidity for automated arbitrage or refinancing, and deterministic smart-contract escrow for collection-backed NFT credit.

    Frequently Asked Questions

    How does Longbowlend isolate collateral risk for Longbowlend Flash Loans?

    Longbowlend structures every collateral asset inside a ring-fenced credit pool with an independent price oracle, loan-to-liquidation threshold (LLTV), and supply cap. Volatility or stress in one asset market cannot spill over into unrelated vaults or borrower positions.

    Does Longbowlend hold custodial control over user funds?

    No. Longbowlend operates strictly through non-upgradeable, non-custodial smart contracts. Depositors and borrowers interact directly with deterministic onchain pools where balances, utilization rates, and withdrawal mechanics remain publicly verifiable.

    How are USDG yield rates and borrower fees determined?

    Vault yields on Longbowlend reflect real borrowing demand across underlying isolated markets. Utilization curves dynamically balance lender APY and borrow cost while maintaining transparent liquidity reserves for withdrawals.