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

3.0.1 Upgrade #701

Merged
merged 114 commits into from
Dec 28, 2022
Merged

3.0.1 Upgrade #701

merged 114 commits into from
Dec 28, 2022

Conversation

The-3D
Copy link
Contributor

@The-3D The-3D commented Aug 8, 2022

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

@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2022

Codecov Report

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

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.

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

The-3D and others added 18 commits August 8, 2022 17:13
Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
…n.sol

Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
…n.sol

Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
…n.sol

Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
…n.sol

Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>
miguelmtzinf and others added 11 commits December 7, 2022 18:20
Fix the handleAction of the IncentivesController interface
* fix: Soften solidity version of DataTypes libraries

* "Soft" Solidity to ^0.8.0 on libraries/math, libraries/configuration and libraries/helpers

Co-authored-by: eboado <ebdmrr@gmail.com>
…aProvider (#766)

* fix: Complete interfaces of IReserveInterestRateStrategy and IPoolDataProvider (#763)

* feat: complete interface & use inheritdoc

* Added missing functions on IReserveInterestRateStrategy and inheritdoc on DefaultInterestRateStrategy

* fix: added missing overrides, docs for constructor and added ADDRESSES_PROVIDER to interface

* fix: sepparated interest rate strategy interface into default and rate interfaces

* fix: added visibility to false rule

* fix: minor fixes

* fix: fixed natspec. Fixed import order

* Update contracts/interfaces/IDefaultInterestRateStrategy.sol

* Apply suggestions from code review

* Apply suggestions from code review

* fix: fixed correct import order

Co-authored-by: eboado <ebdmrr@gmail.com>
Co-authored-by: sendra <polsendra@gmail.com>
Co-authored-by: sendra <sendra@users.noreply.github.com>
Co-authored-by: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com>

* fix: Fix format of multiple contracts

Co-authored-by: Lukas <lukasstrassel@googlemail.com>
Co-authored-by: eboado <ebdmrr@gmail.com>
Co-authored-by: sendra <polsendra@gmail.com>
Co-authored-by: sendra <sendra@users.noreply.github.com>
* docs: Fix typo in the closing part of multiline natspec docs
miguelmtzinf and others added 6 commits December 14, 2022 22:29
Fixes IAToken.transferUnderlyingTo function params
#773)

* test: Add fail test case for wrong IR calculation with 0 unbackedCap

* fix: Fix IR calculation to account for correct unbacked amount
…d `_updateIndexes` (#754) (#768)

* Added clarification on getReserveNormalizedVariableDebt() in IPool
* Updated docs on getReserveNormalizedVariableDebt IPool
@miguelmtzinf
Copy link
Contributor

miguelmtzinf commented Dec 19, 2022

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

  1. Return unbacked amount
  1. Improvement of CEI, reducing reentrancy risk (even for not covered ERC777)
  1. Add config param for if an asset is "flash loanable" or not
  1. Remove the blocker for borrow and repay in the same action
  1. Fix bug in edge case of liquidation
  1. Fix the problem with 100% reserve factor
  1. Fix accounting bug on flash loan and back unbacked fees
  1. Misc typos
  1. Soften the Solidity version to ^0.8.0
  1. Make interest rate strategy inheritable
    Make DefaultInterestRateStrategy contract inheritable #721
  2. Fix the problem with events emission on a/v tokens
  1. Optimization of state updates (skip if same timestamp)
  1. Completion of interfaces for PoolDataProvider and AaveProtocolDataProvider
  1. Fix calculation of interest rates with non-zero unbacked and zero unbackedMintCap
  1. Capitalize license names of contracts
  1. Minimize the IAaveIncentivesController to comply with Rewards V3 contract
  1. Include additional parameter for onBehalfOf at AToken handleRepayment

kartojal and others added 5 commits December 20, 2022 10:05
…be extended (#774)

* Make aToken.initialize public and virtual so it can be extended

* Make aToken._transfer virtual so it can be extended

* Make AToken._transfer/3 virtual for consistency
* Add sigmaprime audit report
* Add exact commit to introduction along with PR number
* Update report to version 2.0 to incorporate retesting
* Add context to the introduction about the additional testing
* Tidy up report and change date in file name to today
@miguelmtzinf
Copy link
Contributor

Merging this branch since the work for 3.0.1 has been finalized 👍 👍
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet