Simple summary
Proposal for the full deprecation of stable rate mode from Aave v2 and v3, with all user positions being swapped to variable.
Including also a parallel proposal for the bug bounty payment of the report received on 4th November 2023 in relation to the stable rate.
Motivation
On the 4th of November 2023, a report was received via the Aave <> Immunefi bug bounty program about a critical bug related to the stable borrow rate.
Only certain assets were affected due to their configuration, but given the nature of the bug, together with the progressive deprecation of stable rate that started before (not enabled in Aave v3 Ethereum, the main instance of Aave at the moment, or any other afterwards), the fix involved a full deprecation of minting mechanisms of stable debt: halting new borrowings in that mode and also halting rebalancing and swapping from variable to stable.
Even if with the halting of minting of stable rate we are fully confident that there is no further vector, the current situation is extremely asymmetric, and creating really important technical overhead, for example when doing security evaluations/reviews of the protocol: there are user positions at stable, which factually have fixed rate until they decide to close it, without any kind of rebalancing applicable.
Additionally, and even if we know with full certainty that it is not applicable anymore, we are not comfortable disclosing how was the attack vector reported in November until all user stable debt positions are closed.
Therefore, after evaluating the scenario for some time, we think the better solution is to progress on the deprecation of stable rate, by having all user positions at stable moved to variable.
Specification
The Pool smart contract on both Aave v2 and v3 has a function swapBorrowRateMode()
, originally allowing for an user to swap his own borrow mode from stable to variable and vice versa, and after the bug report, only allowing the user to swap from stable to variable.
With one of the swap directions not available anymore, this function becomes factually a mechanism of off-boarding from stable rate to variable. However, in some cases, for lack of monitoring of the positions, and in others, because it is not profitable, multiple users have stayed in stable rate mode, not swapping to variable.
The proposal consists in an update to the Aave Pool and its affected libraries to make the swapBorrowRateMode()
permission-less in order to allow any address to trigger a swap of rate from variable to stable.
This will allow, for example, an Aave DAO automation to swap all current stable debt positions to variable, without any type of penalty to the users, apart from losing their stable exposure (sometimes positive for them, sometimes negative, if compared with the current variable rate).
As no new positions with stable rate can be created, this will allow for the final off-boarding of the mode, once all positions are at variable.
The bounty
As the problem with stable rate was detected via a bug report within the Aave <> Immunefi program, a bounty needs to be released to the white-hat, together with the Immunefi fee.
This bug had clear Critical severity, eligible for the maximum bounty on the program, amounting to $1’000’000 value. The Immunefi fee is 10% on all payouts, so $100’000 in this case.
As defined in the program description (”Program Overview” section), the Aave DAO has the possibility of doing the payments in a mix of AAVE and stablecoins. So open for feedback, our proposal is to do the payment half in stable-coins and half in AAVE token, to not de-capitalize the stable-coins reserves of the DAO, together with also giving governance power to an actor that made a really important contribution to Aave; the white-hat. The Immunefi fee needs to be paid in stablecoins.
In terms of disclosure, even if all parties aware of the vector (including us and the white-hat) are fully confident that the whole Aave system is safe, as we mentioned before, we see no value in disclosing the details of the vector yet. However, for full transparency with the community, we will also request contributors of the community (Avara as reviewers on Immunefi and Certora as security service providers to the DAO) to confirm in this thread that the maximum payout is required.
Next steps
The next steps will be the following:
- Receive feedback and answer questions from the community regarding this proposal. This also includes risk providers of the community (props to Chaos Labs for sharing high-level data about current stable rate positions).
- Create an ARFC Snapshot, for pre-approval of the community on the deprecation of stable rate mode. This will be done only after a minimum of 5 days of this proposal being in the forum, to give enough time for discussion.
- If the ARFC is approved, and after passing the appropriate security procedures, proceed with an on-chain AIP, upgrading the v2/v3 pools and potentially enabling some type of Aave Robot automation to permission-less doing user migrations.
- In parallel, and also after feedback from the community (especially contributors to the financial area), create an on-chain AIP for the bounty payment, following the 50%/50% split proposed.