Flash Loan
Last updated
Last updated
In the Centuari protocol, flash loans serve as a powerful utility mechanism to enable atomic, capital-efficient operations within a single transaction. Their primary use cases within Centuari include:
Instant Arbitrage and Liquidation Flash loans allow actors to borrow liquidity from the lending pool without upfront collateral, execute profitable arbitrage or liquidation opportunities across CLOB markets or external venues, and repay the loan within the same transaction. This ensures market efficiency and liquidation integrity without requiring idle capital.
Debt Refinancing and Position Restructuring Users can utilize flash loans to instantly repay existing loans, adjust leverage, or migrate positions between different lending pools or CLOB orderbooks without interrupting market exposure. This enhances composability and optimizes capital allocation.
Collateral Swapping Flash loans enable users to atomically swap collateral assets backing their positions by borrowing liquidity, swapping assets, and repaying the loan — all in a single atomic transaction, eliminating multi-step execution risks.
Protocol Maintenance Operations Governance-approved operators or keepers may leverage flash loans to perform batch operations such as clearing under-collateralized positions, rebalancing liquidity pools, or temporarily injecting liquidity for system-critical functions without requiring permanent capital deposits.
Use ICentuariFlashLoanCallbacks.sol for implement flash loan interface
On related contract, use thisCentuariFlashLoan to handle the logic
Callback function you must agree to a contract to claw back the loan amount
In essence, flash loans in Centuari act as a liquidity middleware layer that enhances operational flexibility, capital efficiency, and execution atomicity across lending and CLOB-based markets.
Centuari.sol:
ICentuariCallbacks.sol:
BaseTest.sol: