Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v3.3.0 activation #602

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
## Raw diff

```json
{
"raw": {
"from": null,
"to": {
"0x2b22e425c1322fba0dbf17bb1da25d71811ee7ba": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0x2f39d218133afab8f2b819b1066c7e434ad94e9e": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0x5300a1a15135ea4dc7ad5a167152c01efc9b192a": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0x7222182cb9c5320587b5148bf03eee107ad64578": {
"label": null,
"balanceDiff": null,
"stateDiff": {
"0xd08b16358b83ce3047f6f93a142c6ab9489e40fd58374e54136e9cd21dc93b29": {
"previousValue": "0x0067a0fb4e000000000002000000000000000000000000000000000000000000",
"newValue": "0x0067a0fb4e000000000003000000000000000000000000000000000000000000"
},
"0xd08b16358b83ce3047f6f93a142c6ab9489e40fd58374e54136e9cd21dc93b2a": {
"previousValue": "0x000000000000000000093a8000000000000067cf1fcf00000000000000000000",
"newValue": "0x000000000000000000093a8000000000000067cf1fcf00000000000067a0fb4f"
}
}
},
"0x7effd7b47bfd17e52fb7559d3f924201b9dbff3d": {
"label": null,
"balanceDiff": null,
"stateDiff": {
"0x14a553e31736f19e3e380cf55bfb2f82dfd6d880cd07235affb68d8d3e0cac4d": {
"previousValue": "0x00000000039d575c5c599b25aa55178e000000000000000000000798d1b01d9c",
"newValue": "0x00000000039d6e51321b950131ba2b0900000000000000000000078b001f481a"
},
"0xf57a0f05777e493f6eb3a9303c3f677c25a62ed0fdbf9d58a277df4680f70afb": {
"previousValue": "0x00000000039a3ba16f7d7baebd792aff0000000000000000000001207ebbdca1",
"newValue": "0x00000000039d6e51321b950131ba2b0900000000000000000000012e504cb223"
}
}
},
"0x80f2c02224a2e548fc67c0bf705ebfa825dd5439": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0x8164cc65827dcfe994ab23944cbc90e0aa80bfcb": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0x98c23e9d8f34fefb1b7bd6a91b7ff122f4e16f5c": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0xdabad81af85554e9ae636395611c58f7ec1aaec5": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0xe7b67f44ea304dd7f6d215b13686637ff64cd2b2": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
},
"0xef434e4573b90b6ecd4a00f4888381e4d0cc5ccd": {
"label": null,
"balanceDiff": null,
"stateDiff": {}
}
}
}
}
```
18 changes: 18 additions & 0 deletions src/20250205_Multi_UpgradeAaveInstancesToV33/PaymentPayload.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol';
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';

/**
* @title Payment for audits
* @author @BGDLabs
* Reimburse payments done on behalf of the DAO.
*/
contract PaymentPayload is IProposalGenericExecutor {
address public constant BGD = 0xb812d0944f8F581DfAA3a93Dda0d22EcEf51A9CF;
uint256 public constant AMOUNT = 66_400e6;

function execute() external {
AaveV3Ethereum.COLLECTOR.transfer(AaveV3EthereumAssets.USDC_A_TOKEN, BGD, AMOUNT);
}
}
33 changes: 33 additions & 0 deletions src/20250205_Multi_UpgradeAaveInstancesToV33/PaymentPayload.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';
import {IERC20} from 'openzeppelin-contracts/contracts/token/ERC20/IERC20.sol';
import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/src/ProtocolV3TestBase.sol';
import {PaymentPayload} from './PaymentPayload.sol';

/**
* @dev Test for AaveV3Ethereum_UpdateUSDSGHOBorrowRate_20250203
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20250205_Multi_UpgradeAaveInstancesToV33/PaymentPayload.t.sol -vv
*/
contract AaveV3Ethereum_PaymentPayload_Test is ProtocolV3TestBase {
PaymentPayload internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 21767442);
proposal = new PaymentPayload();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
uint256 balanceAUSDCBefore = IERC20(AaveV3EthereumAssets.USDC_A_TOKEN).balanceOf(
proposal.BGD()
);
defaultTest('AaveV3Ethereum_PaymentPayload', AaveV3Ethereum.POOL, address(proposal));
uint256 balanceAUSDCAfter = IERC20(AaveV3EthereumAssets.USDC_A_TOKEN).balanceOf(proposal.BGD());
assertApproxEqAbs(balanceAUSDCAfter - balanceAUSDCBefore, proposal.AMOUNT(), 1);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: "Upgrade Aave instances to v3.3"
author: "BGD Labs @bgdlabs"
discussions: "https://governance.aave.com/t/bgd-aave-v3-3-feat-umbrella/20129"
---

## Simple Summary

This proposal will upgrade all active Aave instances to version v3.3.0.

## Motivation

Back in december we(BGD Labs) [proposed](https://governance.aave.com/t/bgd-aave-v3-3-feat-umbrella/20129) the Aave v3.3.0 upgrade which improves the liquidation engine, to support the previously proposed [Umbrella](https://governance.aave.com/t/bgd-aave-safety-module-umbrella/18366) proposal.
With the proposal being executed, the Aave Protocol will start tracking bad debt, which can then be used as an input on Umbrella to slash stakers & cover the realized deficit.

## Specification

This proposal will upgrade all active Aave instances to the new v3.3.0 version.
In practice this means:

1. the pool implementation will be upgraded via a call to `POOL_ADDRESSES_PROVIDER.setPoolImpl(newImpl)`
2. the pool configurator will be upgraded via a call to `POOL_ADDRESSES_PROVIDER.setPoolConfiguratorImpl(poolConfiguratorImpl)`
3. the pool data provider will be replaced via a call to `POOL_ADDRESSES_PROVIDER.setPoolDataProvider(newPoolDataProvider)`

In addition the proposal will transfer 66.400$ in aUSDC to a wallet controlled by BGD to cover audit costs.

## Security procedures

The v3.3.0 upgrade was audited by:

- [StErMi](https://github.com/bgd-labs/aave-v3-origin/blob/v3.3.0/audits/2024-10-22_StErMi_Aave-v3.3.pdf)
- [Certora](https://github.com/bgd-labs/aave-v3-origin/blob/v3.3.0/audits/2024-11-07_Certora_Aave-v3.3.0.pdf)
- [Oxorio](https://github.com/bgd-labs/aave-v3-origin/blob/v3.3.0/audits/2025-01-29_Oxorio_Aave-v3.3.0.pdf)

In addition a [Sherlock Audit Contest](https://governance.aave.com/t/arfc-bgd-aave-v3-3-sherlock-contest/20498/2) was performed from `13.01.25 - 22.01.25`.
You can find the related audit report [here](todo).

## References

- [Implementation](https://github.com/bgd-labs/protocol-v3.3-upgrade/blob/main/src/contracts/UpgradePayload.sol)
- [Tests](https://github.com/bgd-labs/protocol-v3.3-upgrade/tree/main/tests)
- [Diffs](https://github.com/bgd-labs/protocol-v3.3-upgrade/tree/main/diffs)
- [Discussion](https://governance.aave.com/t/bgd-aave-v3-3-feat-umbrella/20129)

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Loading
Loading