Flash Loan

NAVI Flash Loans are an innovative financial tool exclusive to the blockchain domain, enabling users to borrow assets without providing upfront collateral. These loans, also known as One-Block Borrows, must be initiated and fully settled within the same blockchain block. Their success relies on the execution of predefined conditions within this strict timeframe.
Overview
Flash loans allow users to access liquidity from a pool for a single transaction, either by:
Borrowing and repaying the loan plus fees immediately, or
Opening a debt position if permitted by the pool.
NAVI Protocol offers two options for flash loans:
flashloan:Liquidity is borrowed from the pool.
Both the borrowed funds and the debt receipt are sent to the address that initiates the transaction.
flashloan_with_AccountCap:Borrowed funds are sent to a predefined account cap address, while the debt receipt is sent to the transaction initializer.
The initializer must destroy the receipt by the end of the block for the transaction to succeed.
Flash Loan Config
Live fees and pool parameters can be found in SDK docs.
Availability: Enabled for all pools, with initial borrowing caps per pool.
Adjustments: NAVI regularly evaluates risk and may update borrowing limits.
Execution Flow
For SUI developers, a helpful model to consider when developing your solution:
Initialize all the parameters required in a PTB (Programmable Transaction Block)
Your contract calls the
pool::lending::flash_loan_with_ctxcontract, requesting a Flash Loan of a certain
amount(s)ofpool(s)After some sanity checks, the
Lending Contracttransfers the requestedamountsof thecoinsto your contract, then issue receipt toreceiveraddress.Your contract, now holding the flash loaned
amount(s), executes any arbitrary operation in the ptb.Call
pool::lending::flash_repay_with_ctxand send the borrowed money plus fee as an object to the contract.
All steps occur within a single PTB transaction, i.e., a single SUI block.
Getting Started
You may refer NAVI-Developer Doc or navi-sdk for efficient development.
Last updated