Separate risk modes from transaction atomicity
By the end, explain the diagram in your own words, solve the case and justify the correction.
Prerequisites : Collateral, LTV and liquidation thresholds · Aave health factor and liquidation · EVM and smart contract composability
Level 3 · Advanced →Reading path · 4 / 17 · Advanced
Efficiency mode permits parameter arrangements for defined groups of correlated assets.
The essentials
Efficiency mode permits parameter arrangements for defined groups of correlated assets. Its capital efficiency depends on the correlation assumption. A depeg can break that assumption. Isolation modes and caps constrain particular exposures under deployment-specific rules.
How it works
A flash loan provides funds without prior collateral on condition that principal and required fees are repaid within the same transaction. Otherwise the operation reverts. This can support arbitrage or position migration; it is not an unsecured balance that can be retained after the transaction.
What to watch
Flash liquidity can amplify an existing pricing or contract weakness, but does not create every vulnerability it exploits. Applications should be designed for adversaries with substantial temporary capital. Reverted transactions can still consume gas, so an unsuccessful attempt is not necessarily costless for the sender.
Understand the details
Efficiency modes can change collateral treatment for eligible categories, while isolation mechanisms limit how certain assets support borrowing. Eligibility and limits must be checked for the actual market. Similar price behavior is an assumption that can fail, particularly when an asset loses its intended peg.
Boundaries and common mistakes
A flash loan is different: funds are borrowed and repaid, with required fees, within one transaction or the operation reverts. Atomicity limits the lender’s exposure under the mechanism, but does not make every contract touched by the borrower safe. A profitable-looking sequence can fail because prices or execution conditions change.
The mechanism at a glance
- Borrow within transaction
- Execute actions
- Repay principal and fee
- Otherwise revert
Apply the lesson to a case
Sketch a flash-loan transaction that borrows 1,000 units, performs two actions and must return 1,001 under a fictional fee rule. The second action leaves only 999. Track which state changes survive if repayment requirements fail.
The atomic loan operation reverts, so the borrower does not keep the borrowed funds. Execution can still cost gas. This differs from a normal collateralized loan with debt continuing over time. Put these two mechanisms in separate columns to avoid confusing their risk models.
Terms in this lesson
- Gas
- A measure of execution resources; gas units and the price per unit are separate quantities.
Prepare a correction note
Describe the passage and the proposed correction. This creates a local note for you to share; it sends nothing. Do not include personal or confidential information.