[ARFC] Aave V3.8

Summary

This proposal seeks to upgrade Aave V3 to V3.8, a non-invasive and very measured release focused on security. The changes it introduces are quite minor, but we consider them worth applying to make the system more robust and resilient going forward.

It includes the following changes:

  • A reentrancy guard on Pool operations during external callbacks.

Securing Aave V3 remains a top priority, and additional security reviews are being planned. Further defense-in-depth improvements may be proposed in future upgrades.

Motivation

Aave V3.8 aims to make the system more robust and predictable. Gas costs are no longer the concern they once were, and recent developments such as transient storage allow the protocol to be strengthened with little downside in efficiency or gas costs.

Aave V3.8 Changes

1. Reentrancy hardening

Aave V3.8 introduces a guard based on transient storage (EIP-1153) that protects Pool accounting consistency, including when a single transaction’s execution flow interacts with the Pool more than once. The change is intended to strengthen the robustness and security of the protocol over the long term, aligning the pools with industry best practice and protecting them against theoretical reentrancy exploits. Gas costs were historically a concern for this type of guard. With transient storage, that concern is no longer valid, as the guard can be applied with little overhead.

Deployment Rollout Plan

The upgrade targets the Aave V3 instances on Ethereum (Core and Lido), Plasma, Avalanche, BNB, Monad, Base, Arbitrum, Mantle, X Layer, Polygon, Linea, Optimism, Gnosis, MegaETH, and Celo. Only active instances are in scope. Instances, where all assets are frozen and caps are being set to zero, are not included.

Licensing

Aave V3.8 will be published as its own version of the Licensed Work under a Business Source License. The licence text is available here and will be included in the V3.8 repository. The Change Date for V3.8 is set by Aave Governance and recorded in the change-date text record at v38.aavelicense.eth. Until Governance sets a date, V3.8 stays under the Business Source License. As with the other codebase IP, the V3.8 IP will be transferred to the Aave Foundation through a separate governance proposal.

Security procedures

Aave V3.8 will go through a round of audits by Certora and third parties before AIP.

Disclaimer

Aave Labs is presenting this proposal as a contributor to the Aave ecosystem, as part of its ongoing work on the Aave Protocol, and has no undisclosed financial interest in its outcome.

Next Steps

  1. Gather community feedback during the ARFC stage.
  2. If the ARFC response is positive, escalate to Snapshot for offchain confirmation.
  3. Upon completion of the audits, submit an AIP to Aave Governance to upgrade the Aave V3 instances in scope to V3.8.
6 Likes

If the guard covers the flash-loan callback from Pool.flashLoanSimple(), then this would prevent using an Aave flash loan to trigger an Aave liquidation inside that callback.

Edited on Oct-27 to align with the latest development progress of V3.8

Thank you for the question, @futuramo

In Aave V3.8, flashLoan() and flashLoanSimple() are covered by the reentrancy guard, but only to validate the reentrancy status: neither function sets the lock. As a result, a flash loan can still be executed atomically as the rest of the Pool actions, including a liquidation triggered from within the flash loan callback. What the guard prevents is initiating a flash loan from within an ongoing Pool action.

Existing integrations and tools that compose Aave flash loans with other Pool actions in this way are expected to continue operating as they do today.

1 Like

The ARFC to upgrade the protocol to Aave V3.8 has been raised to snapshot. Voting will begin in less than 24 hours. You may vote here

Good to see this, a transient guard is cheap insurance now. Two things I’d like the ARFC to spell out before Snapshot, since a lot of integrations sit on these paths.

First, which entry points the guard covers and what happens inside a flash loan callback. Plenty of contracts, Aave’s own swap and repay adapters included, call supply, repay or withdraw from inside executeOperation. If those now revert they break, and if they’re allowed the callback window isn’t covered. Either answer works, it just needs to be written down so integrators can test against it before the AIP.

Second, views. If getUserAccountData or getReserveData can still be read while the Pool is mid operation, an integrator pricing off them can read half updated state from inside a callback. A public way to check the lock, like Balancer’s vault context check, would let them guard their side.

The AIP for this proposal was successfully created, proposal#541, voting is open.