Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Treasury Management - GHO Funding #323

Merged
merged 10 commits into from Oct 17, 2023
Merged

Conversation

defijesus
Copy link
Contributor

No description provided.

@defijesus defijesus changed the title draft: Treasury Management - GHO Funding Treasury Management - GHO Funding Oct 6, 2023
src/20230926_AaveV3_Eth_GHOFunding/GHOFunding.md Outdated Show resolved Hide resolved
src/20230926_AaveV3_Eth_GHOFunding/GHOFunding.md Outdated Show resolved Hide resolved
address public constant PRICE_CHECKER = 0xe80a1C615F75AFF7Ed8F08c9F21f9d00982D666c;
address public constant GHO_ORACLE = 0x3f12643D3f6f874d39C2a4c9f2Cd6f2DbAC877FC;

function execute() external {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this so unnecessarily imprecise?

The forum post & snapshot said 1.6M
the updated(after aip) post now says 1.611M
if it was executed now, it was already 1.613M

Wouldn't it be better to just be exact? as there's not really a good reason not to be - you already have all the amount and could just make e.g. DAI on v3 fill the 1.6M.

AaveV3Ethereum.COLLECTOR.transfer(DAIv2.aToken, address(this), DAIv2.amount);
AaveV3Ethereum.COLLECTOR.transfer(DAIv3.aToken, address(this), DAIv3.amount);
uint256 daiAmount =
AaveV2Ethereum.POOL.withdraw(DAIv2.underlying, DAIv2.amount, AaveMisc.AAVE_SWAPPER_ETHEREUM);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might revert if transfer is 1 wei short

uint256 daiAmount =
AaveV2Ethereum.POOL.withdraw(DAIv2.underlying, DAIv2.amount, AaveMisc.AAVE_SWAPPER_ETHEREUM);
daiAmount +=
AaveV3Ethereum.POOL.withdraw(DAIv3.underlying, DAIv3.amount, AaveMisc.AAVE_SWAPPER_ETHEREUM);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as well

////// USDT v2 swap //////
AaveV3Ethereum.COLLECTOR.transfer(USDTv2.aToken, address(this), USDTv2.amount);
uint256 usdtAmount =
AaveV2Ethereum.POOL.withdraw(USDTv2.underlying, USDTv2.amount, AaveMisc.AAVE_SWAPPER_ETHEREUM);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as well

@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2023

Foundry report

forge 0.2.0 (dbd935b 2023-10-17T00:25:18.468082795Z)
Build log
installing solc version "0.8.21"
Successfully installed solc 0.8.21
installing solc version "0.8.19"
Successfully installed solc 0.8.19
installing solc version "0.8.17"
Successfully installed solc 0.8.17
Compiling 120 files with 0.8.17
Compiling 168 files with 0.8.19
Solc 0.8.17 finished in 48.82s
Compiling 496 files with 0.8.21
Solc 0.8.19 finished in 81.17s
Solc 0.8.21 finished in 358.07s
Compiler run successful with warnings:
Warning (2072): Unused local variable.
  --> src/20230817_AaveV3_Eth_SDAIOnboarding/AaveV3_Ethereum_SDAIOnboarding_20230817.t.sol:24:5:
   |
24 |     ReserveConfig[] memory allConfigsBefore = createConfigurationSnapshot(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> src/20230825_AaveV3_Eth_GhoFreezing/AaveV3_Ethereum_GhoFreezing_20230825.t.sol:62:5:
   |
62 |     ReserveConfig[] memory allConfigsAfter2 = createConfigurationSnapshot(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> src/AaveV2EthBUSDIR_20230804/AaveV2EthBUSDIR_20230804Test.t.sol:32:5:
   |
32 |     ReserveConfig memory configBUSDBefore = _findReserveConfigBySymbol(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> src/AaveV3_Met_SetEmissionManager_20232607/AaveV3_Met_SetEmissionManager_20232607.t.sol:28:5:
   |
28 |     ReserveConfig[] memory allConfigsBefore = createConfigurationSnapshot(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Warning (2072): Unused local variable.
  --> src/AaveV3_Met_SetEmissionManager_20232607/AaveV3_Met_SetEmissionManager_20232607.t.sol:37:5:
   |
37 |     ReserveConfig[] memory allConfigsAfter = createConfigurationSnapshot(
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

| Contract                                                               | Size (kB) | Margin (kB) |
|------------------------------------------------------------------------|-----------|-------------|
| AaveAvalancheTreasuryMigration_20230903                                | 3.335     | 21.241      |
| AaveGovernanceV2.0.8.17                                                | 0.086     | 24.49       |
| AaveGovernanceV2.0.8.19                                                | 0.086     | 24.49       |
| AaveGovernanceV2.0.8.21                                                | 0.086     | 24.49       |
| AaveMisc.0.8.17                                                        | 0.086     | 24.49       |
| AaveMisc.0.8.19                                                        | 0.086     | 24.49       |
| AaveMisc.0.8.21                                                        | 0.086     | 24.49       |
| AavePolygonTreasuryMigration_20230801                                  | 4.221     | 20.355      |
| AaveSafetyModule                                                       | 0.086     | 24.49       |
| AaveSwapper                                                            | 5.613     | 18.963      |
| AaveV2Avalanche.0.8.17                                                 | 0.086     | 24.49       |
| AaveV2Avalanche.0.8.19                                                 | 0.086     | 24.49       |
| AaveV2Avalanche.0.8.21                                                 | 0.086     | 24.49       |
| AaveV2AvalancheAssets.0.8.17                                           | 0.086     | 24.49       |
| AaveV2AvalancheAssets.0.8.19                                           | 0.086     | 24.49       |
| AaveV2AvalancheAssets.0.8.21                                           | 0.086     | 24.49       |
| AaveV2CRVRiskParams_20230621                                           | 0.336     | 24.24       |
| AaveV2DelegatesGasRebate_20230703                                      | 2.215     | 22.361      |
| AaveV2EthAGDGrantsPayload                                              | 0.566     | 24.01       |
| AaveV2EthBUSDIR_20230602                                               | 0.972     | 23.604      |
| AaveV2EthBUSDIR_20230804                                               | 2.343     | 22.233      |
| AaveV2EthFEIRiskParams_20230703                                        | 2.251     | 22.325      |
| AaveV2EthRatesUpdates_20230328_Payload                                 | 0.326     | 24.25       |
| AaveV2EthRiskParams_20230702                                           | 4.609     | 19.967      |
| AaveV2Ethereum.0.8.17                                                  | 0.086     | 24.49       |
| AaveV2Ethereum.0.8.19                                                  | 0.086     | 24.49       |
| AaveV2Ethereum.0.8.21                                                  | 0.086     | 24.49       |
| AaveV2EthereumAMM.0.8.17                                               | 0.086     | 24.49       |
| AaveV2EthereumAMM.0.8.19                                               | 0.086     | 24.49       |
| AaveV2EthereumAMM.0.8.21                                               | 0.086     | 24.49       |
| AaveV2EthereumAMMAssets.0.8.17                                         | 0.086     | 24.49       |
| AaveV2EthereumAMMAssets.0.8.19                                         | 0.086     | 24.49       |
| AaveV2EthereumAMMAssets.0.8.21                                         | 0.086     | 24.49       |
| AaveV2EthereumArc                                                      | 0.086     | 24.49       |
| AaveV2EthereumArcAssets                                                | 0.086     | 24.49       |
| AaveV2EthereumAssets.0.8.17                                            | 0.086     | 24.49       |
| AaveV2EthereumAssets.0.8.19                                            | 0.086     | 24.49       |
| AaveV2EthereumAssets.0.8.21                                            | 0.086     | 24.49       |
| AaveV2EthereumRatesUpdates_20230627                                    | 3.273     | 21.303      |
| AaveV2EthereumUpdate20231009Payload                                    | 3.286     | 21.29       |
| AaveV2FreezeReserves_20230619                                          | 1.106     | 23.47       |
| AaveV2FreezeReserves_20230627                                          | 0.281     | 24.295      |
| AaveV2Fuji                                                             | 0.086     | 24.49       |
| AaveV2FujiAssets                                                       | 0.086     | 24.49       |
| AaveV2Goerli                                                           | 0.086     | 24.49       |
| AaveV2GoerliAssets                                                     | 0.086     | 24.49       |
| AaveV2Mumbai                                                           | 0.086     | 24.49       |
| AaveV2MumbaiAssets                                                     | 0.086     | 24.49       |
| AaveV2PolRatesUpdates_20230328_Payload                                 | 0.326     | 24.25       |
| AaveV2Polygon.0.8.17                                                   | 0.086     | 24.49       |
| AaveV2Polygon.0.8.19                                                   | 0.086     | 24.49       |
| AaveV2Polygon.0.8.21                                                   | 0.086     | 24.49       |
| AaveV2PolygonAssets.0.8.17                                             | 0.086     | 24.49       |
| AaveV2PolygonAssets.0.8.19                                             | 0.086     | 24.49       |
| AaveV2PolygonAssets.0.8.21                                             | 0.086     | 24.49       |
| AaveV2PolygonIR_20230519                                               | 0.908     | 23.668      |
| AaveV2PolygonRatesUpdates_20230614                                     | 4.551     | 20.025      |
| AaveV2PolygonReserveFactorUpdate_20230717                              | 2.322     | 22.254      |
| AaveV2PolygonReserveFactorUpdate_20230828                              | 1.903     | 22.673      |
| AaveV2PolygonReserveFactorUpdate_20230920                              | 1.01      | 23.566      |
| AaveV2PriceFeedsUpdate_20230504_Payload                                | 0.63      | 23.946      |
| AaveV2PriceFeedsUpdate_20230613_Payload                                | 0.63      | 23.946      |
| AaveV2_Eth_AURA_OTC_Deal_20230508                                      | 1.67      | 22.906      |
| AaveV2_Eth_CRVAaveV2Ethereum_LTReduction_20230822                      | 0.334     | 24.242      |
| AaveV2_Eth_CRVLTUpdate_20230806                                        | 0.334     | 24.242      |
| AaveV2_Eth_CRVRiskParamsUpdate_20232507                                | 1.225     | 23.351      |
| AaveV2_Eth_CRV_OTC_Deal_20230508                                       | 2.015     | 22.561      |
| AaveV2_Eth_ServiceProviders_20231907                                   | 7.285     | 17.291      |
| AaveV2_Eth_TUSDOffboardingPlan_20233107                                | 1.542     | 23.034      |
| AaveV2_Eth_TreasuryManagement_20230308                                 | 6.704     | 17.872      |
| AaveV2_Ethereum_AaveTreasuryRWAAllocationPartI_20230925                | 1.044     | 23.532      |
| AaveV2_Ethereum_CRVAaveV2EthereumLTReduction_20230919                  | 0.334     | 24.242      |
| AaveV2_Ethereum_ChaosLabsRiskParameterUpdates_20230831                 | 5.232     | 19.344      |
| AaveV2_Ethereum_DAIParamsUpdates_20230817                              | 1.766     | 22.81       |
| AaveV2_Ethereum_TUSDOffboardingPlanPartII_20230925                     | 2.525     | 22.051      |
| AaveV3ACIProposal_20230411                                             | 0.705     | 23.871      |
| AaveV3ARBDFSFlashBorrowActivation                                      | 0.458     | 24.118      |
| AaveV3ARBMAIFixes_20230606                                             | 1.662     | 22.914      |
| AaveV3ARBMAIListing_20230425                                           | 3.596     | 20.98       |
| AaveV3ARBSupplyBorrowUpdate_20230427                                   | 3.019     | 21.557      |
| AaveV3AVASupplyBorrowUpdate_20230427                                   | 2.934     | 21.642      |
| AaveV3ArbCapsUpdates_20230508_Payload                                  | 2.953     | 21.623      |
| AaveV3ArbFraxListing_20230619                                          | 3.746     | 20.83       |
| AaveV3ArbListings_20230523_Payload                                     | 3.741     | 20.835      |
| AaveV3ArbListings_20230524_Payload                                     | 3.743     | 20.833      |
| AaveV3ArbMAICapsUpdates_20230724                                       | 3.306     | 21.27       |
| AaveV3ArbNativeUSDCListing_20230621                                    | 3.748     | 20.828      |
| AaveV3ArbPriceFeedsUpdate_20230504_Payload                             | 2.905     | 21.671      |
| AaveV3ArbPriceFeedsUpdate_20230613_Payload                             | 2.905     | 21.671      |
| AaveV3ArbRatesUpdates_20230307                                         | 4.564     | 20.012      |
| AaveV3ArbSupplyCapsUpdate_20230330                                     | 3.019     | 21.557      |
| AaveV3ArbUpdate20230327Payload                                         | 2.929     | 21.647      |
| AaveV3Arbitrum.0.8.17                                                  | 0.086     | 24.49       |
| AaveV3Arbitrum.0.8.19                                                  | 0.086     | 24.49       |
| AaveV3Arbitrum.0.8.21                                                  | 0.086     | 24.49       |
| AaveV3ArbitrumAssets.0.8.17                                            | 0.086     | 24.49       |
| AaveV3ArbitrumAssets.0.8.19                                            | 0.086     | 24.49       |
| AaveV3ArbitrumAssets.0.8.21                                            | 0.086     | 24.49       |
| AaveV3ArbitrumEModes.0.8.17                                            | 0.086     | 24.49       |
| AaveV3ArbitrumEModes.0.8.19                                            | 0.086     | 24.49       |
| AaveV3ArbitrumEModes.0.8.21                                            | 0.086     | 24.49       |
| AaveV3ArbitrumGoerli                                                   | 0.086     | 24.49       |
| AaveV3ArbitrumGoerliAssets                                             | 0.086     | 24.49       |
| AaveV3ArbitrumGoerliEModes                                             | 0.086     | 24.49       |
| AaveV3ArbitrumUpdate20231002wethPayload                                | 3.275     | 21.301      |
| AaveV3ArbwstETHCapsUpdates_20230703                                    | 2.953     | 21.623      |
| AaveV3AvaRatesUpdatesSteward_20230331                                  | 5.105     | 19.471      |
| AaveV3AvaRatesUpdates_20230322                                         | 3.246     | 21.33       |
| AaveV3Avalanche.0.8.17                                                 | 0.086     | 24.49       |
| AaveV3Avalanche.0.8.19                                                 | 0.086     | 24.49       |
| AaveV3Avalanche.0.8.21                                                 | 0.086     | 24.49       |
| AaveV3AvalancheAssets.0.8.17                                           | 0.086     | 24.49       |
| AaveV3AvalancheAssets.0.8.19                                           | 0.086     | 24.49       |
| AaveV3AvalancheAssets.0.8.21                                           | 0.086     | 24.49       |
| AaveV3AvalancheEModes.0.8.17                                           | 0.086     | 24.49       |
| AaveV3AvalancheEModes.0.8.19                                           | 0.086     | 24.49       |
| AaveV3AvalancheEModes.0.8.21                                           | 0.086     | 24.49       |
| AaveV3AvaxMAICapsUpdates_20230724                                      | 3.292     | 21.284      |
| AaveV3AvaxretrofundingPayload                                          | 1.123     | 23.453      |
| AaveV3Base                                                             | 0.086     | 24.49       |
| AaveV3BaseAssets                                                       | 0.086     | 24.49       |
| AaveV3BaseEModes                                                       | 0.086     | 24.49       |
| AaveV3ChaosLabsPaymentCollection_20230626                              | 0.411     | 24.165      |
| AaveV3ETHIsoMode_20230330                                              | 3.549     | 21.027      |
| AaveV3ETHSupplyBorrowUpdate_20230427                                   | 2.932     | 21.644      |
| AaveV3ETHrETHEmode_20230522                                            | 3.03      | 21.546      |
| AaveV3Eth1INCHListing_20230517_Payload                                 | 3.59      | 20.986      |
| AaveV3EthCBETHSupplyCapUpdate_20230328                                 | 2.929     | 21.647      |
| AaveV3EthDFSFlashBorrowActivation                                      | 0.458     | 24.118      |
| AaveV3EthENSListing_20230517_Payload                                   | 3.586     | 20.99       |
| AaveV3EthFraxListing_20230619                                          | 3.548     | 21.028      |
| AaveV3EthNewListings_20230321                                          | 5.149     | 19.427      |
| AaveV3EthRatesUpdates_20230328                                         | 3.24      | 21.336      |
| AaveV3EthRiskParams_20230529                                           | 3.832     | 20.744      |
| AaveV3EthUpdate20230322Payload                                         | 3.033     | 21.543      |
| AaveV3EthUpdate20230327Payload                                         | 3.032     | 21.544      |
| AaveV3Ethereum.0.8.17                                                  | 0.086     | 24.49       |
| AaveV3Ethereum.0.8.19                                                  | 0.086     | 24.49       |
| AaveV3Ethereum.0.8.21                                                  | 0.086     | 24.49       |
| AaveV3EthereumAssets.0.8.17                                            | 0.086     | 24.49       |
| AaveV3EthereumAssets.0.8.19                                            | 0.086     | 24.49       |
| AaveV3EthereumAssets.0.8.21                                            | 0.086     | 24.49       |
| AaveV3EthereumEModes.0.8.17                                            | 0.086     | 24.49       |
| AaveV3EthereumEModes.0.8.19                                            | 0.086     | 24.49       |
| AaveV3EthereumEModes.0.8.21                                            | 0.086     | 24.49       |
| AaveV3Fantom.0.8.17                                                    | 0.086     | 24.49       |
| AaveV3Fantom.0.8.19                                                    | 0.086     | 24.49       |
| AaveV3Fantom.0.8.21                                                    | 0.086     | 24.49       |
| AaveV3FantomAssets.0.8.17                                              | 0.086     | 24.49       |
| AaveV3FantomAssets.0.8.19                                              | 0.086     | 24.49       |
| AaveV3FantomAssets.0.8.21                                              | 0.086     | 24.49       |
| AaveV3FantomEModes.0.8.17                                              | 0.086     | 24.49       |
| AaveV3FantomEModes.0.8.19                                              | 0.086     | 24.49       |
| AaveV3FantomEModes.0.8.21                                              | 0.086     | 24.49       |
| AaveV3FantomTestnet                                                    | 0.086     | 24.49       |
| AaveV3FantomTestnetAssets                                              | 0.086     | 24.49       |
| AaveV3FantomTestnetEModes                                              | 0.086     | 24.49       |
| AaveV3Fuji                                                             | 0.086     | 24.49       |
| AaveV3FujiAssets                                                       | 0.086     | 24.49       |
| AaveV3FujiEModes                                                       | 0.086     | 24.49       |
| AaveV3GoerliGho                                                        | 0.086     | 24.49       |
| AaveV3GoerliGhoAssets                                                  | 0.086     | 24.49       |
| AaveV3GoerliGhoEModes                                                  | 0.086     | 24.49       |
| AaveV3Harmony.0.8.17                                                   | 0.086     | 24.49       |
| AaveV3Harmony.0.8.19                                                   | 0.086     | 24.49       |
| AaveV3Harmony.0.8.21                                                   | 0.086     | 24.49       |
| AaveV3HarmonyAssets.0.8.17                                             | 0.086     | 24.49       |
| AaveV3HarmonyAssets.0.8.19                                             | 0.086     | 24.49       |
| AaveV3HarmonyAssets.0.8.21                                             | 0.086     | 24.49       |
| AaveV3HarmonyEModes.0.8.17                                             | 0.086     | 24.49       |
| AaveV3HarmonyEModes.0.8.19                                             | 0.086     | 24.49       |
| AaveV3HarmonyEModes.0.8.21                                             | 0.086     | 24.49       |
| AaveV3Listings_20230403_Payload                                        | 3.587     | 20.989      |
| AaveV3Listings_20230413_Payload                                        | 4.185     | 20.391      |
| AaveV3LlamaProposal_20230803                                           | 1.385     | 23.191      |
| AaveV3Metis                                                            | 0.086     | 24.49       |
| AaveV3MetisAssets                                                      | 0.086     | 24.49       |
| AaveV3MetisEModes                                                      | 0.086     | 24.49       |
| AaveV3Mumbai                                                           | 0.086     | 24.49       |
| AaveV3MumbaiAssets                                                     | 0.086     | 24.49       |
| AaveV3MumbaiEModes                                                     | 0.086     | 24.49       |
| AaveV3OPEmode_20220622_Payload                                         | 0.88      | 23.696      |
| AaveV3OPListings_20230710_Payload                                      | 3.744     | 20.832      |
| AaveV3OPMAIFixes_20230606                                              | 1.662     | 22.914      |
| AaveV3OPMAIListing_20230425                                            | 3.596     | 20.98       |
| AaveV3OPNewListings_20230327                                           | 3.591     | 20.985      |
| AaveV3OPRiskParams_20230330                                            | 3.184     | 21.392      |
| AaveV3OPSupplyBorrowUpdate_20230427                                    | 3.03      | 21.546      |
| AaveV3OptDFSFlashBorrowActivation                                      | 0.458     | 24.118      |
| AaveV3OptMAICapsUpdates_20230724                                       | 3.306     | 21.27       |
| AaveV3OptPriceFeedsSentinelUpdate_20230504_Payload                     | 3.073     | 21.503      |
| AaveV3OptPriceFeedsUpdate_20230613_Payload                             | 2.905     | 21.671      |
| AaveV3OptRatesUpdates_20230307                                         | 4.143     | 20.433      |
| AaveV3Optimism.0.8.17                                                  | 0.086     | 24.49       |
| AaveV3Optimism.0.8.19                                                  | 0.086     | 24.49       |
| AaveV3Optimism.0.8.21                                                  | 0.086     | 24.49       |
| AaveV3OptimismAssets.0.8.17                                            | 0.086     | 24.49       |
| AaveV3OptimismAssets.0.8.19                                            | 0.086     | 24.49       |
| AaveV3OptimismAssets.0.8.21                                            | 0.086     | 24.49       |
| AaveV3OptimismEModes.0.8.17                                            | 0.086     | 24.49       |
| AaveV3OptimismEModes.0.8.19                                            | 0.086     | 24.49       |
| AaveV3OptimismEModes.0.8.21                                            | 0.086     | 24.49       |
| AaveV3OptimismGoerli                                                   | 0.086     | 24.49       |
| AaveV3OptimismGoerliAssets                                             | 0.086     | 24.49       |
| AaveV3OptimismGoerliEModes                                             | 0.086     | 24.49       |
| AaveV3OptimismUpdate20231002wethPayload                                | 3.262     | 21.314      |
| AaveV3POLSupplyBorrowUpdate_20230427                                   | 3.03      | 21.546      |
| AaveV3PolCRVRiskParams_20230702                                        | 3.03      | 21.546      |
| AaveV3PolCapsUpdate_20230421                                           | 2.932     | 21.644      |
| AaveV3PolCapsUpdates_20230328                                          | 3.079     | 21.497      |
| AaveV3PolCapsUpdates_20230418_Payload                                  | 2.956     | 21.62       |
| AaveV3PolCapsUpdates_20230503_Payload                                  | 2.956     | 21.62       |
| AaveV3PolCapsUpdates_20230508_Payload                                  | 3.144     | 21.432      |
| AaveV3PolCapsUpdates_20230518_Payload                                  | 2.946     | 21.63       |
| AaveV3PolCapsUpdates_20230610_Payload                                  | 3.081     | 21.495      |
| AaveV3PolMAICapsUpdates_20230724                                       | 3.305     | 21.271      |
| AaveV3PolPriceFeedsUpdate_20230504_Payload                             | 3.05      | 21.526      |
| AaveV3PolPriceFeedsUpdate_20230626_Payload                             | 2.904     | 21.672      |
| AaveV3PolRatesUpdates_20230307                                         | 5.868     | 18.708      |
| AaveV3PolRatesUpdates_20230328                                         | 3.239     | 21.337      |
| AaveV3PolRiskParams_20230423                                           | 3.513     | 21.063      |
| AaveV3Polygon.0.8.17                                                   | 0.086     | 24.49       |
| AaveV3Polygon.0.8.19                                                   | 0.086     | 24.49       |
| AaveV3Polygon.0.8.21                                                   | 0.086     | 24.49       |
| AaveV3PolygonAssets.0.8.17                                             | 0.086     | 24.49       |
| AaveV3PolygonAssets.0.8.19                                             | 0.086     | 24.49       |
| AaveV3PolygonAssets.0.8.21                                             | 0.086     | 24.49       |
| AaveV3PolygonEModes.0.8.17                                             | 0.086     | 24.49       |
| AaveV3PolygonEModes.0.8.19                                             | 0.086     | 24.49       |
| AaveV3PolygonEModes.0.8.21                                             | 0.086     | 24.49       |
| AaveV3PolygonSupplyCapStmatic_20230810                                 | 2.93      | 21.646      |
| AaveV3PolygonUpdate20231002maticPayload                                | 3.193     | 21.383      |
| AaveV3PriceFeedsUpdate_20230613_Payload                                | 2.905     | 21.671      |
| AaveV3RiskParams_20230516                                              | 3.031     | 21.545      |
| AaveV3RiskSteward_20230404                                             | 0.397     | 24.179      |
| AaveV3ScrollAlpha                                                      | 0.086     | 24.49       |
| AaveV3ScrollAlphaAssets                                                | 0.086     | 24.49       |
| AaveV3ScrollAlphaEModes                                                | 0.086     | 24.49       |
| AaveV3ScrollSepolia                                                    | 0.086     | 24.49       |
| AaveV3ScrollSepoliaAssets                                              | 0.086     | 24.49       |
| AaveV3ScrollSepoliaEModes                                              | 0.086     | 24.49       |
| AaveV3Sepolia                                                          | 0.086     | 24.49       |
| AaveV3SepoliaAssets                                                    | 0.086     | 24.49       |
| AaveV3SepoliaEModes                                                    | 0.086     | 24.49       |
| AaveV3StrategicAssets_20220622Payload                                  | 2.848     | 21.728      |
| AaveV3_Arb_ARBListing_20231207                                         | 3.757     | 20.819      |
| AaveV3_Arb_wstETH_CapsIncrease_20230908                                | 2.963     | 21.613      |
| AaveV3_Arbitrum_AddDebtSwapAdapterAsFlashBorrower_20230809             | 0.291     | 24.285      |
| AaveV3_Arbitrum_FreezeStewards_20230907                                | 0.333     | 24.243      |
| AaveV3_Arbitrum_StataTokenOperationalUpdate_20230815                   | 0.828     | 23.748      |
| AaveV3_Avalanche_AddDebtSwapAdapterAsFlashBorrower_20230809            | 0.291     | 24.285      |
| AaveV3_Avalanche_ChaosLabsRiskParameterUpdatesAaveV3Avalanche_20230918 | 3.361     | 21.215      |
| AaveV3_Avalanche_EnablingUSDTAsCollateralOnAaveV3AVAXMarket_20230926   | 3.317     | 21.259      |
| AaveV3_Avalanche_FreezeStewards_20230907                               | 0.333     | 24.243      |
| AaveV3_Avalanche_StataTokenOperationalUpdate_20230815                  | 0.828     | 23.748      |
| AaveV3_Base_AddDebtSwapAdapterAsFlashBorrower_20230809                 | 0.291     | 24.285      |
| AaveV3_Base_FreezeStewards_20230907                                    | 0.333     | 24.243      |
| AaveV3_Eth_AaveV3ListRPL_20230711                                      | 3.59      | 20.986      |
| AaveV3_Eth_AaveV3USDTRiskParams_20231107                               | 3.011     | 21.565      |
| AaveV3_Eth_BugBounty_20230710                                          | 1.095     | 23.481      |
| AaveV3_Eth_DisableCRVBorrows_20230508                                  | 3.026     | 21.55       |
| AaveV3_Ethereum_AaveBGDPhase2_20230828                                 | 3.272     | 21.304      |
| AaveV3_Ethereum_AaveImmunefiActivation_20230920                        | 0.274     | 24.302      |
| AaveV3_Ethereum_AddDebtSwapAdapterAsFlashBorrower_20230809             | 0.291     | 24.285      |
| AaveV3_Ethereum_ChaosLabsRiskParameterUpdates_AaveV3Ethereum_20230828  | 3.524     | 21.052      |
| AaveV3_Ethereum_ChaosLabsScopeAndCompensationAmendment_20230816        | 2.417     | 22.159      |
| AaveV3_Ethereum_ExpansionOfOrbit_20230925                              | 1.767     | 22.809      |
| AaveV3_Ethereum_FundGHOLiquidityCommittee_20230926                     | 1.747     | 22.829      |
| AaveV3_Ethereum_GHOBorrowRateUpdate_20230904                           | 0.326     | 24.25       |
| AaveV3_Ethereum_GHOFunding_20230926                                    | 2.636     | 21.94       |
| AaveV3_Ethereum_GhoFreezing_20230825                                   | 0.587     | 23.989      |
| AaveV3_Ethereum_KNCOnboardingOnAaveV3EthereumMarket_20231008           | 3.597     | 20.979      |
| AaveV3_Ethereum_LUSDCollateralActivation_20230811                      | 3.011     | 21.565      |
| AaveV3_Ethereum_MKRDebtCeiling_20230908                                | 3.032     | 21.544      |
| AaveV3_Ethereum_QuarterlyGasRebateDistributionAugust2023_20230906      | 1.625     | 22.951      |
| AaveV3_Ethereum_SDAIOnboarding_20230817                                | 4.189     | 20.387      |
| AaveV3_Ethereum_STGOnboardingOnAaveV3EthereumMarket_20231008           | 3.597     | 20.979      |
| AaveV3_Ethereum_SigmaPrimeAuditBudgetExtension_20230830                | 0.413     | 24.163      |
| AaveV3_Ethereum_StataTokenOperationalUpdate_20230815                   | 1.46      | 23.116      |
| AaveV3_Ethereum_VGHOImprovement_20230826                               | 3.835     | 20.741      |
| AaveV3_Met_SetEmissionManager_20232607                                 | 0.364     | 24.212      |
| AaveV3_Metis_FreezeStewards_20230907                                   | 0.333     | 24.243      |
| AaveV3_Opt_RiskParamsUpdate_20232408                                   | 3.194     | 21.382      |
| AaveV3_Opt_wstETH_CapsIncrease_20230908                                | 2.963     | 21.613      |
| AaveV3_Optimism_AddDebtSwapAdapterAsFlashBorrower_20230809             | 0.291     | 24.285      |
| AaveV3_Optimism_FreezeStewards_20230907                                | 0.333     | 24.243      |
| AaveV3_Optimism_OPRiskParametersUpdate_20230924                        | 3.25      | 21.326      |
| AaveV3_Optimism_StataTokenOperationalUpdate_20230815                   | 0.828     | 23.748      |
| AaveV3_Pol_CapsUpdate_20230608                                         | 2.966     | 21.61       |
| AaveV3_Pol_CapsUpdates_20231107_Payload                                | 2.956     | 21.62       |
| AaveV3_Pol_DisableCRVBorrows_20230508                                  | 3.025     | 21.551      |
| AaveV3_Pol_wstETH_CapsIncrease_20230908                                | 2.962     | 21.614      |
| AaveV3_Polygon_AddDebtSwapAdapterAsFlashBorrower_20230809              | 0.291     | 24.285      |
| AaveV3_Polygon_FreezeStewards_20230907                                 | 0.333     | 24.243      |
| AaveV3_Polygon_StataTokenOperationalUpdate_20230815                    | 0.828     | 23.748      |
| AaveV3_Polygon_SupplyCapLSTs_20230831                                  | 3.031     | 21.545      |
| Address.0.8.17                                                         | 0.086     | 24.49       |
| Address.0.8.19                                                         | 0.086     | 24.49       |
| Address.0.8.21                                                         | 0.086     | 24.49       |
| AgdAllowanceModification_20230817                                      | 1.848     | 22.728      |
| COWSwapper                                                             | 3.88      | 20.696      |
| COWTrader                                                              | 4.088     | 20.488      |
| CapsPlusRiskSteward                                                    | 2.609     | 21.967      |
| CapsPlusRiskStewardErrors                                              | 0.556     | 24.02       |
| ChainIds.0.8.17                                                        | 0.086     | 24.49       |
| ChainIds.0.8.19                                                        | 0.086     | 24.49       |
| ChainIds.0.8.21                                                        | 0.086     | 24.49       |
| ConfiguratorInputTypes.0.8.17                                          | 0.086     | 24.49       |
| ConfiguratorInputTypes.0.8.19                                          | 0.086     | 24.49       |
| ConfiguratorInputTypes.0.8.21                                          | 0.086     | 24.49       |
| DataTypes                                                              | 0.086     | 24.49       |
| DataTypes.0.8.17                                                       | 0.086     | 24.49       |
| DataTypes.0.8.19                                                       | 0.086     | 24.49       |
| DataTypes.0.8.21                                                       | 0.086     | 24.49       |
| DeployMainnetProposal                                                  | 0.086     | 24.49       |
| ERC1967Proxy                                                           | 0.177     | 24.399      |
| EngineFlags.0.8.17                                                     | 0.086     | 24.49       |
| EngineFlags.0.8.19                                                     | 0.086     | 24.49       |
| EngineFlags.0.8.21                                                     | 0.086     | 24.49       |
| Errors                                                                 | 4.714     | 19.862      |
| Errors.0.8.17                                                          | 3.952     | 20.624      |
| Errors.0.8.19                                                          | 3.952     | 20.624      |
| Errors.0.8.21                                                          | 3.952     | 20.624      |
| FreezingSteward                                                        | 0.715     | 23.861      |
| GhoInterestRateStrategy                                                | 0.724     | 23.852      |
| GovHelpers.0.8.17                                                      | 0.086     | 24.49       |
| GovHelpers.0.8.19                                                      | 0.086     | 24.49       |
| GovHelpers.0.8.21                                                      | 0.086     | 24.49       |
| GovernanceV3Arbitrum                                                   | 0.086     | 24.49       |
| GovernanceV3Avalanche                                                  | 0.086     | 24.49       |
| GovernanceV3Base                                                       | 0.086     | 24.49       |
| GovernanceV3Binance                                                    | 0.086     | 24.49       |
| GovernanceV3Ethereum                                                   | 0.086     | 24.49       |
| GovernanceV3Fuji                                                       | 0.086     | 24.49       |
| GovernanceV3Goerli                                                     | 0.086     | 24.49       |
| GovernanceV3Metis                                                      | 0.086     | 24.49       |
| GovernanceV3Mumbai                                                     | 0.086     | 24.49       |
| GovernanceV3Optimism                                                   | 0.086     | 24.49       |
| GovernanceV3Polygon                                                    | 0.086     | 24.49       |
| MockExecutor.0.8.17                                                    | 0.437     | 24.139      |
| MockExecutor.0.8.19                                                    | 0.437     | 24.139      |
| MockExecutor.0.8.21                                                    | 0.437     | 24.139      |
| MockReceiver                                                           | 0.899     | 23.677      |
| PayloadsControllerUtils                                                | 0.086     | 24.49       |
| ProxyAdmin                                                             | 1.683     | 22.893      |
| ProxyHelpers.0.8.17                                                    | 0.086     | 24.49       |
| ProxyHelpers.0.8.19                                                    | 0.086     | 24.49       |
| ProxyHelpers.0.8.21                                                    | 0.086     | 24.49       |
| ReserveConfiguration.0.8.17                                            | 0.171     | 24.405      |
| ReserveConfiguration.0.8.19                                            | 0.171     | 24.405      |
| ReserveConfiguration.0.8.21                                            | 0.171     | 24.405      |
| RewardsDataTypes                                                       | 0.086     | 24.49       |
| SafeERC20.0.8.17                                                       | 0.086     | 24.49       |
| SafeERC20.0.8.19                                                       | 0.086     | 24.49       |
| SafeERC20.0.8.21                                                       | 0.086     | 24.49       |
| StdStyle.0.8.17                                                        | 0.086     | 24.49       |
| StdStyle.0.8.19                                                        | 0.086     | 24.49       |
| StdStyle.0.8.21                                                        | 0.086     | 24.49       |
| StorageHelpers.0.8.17                                                  | 0.086     | 24.49       |
| StorageHelpers.0.8.19                                                  | 0.086     | 24.49       |
| StorageHelpers.0.8.21                                                  | 0.086     | 24.49       |
| StorageSlot                                                            | 0.086     | 24.49       |
| SwapFor80BAL20WETHPayload                                              | 5.788     | 18.788      |
| TokenAddresses                                                         | 3.399     | 21.177      |
| TokenLogicFunding_20230919                                             | 1.219     | 23.357      |
| TransparentUpgradeableProxy                                            | 2.081     | 22.495      |
| WadRayMath.0.8.17                                                      | 0.086     | 24.49       |
| WadRayMath.0.8.19                                                      | 0.086     | 24.49       |
| WadRayMath.0.8.21                                                      | 0.086     | 24.49       |
| console                                                                | 0.086     | 24.49       |
| console.0.8.17                                                         | 0.086     | 24.49       |
| console.0.8.19                                                         | 0.086     | 24.49       |
| console.0.8.21                                                         | 0.086     | 24.49       |
| console2.0.8.17                                                        | 0.086     | 24.49       |
| console2.0.8.19                                                        | 0.086     | 24.49       |
| console2.0.8.21                                                        | 0.086     | 24.49       |
| safeconsole.0.8.17                                                     | 0.086     | 24.49       |
| safeconsole.0.8.19                                                     | 0.086     | 24.49       |
| safeconsole.0.8.21                                                     | 0.086     | 24.49       |
| stdError.0.8.17                                                        | 0.591     | 23.985      |
| stdError.0.8.19                                                        | 0.591     | 23.985      |
| stdError.0.8.21                                                        | 0.591     | 23.985      |
| stdJson.0.8.17                                                         | 0.086     | 24.49       |
| stdJson.0.8.19                                                         | 0.086     | 24.49       |
| stdJson.0.8.21                                                         | 0.086     | 24.49       |
| stdMath.0.8.17                                                         | 0.086     | 24.49       |
| stdMath.0.8.19                                                         | 0.086     | 24.49       |
| stdMath.0.8.21                                                         | 0.086     | 24.49       |
| stdStorage.0.8.17                                                      | 0.086     | 24.49       |
| stdStorage.0.8.19                                                      | 0.086     | 24.49       |
| stdStorage.0.8.21                                                      | 0.086     | 24.49       |
| stdStorageSafe.0.8.17                                                  | 0.086     | 24.49       |
| stdStorageSafe.0.8.19                                                  | 0.086     | 24.49       |
| stdStorageSafe.0.8.21                                                  | 0.086     | 24.49       |
Test success 🌈
No files changed, compilation skipped

Running 1 test for src/20230926_AaveV3_Eth_GHOFunding/AaveV3_Ethereum_GHOFunding_20230926.t.sol:AaveV3_Ethereum_GHOFunding_20230926_Test
[PASS] testProposalExecution() (gas: 1432458)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 30.15s
 
Ran 1 test suites: 1 tests passed, 0 failed, 0 skipped (1 total tests)

sakulstra
sakulstra previously approved these changes Oct 14, 2023
import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol';
import {SafeERC20} from 'solidity-utils/contracts/oz-common/SafeERC20.sol';

interface aTokenV1 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this interface is not used anywhere and could be removed

Asset memory DAIv2 = Asset({
underlying: AaveV2EthereumAssets.DAI_UNDERLYING,
aToken: AaveV2EthereumAssets.DAI_A_TOKEN,
oracle: 0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9,
Copy link
Contributor

@rustboyar rustboyar Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not important, but AaveV3EthereumAssets.DAI_ORACLE could be used

rustboyar
rustboyar previously approved these changes Oct 16, 2023
use dai oracle address from aave-address-book
@defijesus defijesus dismissed stale reviews from rustboyar and sakulstra via 0fafb3c October 16, 2023 23:59
@sakulstra sakulstra merged commit 545b17d into bgd-labs:main Oct 17, 2023
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants