Beraborrow
  • Overview πŸŒ„
    • What is Beraborrow?
    • How to use Beraborrow?
    • Key features
    • Leverage in Beraborrow
  • Vaults
  • Managed Vaults
  • Auto Compounding Vaults
  • Borrowing 🀝
    • Dens
    • Understanding Collateral
      • Collateral Screening and Parameter Methodology
      • iBGT as collatoral
      • Kodiak Islands as Collateral
      • iBERA as collateral
      • bHONEY
      • ETH and BTC based Derivatives
    • Fees for Borrowers
    • Collateral Ratio and Liquidation
    • Recovery Mode
    • Flash Loans
  • Pricing Assets
  • NECT (Stablecoin) 🍯
    • What is Nectar ($NECT)?
    • Liquid Stability Pool (LSP)
    • Redemptions
      • $NECT Peg
    • sNECT Arbitrage Opportunities
  • POLLEN 🐝
    • What is POLLEN?
    • Pollen Emissions
    • Why hold POLLEN?
    • aPOLLEN
    • cPOLLEN
    • vePOLLEN
  • Boyco POLLEN Claim
  • Proof of Liquidity 🌊
    • Importance of Proof of Liquidity
  • AUDITS πŸ”’
    • Audits
  • Additional Resources πŸ”§
    • Contract Addresses
    • Brand Assets
    • Glossary
    • Official Links
  • πŸ‘₯User Guides
    • Den Management
      • How to Open a Den
      • How to Close a Den
    • Liquid Stability Pool Management
      • Deposit NECT into the liquid stability pool.
      • Withdraw NECT from the liquid stability pool.
  • Strategies
    • Euler NECT/USDe Stablecoin Looping
    • Beraborrow Structured Products
    • Yield Looping
Powered by GitBook
On this page
  • What is a Flash loan?
  • How does Beraborrow use flashloans?
  • Nectar
  • Collateral Assets
  • Dev Integration
  1. Borrowing 🀝

Flash Loans

PreviousRecovery ModeNextPricing Assets

Last updated 4 months ago

Beraborrow offers Flash Loans on all the assets it controls!

What is a Flash loan?

It is an uncollateralised/unsecured loan that is deposited and repaid within the same block. Meaning a user can theoretically borrow ♾️amount (or as much of that asset is available) as long as the loan + fees is repaid within the same block.

How does Beraborrow use flashloans?

Instead of looping multiple times to increase exposure, users can achieve leverage using a flash loan.

For example, Alice starts with $100 worth of collateral and wants 5x exposure. She flashloans $500 worth of the collateral and deposits it into Beraborrow, minting $400 worth of $NECT. Alice then sells the $NECT for collateral, giving her $500 ($400 from the sale plus her initial $100). This is enough to fully repay the flash loan.

As a result, Alice now has $500 worth of exposure to the collateral within Beraborrow but owes $400 worth of $NECT.

Nectar

Nectar ($NECT) can be flash-minted for more than hextillions of value. You repay the entire amount plus0.0001% of the volume flash-minted.

With this mechanic, $NECT aspires to be the most efficient arbitraging asset in Beraborrow's ecosystem.

Collateral Assets

It will depend on the type of collateral assets, since examples like $siBGT (staked $iBGT) will probably stay non-transferable, but except for this rare edge case all collateral types will be flashloanable.

The current fee for collateral assets is 0.001%over volume.

Dev Integration

You will find the flash-mint endpoint for Nectar in its token address, and for the specific collateral type it will be in itsDenManager contract.

function flashLoan(
    IERC3156FlashBorrower receiver,
    address token,
    uint256 amount,
    bytes calldata data
) external returns (bool) {
  ...
  require(
      receiver.onFlashLoan(msg.sender, token, amount, fee, data) == keccak256("ERC3156FlashBorrower.onFlashLoan"),
      "IERC3156: Callback failed"
  );
  ...
  /// @dev Remember to repay the amount + fee
}

The endpoints follows the standard:

IERC3156