aave-v3-core icon indicating copy to clipboard operation
aave-v3-core copied to clipboard

[DRAFT] 3.0.1 Upgrade

Open The-3D opened this issue 2 years ago • 1 comments

This PR upgrades the Aave V3 code to version 3.0.1.

Applied changes:

  • Fixed issues with Atokens transfer events not being ERC20 compliant
  • Fixed potential reentrancy on withrdraw and liquidations in case reentrant tokens are being used as collateral
  • Removes same transaction borrow/repay check

The-3D avatar Aug 08 '22 08:08 The-3D

Codecov Report

Base: 99.95% // Head: 99.65% // Decreases project coverage by -0.30% :warning:

Coverage data is based on head (ee7d556) compared to base (f3e037b). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #701      +/-   ##
==========================================
- Coverage   99.95%   99.65%   -0.31%     
==========================================
  Files          45       45              
  Lines        2134     2300     +166     
  Branches      283      421     +138     
==========================================
+ Hits         2133     2292     +159     
- Misses          1        8       +7     
Impacted Files Coverage Δ
contracts/misc/AaveOracle.sol 100.00% <ø> (ø)
...s/protocol/configuration/PoolAddressesProvider.sol 100.00% <ø> (ø)
...ol/configuration/PoolAddressesProviderRegistry.sol 100.00% <ø> (ø)
...cts/protocol/configuration/PriceOracleSentinel.sol 100.00% <ø> (ø)
...ies/aave-upgradeability/VersionedInitializable.sol 100.00% <ø> (ø)
...ocol/libraries/configuration/UserConfiguration.sol 100.00% <ø> (ø)
contracts/protocol/libraries/helpers/Helpers.sol 100.00% <ø> (ø)
...cts/protocol/libraries/logic/ConfiguratorLogic.sol 100.00% <ø> (ø)
contracts/protocol/libraries/logic/EModeLogic.sol 100.00% <ø> (ø)
...ontracts/protocol/libraries/logic/GenericLogic.sol 100.00% <ø> (ø)
... and 48 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Aug 08 '22 14:08 codecov-commenter

To recap on what is included here:

  1. Return unbacked amount https://github.com/aave/aave-v3-core/pull/683
  2. Improvement of CEI, reducing reentrancy risk (even for not covered ERC777) https://github.com/aave/aave-v3-core/pull/704
  3. Add config param for if an asset is "flash loanable" or not https://github.com/aave/aave-v3-core/pull/710
  4. Remove the blocker for borrow and repay in the same action https://github.com/aave/aave-v3-core/pull/705
  5. Fix bug in edge case of liquidation https://github.com/aave/aave-v3-core/pull/709
  6. Fix the problem with 100% reserve factor https://github.com/aave/aave-v3-core/pull/724
  7. Fix accounting bug on flash loan and back unbacked fees https://github.com/aave/aave-v3-core/pull/733
  8. Misc typos https://github.com/aave/aave-v3-core/pull/728
  9. Soften the Solidity version to ^0.8.0 https://github.com/aave/aave-v3-core/pull/720
  10. Make interest rate strategy inheritable https://github.com/aave/aave-v3-core/pull/721
  11. Fix the problem with events emission on a/v tokens https://github.com/aave/aave-v3-core/pull/682
  12. Optimization of state updates (skip if same timestamp) https://github.com/aave/aave-v3-core/pull/725

(props to @miguelmtzinf for the initial recap)

eboadom avatar Nov 16 '22 09:11 eboadom

Thanks @eboadom @kyzia551 and all BGD for the effort

miguelmtzinf avatar Nov 16 '22 09:11 miguelmtzinf

Recap of the changes that have been applied in this PR for now:

  1. Return unbacked amount
  • https://github.com/aave/aave-v3-core/pull/683
  1. Improvement of CEI, reducing reentrancy risk (even for not covered ERC777)
  • https://github.com/aave/aave-v3-core/pull/704
  1. Add config param for if an asset is "flash loanable" or not
  • https://github.com/aave/aave-v3-core/pull/710
  1. Remove the blocker for borrow and repay in the same action
  • https://github.com/aave/aave-v3-core/pull/705
  1. Fix bug in edge case of liquidation
  • https://github.com/aave/aave-v3-core/pull/709
  • https://github.com/aave/aave-v3-core/pull/747
  • https://github.com/aave/aave-v3-core/pull/753
  1. Fix the problem with 100% reserve factor
  • https://github.com/aave/aave-v3-core/pull/724
  • https://github.com/aave/aave-v3-core/pull/768
  1. Fix accounting bug on flash loan and back unbacked fees
  • https://github.com/aave/aave-v3-core/pull/733
  1. Misc typos
  • https://github.com/aave/aave-v3-core/pull/728
  • https://github.com/aave/aave-v3-core/pull/752
  • https://github.com/aave/aave-v3-core/pull/764
  • https://github.com/aave/aave-v3-core/pull/771
  1. Soften the Solidity version to ^0.8.0
  • https://github.com/aave/aave-v3-core/pull/720
  • https://github.com/aave/aave-v3-core/pull/762
  1. Make interest rate strategy inheritable https://github.com/aave/aave-v3-core/pull/721
  2. Fix the problem with events emission on a/v tokens
  • https://github.com/aave/aave-v3-core/pull/682
  • https://github.com/aave/aave-v3-core/pull/745
  • https://github.com/aave/aave-v3-core/pull/751
  • https://github.com/aave/aave-v3-core/pull/759
  1. Optimization of state updates (skip if same timestamp)
  • https://github.com/aave/aave-v3-core/pull/725
  1. Completion of interfaces for PoolDataProvider and AaveProtocolDataProvider
  • https://github.com/aave/aave-v3-core/pull/766
  • https://github.com/aave/aave-v3-core/pull/763
  1. Fix calculation of interest rates with non-zero unbacked and zero unbackedMintCap
  • https://github.com/aave/aave-v3-core/pull/773
  1. Capitalize license names of contracts
  • https://github.com/aave/aave-v3-core/pull/765
  • https://github.com/aave/aave-v3-core/pull/769
  1. Minimize the IAaveIncentivesController to comply with Rewards V3 contract
  • https://github.com/aave/aave-v3-core/pull/761
  1. Include additional parameter for onBehalfOf at AToken handleRepayment
  • https://github.com/aave/aave-v3-core/pull/743

miguelmtzinf avatar Dec 19 '22 10:12 miguelmtzinf

Merging this branch since the work for 3.0.1 has been finalized :+1: :+1:
Certora's audit report and CI checks will be added in a separate PR.

Thanks all for the great work made here! @The-3D @eboadom @kyzia551 @stevenvaleri @kartojal and other community contributors

miguelmtzinf avatar Dec 28 '22 15:12 miguelmtzinf