Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
83b245a
DRAFT: stable rate removal
kyzia551 Apr 23, 2024
cf0fec2
more cleanup
kyzia551 Apr 24, 2024
04d762a
fix backwords capability of getReserveData
kyzia551 Apr 24, 2024
57129ac
DRAFT: Add intensive init reserve tests
kyzia551 Apr 24, 2024
ebefc49
fix underlying decimals with bound
kyzia551 Apr 25, 2024
f2f6237
fix of test_reverts_initReserves_maxAssets test
kyzia551 Apr 25, 2024
0102427
add fuzing to notAdmin_initReserves test
kyzia551 Apr 26, 2024
109595d
Merge pull request #3 from bgd-labs/feat/improvment-init-reserve-tests
kyzia551 Apr 26, 2024
7925194
Merge branch 'v3.2.0' into feat/stable-rate-removal
kyzia551 Apr 26, 2024
bbb7aea
remove i from vars in flashLoan
kyzia551 Apr 26, 2024
9ec96c5
renamed stableBorrowRate back on ReserveDataLegacy
kyzia551 Apr 26, 2024
6d91b62
removed local vars in updateInterestRatesAndVirtualBalance
kyzia551 Apr 26, 2024
acd27e7
change require to not NONE in getDebtRepayAmount
kyzia551 Apr 26, 2024
305834e
remove unused comment
kyzia551 Apr 26, 2024
1c79784
feat: repo refactor
brotherlymite Apr 29, 2024
b77eb71
fix: lint
brotherlymite Apr 29, 2024
cab9796
chore: add reports dir
brotherlymite Apr 29, 2024
d25f6d9
Update src/core/contracts/protocol/pool/PoolConfigurator.sol
kyzia551 May 2, 2024
09dda76
Merge branch 'main' into feat/repo-reorg
brotherlymite May 6, 2024
03a0f73
chore: fix conflicts
brotherlymite May 6, 2024
0d47804
Merge branch 'v3.2.0' into feat/repo-reorg
brotherlymite May 6, 2024
9d80072
fix: remove static-a-token, config engine tests and the deployments
brotherlymite May 6, 2024
4d2b070
fix: tests
brotherlymite May 6, 2024
3244a5b
fix: lint
brotherlymite May 6, 2024
b6694d1
Merge pull request #5 from bgd-labs/feat/repo-reorg
brotherlymite May 6, 2024
6fb27f3
Merge branch 'v3.2.0' into feat/stable-rate-removal
kyzia551 May 7, 2024
f6e6ae6
remove outdated RatesOverflow
kyzia551 May 7, 2024
e7b9354
Merge branch 'main' into v3.2.0
kyzia551 May 7, 2024
db9698b
Merge branch 'v3.2.0' into feat/stable-rate-removal
kyzia551 May 7, 2024
35342e4
Merge branch 'main' into v3.2.0
kyzia551 Aug 14, 2024
d309f3e
Merge branch 'v3.2.0' into feat/stable-rate-removal
kyzia551 Aug 19, 2024
a9ee50a
updated InterestRates flag validation, tests
kyzia551 Aug 20, 2024
2a26198
helpers removal, stable debt test fix
kyzia551 Aug 20, 2024
07e503e
remove unused struct, cleanup
kyzia551 Aug 20, 2024
70f8834
removed unused error STABLE_DEBT_NOT_ZERO
kyzia551 Aug 20, 2024
1a15b4e
refactor: move static-a-token to extensions
brotherlymite Aug 20, 2024
8710e54
change error from DEPRECATED_BORROW_RATE_MODE to existing INVALID_INT…
kyzia551 Aug 21, 2024
0e71105
Merge pull request #36 from bgd-labs/fix/refactor
kyzia551 Aug 21, 2024
c699b1e
Merge branch 'v3.2.0' into feat/stable-rate-removal
kyzia551 Aug 21, 2024
9b90fb8
remove unused stable related events
kyzia551 Aug 21, 2024
489e897
update comments on ColldataLogic
kyzia551 Aug 23, 2024
2b43157
remove unrelated comment
kyzia551 Aug 23, 2024
9631de6
refactor: remove eModeOracle
sakulstra Aug 23, 2024
496cf89
feat: add borrowable in eMode
sakulstra Aug 23, 2024
08b1182
feat: multi eModes
sakulstra Aug 23, 2024
185918d
remove TODO, fix test_revert_flashloan_borrow_stable
kyzia551 Aug 26, 2024
3c56e13
typo: fix
sakulstra Aug 26, 2024
24de1df
fix: rename some things & update gas diff
sakulstra Aug 27, 2024
62aaf85
fix: improve tests
sakulstra Aug 27, 2024
a772a28
test: improve test coverage
sakulstra Aug 27, 2024
deadd2c
fix: add ui pool data provider method
sakulstra Aug 27, 2024
73e83a4
fix: lint code
sakulstra Aug 27, 2024
294dfef
feat: config engine refactor
sakulstra Aug 27, 2024
b24f5e7
fix: refactor testbase
sakulstra Aug 27, 2024
045e691
tests: improve tests
sakulstra Aug 27, 2024
92c9b0c
fix: push configurator patch
sakulstra Aug 28, 2024
9616047
fix: cleanup logic
sakulstra Aug 28, 2024
351d3f3
Update src/contracts/mocks/helpers/MockReserveConfiguration.sol
sakulstra Aug 29, 2024
99c3afc
fix: linting
sakulstra Aug 29, 2024
93cc1a6
fix: update gas diff
sakulstra Aug 29, 2024
8edfae9
Update tests/protocol/pool/Pool.EMode.sol
sakulstra Aug 29, 2024
10b46b8
fix lint
kyzia551 Aug 30, 2024
3b5dc5e
remove unused stableDebtToken field from the MarketReport struct
kyzia551 Aug 30, 2024
ee38602
oppimisation of if condition in calculateAvailableBorrows
kyzia551 Aug 30, 2024
3151bda
Merge branch 'feat/stable-rate-removal' into feat/eMode-umbrella
kyzia551 Aug 30, 2024
9081415
fix: remove unncessary import
sakulstra Aug 30, 2024
58971e5
fix: add deprecated note
sakulstra Aug 30, 2024
c21fc46
fix: remove unnecessary using
sakulstra Aug 30, 2024
2a2d185
remove unused deprecatedd events: StableDebtTokenUpgraded and Reserve…
kyzia551 Aug 30, 2024
c2d4ba1
removal of the borrowRate prameter on borrowETH and repayETH methods …
kyzia551 Aug 30, 2024
2544236
Merge branch 'feat/stable-rate-removal' into feat/eMode-umbrella
kyzia551 Aug 30, 2024
6954d19
fix: cleanup test base
sakulstra Aug 31, 2024
726069f
refactor: remove unnecessary _getConfigurationData
sakulstra Aug 31, 2024
e129ac9
fix: add notice about hole
sakulstra Aug 31, 2024
3716b69
fix: rename params as they are not masks themselfes
sakulstra Aug 31, 2024
304348d
fix: patch test
sakulstra Aug 31, 2024
be90691
feat: allow asset to be borrowable in eMode, while being non borrowable
sakulstra Sep 1, 2024
a8690a4
fix: improve tests
sakulstra Sep 1, 2024
c5af437
revert: add back the requirement on borrowable outside eMode
sakulstra Sep 2, 2024
01c3490
fix: rename mask to bitmap
sakulstra Sep 2, 2024
a3bd352
Update src/contracts/helpers/UiPoolDataProviderV3.sol
sakulstra Sep 2, 2024
03e8225
fix: improve docs
sakulstra Sep 2, 2024
a484911
fix: fix grammar
sakulstra Sep 3, 2024
6424af8
refactor: engine refactor (#44)
sakulstra Sep 11, 2024
9a72720
fix: oxorio #5 unused local variable
sakulstra Sep 8, 2024
477d9ed
fix: oxorio #4 - unnecessary casts
sakulstra Sep 8, 2024
78406a1
fix: oxorio #7 - align comment with code
sakulstra Sep 9, 2024
2741875
fix: oxorio #6 - ensure asset exists
sakulstra Sep 9, 2024
4fcf2d6
fix: enigma #4 - misc (#48)
sakulstra Sep 12, 2024
dbdb739
fix: enigma #1 (issue #3) - remove unnecessary allocation (#47)
sakulstra Sep 12, 2024
740d0a8
fix: add getEModes to interface (#46)
sakulstra Sep 12, 2024
55c9bc9
fix: resolve conflicts
sakulstra Sep 12, 2024
6ca352b
fix: merge back 3.2.0 & resolve conflicts
sakulstra Sep 12, 2024
5dc61d1
fix: add deprecated to interface (#53)
sakulstra Sep 16, 2024
47e89db
fix: skip if eMode is the same (#54)
sakulstra Sep 17, 2024
dd0bbec
refactor: add independent getters and setters for better backwards co…
sakulstra Sep 17, 2024
a1240df
fix: typo fixes (#59)
sakulstra Sep 19, 2024
ea10324
docs: migration guide (#52)
sakulstra Sep 19, 2024
cdd24e1
Merge branch 'feat/stable-rate-removal' into feat/eMode-umbrella
sakulstra Sep 19, 2024
0645793
Merge liquid eModes
sakulstra Sep 19, 2024
dd50736
Merge pull request #2 from bgd-labs/feat/stable-rate-removal
sakulstra Sep 19, 2024
4beb9b8
fix: resolve merge conflicts
sakulstra Sep 19, 2024
f02fcb2
refactor(configEngine): rename `asset` to `assets` for consistency wi…
sakulstra Sep 19, 2024
2d4f5a4
chore: bump revisions (#27)
sakulstra Sep 22, 2024
ea32100
feat: improve snapshots (#28)
sakulstra Sep 23, 2024
e8d17a5
fix: upgrade aave-cli
sakulstra Sep 23, 2024
fd4f033
feat: add updated coverage report (#31)
sakulstra Sep 24, 2024
be45428
feat: script (#32)
sakulstra Sep 24, 2024
d0c6da2
Merge branch 'main' into v3.2.0
sakulstra Sep 26, 2024
c5ef87e
chore(release): merge v3.2.0
sakulstra Sep 26, 2024
90a214a
refactor: return address instead of IERC20 for better ux
sakulstra Sep 26, 2024
024d61f
docs: add note about ir & deprecation of getReserveDataExtended (#34)
sakulstra Sep 30, 2024
712f1c3
test: adjust certora test suite to new directory structure (#30)
nisnislevi Sep 30, 2024
bda1fc5
fix: certora ci fix
nisnislevi Oct 1, 2024
7c6023e
docs: add audits, diffs and docs (#35)
sakulstra Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with: { java-version: "11", java-package: jre }

- name: Install certora cli
run: pip install certora-cli==7.0.7
run: pip install certora-cli==7.14.2

- name: Install solc
run: |
Expand All @@ -49,12 +49,12 @@ jobs:

- name: Verify rule ${{ matrix.rule }}
run: |
cd certora
cd certora/basic
touch applyHarness.patch
make munged
cd ..
cd ../..
echo "key length" ${#CERTORAKEY}
certoraRun certora/conf/${{ matrix.rule }} --wait_for_results
certoraRun certora/basic/conf/${{ matrix.rule }} --wait_for_results
env:
CERTORAKEY: ${{ secrets.CERTORAKEY }}

Expand All @@ -68,6 +68,8 @@ jobs:
- UserConfiguration.conf
- VariableDebtToken.conf
- NEW-pool-no-summarizations.conf
- stableRemoved.conf
- EModeConfiguration.conf
- NEW-pool-simple-properties.conf --rule cannotDepositInInactiveReserve --msg "cannotDepositInInactiveReserve"
- NEW-pool-simple-properties.conf --rule cannotDepositInFrozenReserve --msg "cannotDepositInFrozenReserve"
- NEW-pool-simple-properties.conf --rule cannotDepositZeroAmount --msg "cannotDepositZeroAmount"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/certora-stata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ jobs:
# - verifyERC4626.conf --rule previewWithdrawIndependentOfMaxWithdraw
- verifyERC4626MintDepositSummarization.conf --rule depositCheckIndexGRayAssert2 depositATokensCheckIndexGRayAssert2 depositWithPermitCheckIndexGRayAssert2 depositCheckIndexERayAssert2 depositATokensCheckIndexERayAssert2 depositWithPermitCheckIndexERayAssert2 mintCheckIndexGRayUpperBound mintCheckIndexGRayLowerBound mintCheckIndexEqualsRay
- verifyERC4626DepositSummarization.conf --rule depositCheckIndexGRayAssert1 depositATokensCheckIndexGRayAssert1 depositWithPermitCheckIndexGRayAssert1 depositCheckIndexERayAssert1 depositATokensCheckIndexERayAssert1 depositWithPermitCheckIndexERayAssert1
- verifyERC4626Extended.conf --rule previewWithdrawRoundingRange previewRedeemRoundingRange amountConversionPreserved sharesConversionPreserved accountsJoiningSplittingIsLimited convertSumOfAssetsPreserved previewDepositSameAsDeposit previewMintSameAsMint
- verifyERC4626Extended.conf --rule maxDepositConstant
- verifyERC4626Extended.conf --rule previewWithdrawRoundingRange previewRedeemRoundingRange amountConversionPreserved sharesConversionPreserved accountsJoiningSplittingIsLimited convertSumOfAssetsPreserved previewDepositSameAsDeposit previewMintSameAsMint maxDepositConstant
- verifyERC4626Extended.conf --rule redeemSum
- verifyERC4626Extended.conf --rule redeemATokensSum
- verifyAToken.conf --rule aTokenBalanceIsFixed_for_collectAndUpdateRewards aTokenBalanceIsFixed_for_claimRewards aTokenBalanceIsFixed_for_claimRewardsOnBehalf
Expand Down
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Parameters
Licensor: Aave DAO, represented by its governance smart contracts


Licensed Work: Aave v3.1
Licensed Work: Aave v3.2
The Licensed Work is (c) 2024 Aave DAO, represented by its governance smart contracts

Additional Use Grant: You are permitted to use, copy, and modify the Licensed Work, subject to
Expand All @@ -35,7 +35,7 @@ Additional Use Grant: You are permitted to use, copy, and modify the Licensed Wo

Change Date: The earlier of:
- 2027-03-06
- If specified, the date in the 'change-date' record on v31.aavelicense.eth
- If specified, the date in the 'change-date' record on v32.aavelicense.eth

Change License: MIT

Expand Down Expand Up @@ -114,4 +114,4 @@ other recipients of the licensed work to be provided by Licensor:

3. To specify a Change Date.

4. Not to modify this License in any other way.
4. Not to modify this License in any other way.
56 changes: 35 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,45 @@ update:; forge update
test :; forge test -vvv --no-match-contract DeploymentsGasLimits
test-contract :; forge test --match-contract ${filter} -vvv
test-watch :; forge test --watch -vvv --no-match-contract DeploymentsGasLimits
coverage :; forge coverage --report lcov && \
lcov --remove ./lcov.info -o ./lcov.info.p \
'scripts/*' \
'tests/*' \
'src/deployments/*' \
'src/periphery/contracts/v3-config-engine/*' \
'src/periphery/contracts/treasury/*' \
'src/periphery/contracts/dependencies/openzeppelin/ReentrancyGuard.sol' \
'src/periphery/contracts/misc/UiIncentiveDataProviderV3.sol' \
'src/periphery/contracts/misc/UiPoolDataProviderV3.sol' \
'src/periphery/contracts/misc/WalletBalanceProvider.sol' \
'src/periphery/contracts/mocks/*' \
'src/core/contracts/mocks/*' \
'src/core/contracts/dependencies/*' \
'src/core/contracts/misc/AaveProtocolDataProvider.sol' \
'src/core/contracts/protocol/libraries/configuration/*' \
'src/core/contracts/protocol/libraries/logic/GenericLogic.sol' \
'src/core/contracts/protocol/libraries/logic/ReserveLogic.sol' \
&& genhtml ./lcov.info.p -o report --branch-coverage \
&& coverage=$$(awk -F '[<>]' '/headerCovTableEntryHi/{print $3}' ./report/index.html | sed 's/[^0-9.]//g' | head -n 1); \

# Coverage
coverage-base :; forge coverage --report lcov --no-match-coverage "(scripts|tests|deployments|mocks)"
coverage-clean :; lcov --rc derive_function_end_line=0 --remove ./lcov.info -o ./lcov.info.p \
'src/contracts/extensions/v3-config-engine/*' \
'src/contracts/treasury/*' \
'src/contracts/dependencies/openzeppelin/ReentrancyGuard.sol' \
'src/contracts/helpers/UiIncentiveDataProviderV3.sol' \
'src/contracts/helpers/UiPoolDataProviderV3.sol' \
'src/contracts/helpers/WalletBalanceProvider.sol' \
'src/contracts/dependencies/*' \
'src/contracts/helpers/AaveProtocolDataProvider.sol' \
'src/contracts/protocol/libraries/configuration/*' \
'src/contracts/protocol/libraries/logic/GenericLogic.sol' \
'src/contracts/protocol/libraries/logic/ReserveLogic.sol'
coverage-report :; genhtml ./lcov.info.p -o report --branch-coverage --rc derive_function_end_line=0 --parallel
coverage-badge :; coverage=$$(awk -F '[<>]' '/headerCovTableEntryHi/{print $3}' ./report/index.html | sed 's/[^0-9.]//g' | head -n 1); \
wget -O ./report/coverage.svg "https://img.shields.io/badge/coverage-$${coverage}%25-brightgreen"
coverage :
make coverage-base
make coverage-clean
make coverage-report
make coverage-badge

# Utilities
download :; cast etherscan-source --chain ${chain} -d src/etherscan/${chain}_${address} ${address}
git-diff :
@mkdir -p diffs
@npx prettier ${before} ${after} --write
@printf '%s\n%s\n%s\n' "\`\`\`diff" "$$(git diff --no-index --diff-algorithm=patience --ignore-space-at-eol ${before} ${after})" "\`\`\`" > diffs/${out}.md
@printf '%s\n%s\n%s\n' "\`\`\`diff" "$$(git diff --no-index --ignore-space-at-eol ${before} ${after})" "\`\`\`" > diffs/${out}.md

# Deploy
deploy-libs-one :;
forge script scripts/misc/LibraryPreCompileOne.sol --rpc-url ${chain} --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify --slow --broadcast
deploy-libs-two :;
forge script scripts/misc/LibraryPreCompileTwo.sol --rpc-url ${chain} --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify --slow --broadcast

deploy-libs :
make deploy-libs-one chain=${chain}
npx catapulta-verify -b broadcast/LibraryPreCompileOne.sol/${chainId}/run-latest.json
make deploy-libs-two chain=${chain}
npx catapulta-verify -b broadcast/LibraryPreCompileTwo.sol/${chainId}/run-latest.json
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Aave V3.1 Origin
# Aave V3.2 Origin

![Aave v3.1 Origin_banner](./resources/v3-1-banner.jpeg)

Aave v3.1 complete codebase, Foundry-based.
Aave v3.2 complete codebase, Foundry-based.

[![Coverage badge](./report/coverage.svg)](https://aave-dao.github.io/aave-v3-origin)
<br>
Expand Down Expand Up @@ -42,6 +42,8 @@ bun install
- [Aave v3 technical Paper](./docs/Aave_V3_Technical_Paper.pdf)
- [v3 to v3.0.2 production upgrade](https://github.com/bgd-labs/proposal-3.0.2-upgrade/blob/main/README.md)
- [Aave v3.1 features](./docs/Aave-v3.1-features.md)
- [Aave v3.2 features](./docs/3.2/Aave-v3.2-features.md)
- [v3.1 to v3.2.0 production upgrade](https://github.com/bgd-labs/protocol-3.2.0-upgrade/blob/main/README.md)
- [Set Ltv to 0 on Freeze Feature State diagram](./docs/freeze-ltv0-states.png)

<br>
Expand Down Expand Up @@ -85,7 +87,22 @@ The following are the security procedures historically applied to Aave v3.X vers
- [MixBytes](./audits/02-05-2024_MixBytes_AaveV3.1.pdf)
- An internal review by [SterMi](https://twitter.com/stermi) on the virtual accounting feature was conducted on an initial phase of the codebase.
- [Cantina competition report](./audits/02-06-2024-Cantina-contest-AaveV3.1.pdf)
- Additionally, Certora properties have been improved over time since the Aave v3 release. More details [HERE](./certora/README.md).
- Additionally, Certora properties have been improved over time since the Aave v3 release. More details [HERE](./certora/basic/README.md).

<br>

**-> Aave v3.2 - September 2024**

#### Stable Rate and Liquid eModes

- [Certora](./audits/2024-09-10_Certora_Aave-v3.2_Stable_Rate_Removal.pdf)
- [Enigma Dark](./audits/2024-09-30_Enigma_Aave-v3.2.pdf)

#### Liquid eModes

- [Certora](./audits/2024-09-19_Certora_Aave-v3.2_Liquid_eModes.pdf)
- [Oxorio](./audits/2024-09-12_Oxorio_Aav3-v3.2.pdf)
- [Pashov](./audits/2024-09-15_Pashov_Aave-v3.2.pdf)

<br>

Expand Down
Binary file not shown.
Binary file added audits/2024-09-12_Oxorio_Aav3-v3.2.pdf
Binary file not shown.
Binary file added audits/2024-09-15_Pashov_Aave-v3.2.pdf
Binary file not shown.
Binary file not shown.
Binary file added audits/2024-09-30_Enigma_Aave-v3.2.pdf
Binary file not shown.
24 changes: 24 additions & 0 deletions certora/basic/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
default: help

PATCH = applyHarness.patch
CONTRACTS_DIR = ../../src/
MUNGED_DIR = munged

help:
@echo "usage:"
@echo " make clean: remove all generated files (those ignored by git)"
@echo " make $(MUNGED_DIR): create $(MUNGED_DIR) directory by applying the patch file to $(CONTRACTS_DIR)"
@echo " make record: record a new patch file capturing the differences between $(CONTRACTS_DIR) and $(MUNGED_DIR)"

munged: $(wildcard $(CONTRACTS_DIR)/*.sol) $(PATCH)
rm -rf $@
cp -r $(CONTRACTS_DIR) $@
patch -p0 -d $@ < $(PATCH)

record:
diff -ruN $(CONTRACTS_DIR) $(MUNGED_DIR) | sed 's+\.\./src/++g' | sed 's+munged/++g' > $(PATCH)

clean:
git clean -fdX
touch $(PATCH)

File renamed without changes.
20 changes: 10 additions & 10 deletions certora/applyHarness.patch → certora/basic/applyHarness.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
diff -ruN core/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol core/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol
--- core/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol 2024-03-27 12:57:15.497294747 +0200
+++ core/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol 2024-03-27 13:08:22.155984803 +0200
diff -ruN contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol
--- contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol 2024-03-27 12:57:15.497294747 +0200
+++ contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol 2024-03-27 13:08:22.155984803 +0200
@@ -34,7 +34,7 @@
}

/// @inheritdoc IScaledBalanceToken
- function scaledBalanceOf(address user) external view override returns (uint256) {
+ function scaledBalanceOf(address user) public view override returns (uint256) {
return super.balanceOf(user);
}
diff -ruN core/instances/ATokenInstance.sol core/instances/ATokenInstance.sol
--- core/instances/ATokenInstance.sol 2024-03-27 12:57:15.497294747 +0200
+++ core/instances/ATokenInstance.sol 2024-03-27 13:14:17.971198372 +0200

diff -ruN contracts/instances/ATokenInstance.sol contracts/instances/ATokenInstance.sol
--- contracts/instances/ATokenInstance.sol 2024-03-27 12:57:15.497294747 +0200
+++ contracts/instances/ATokenInstance.sol 2024-03-27 13:14:17.971198372 +0200
@@ -35,15 +35,15 @@

_domainSeparator = _calculateDomainSeparator();

- emit Initialized(
- underlyingAsset,
- address(POOL),
Expand Down
16 changes: 16 additions & 0 deletions certora/basic/conf/AToken.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"files": [
"certora/basic/harness/ATokenHarness.sol",
"certora/basic/harness/SimpleERC20.sol"
],
"link": [
"ATokenHarness:_underlyingAsset=SimpleERC20"
],
"rule_sanity": "basic", // from time to time, use "advanced" instead of "basic".
"optimistic_loop": true,
"process": "emv",
"solc": "solc8.19",
"verify": "ATokenHarness:certora/basic/specs/AToken.spec",
"build_cache": true,
"msg": "aToken spec"
}
14 changes: 14 additions & 0 deletions certora/basic/conf/EModeConfiguration.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"files": [
"certora/basic/harness/EModeConfigurationHarness.sol"
],
"msg": "EModeConfiguration",
"optimistic_loop": true,
"process": "emv",
// "prover_args": [],
"precise_bitwise_ops": true,
"rule_sanity": "basic", // from time to time, use "advanced" instead of "basic"
"solc": "solc8.19",
"build_cache": true,
"verify": "EModeConfigurationHarness:certora/basic/specs/EModeConfiguration.spec"
}
40 changes: 40 additions & 0 deletions certora/basic/conf/NEW-pool-no-summarizations.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"files": [
"certora/basic/harness/ATokenHarness.sol",
"certora/basic/harness/PoolHarness.sol",
"certora/basic/harness/SimpleERC20.sol",
"src/contracts/instances/VariableDebtTokenInstance.sol",
"src/contracts/helpers/AaveProtocolDataProvider.sol",
"src/contracts/misc/DefaultReserveInterestRateStrategyV2.sol",
"src/contracts/protocol/configuration/ACLManager.sol",
"src/contracts/misc/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol",
"src/contracts/misc/PriceOracleSentinel.sol",
"src/contracts/protocol/configuration/PoolAddressesProvider.sol",
],
"link": [
"ATokenHarness:POOL=PoolHarness",
"ATokenHarness:_underlyingAsset=SimpleERC20",
"PoolHarness:ADDRESSES_PROVIDER=PoolAddressesProvider",
"AaveProtocolDataProvider:ADDRESSES_PROVIDER=PoolAddressesProvider",
],
"struct_link": [
"PoolHarness:aTokenAddress=ATokenHarness",
"PoolHarness:variableDebtTokenAddress=VariableDebtTokenInstance",
"PoolHarness:interestRateStrategyAddress=DefaultReserveInterestRateStrategyV2",
],
"rule_sanity": "basic", // from time to time, use advanced instead of basic, it gives more insight on requires, vacuity rules etc.
"optimistic_loop": true,
"process": "emv",
"global_timeout": "7198",
"prover_args": ["-depth 11"], // If reachability passes and the time is ok, this number is ok, dont touch it.
"solc": "solc8.19",
"verify": "PoolHarness:certora/basic/specs/NEW-pool-no-summarizations.spec",
"rule": [
"liquidityIndexNonDecresingFor_cumulateToLiquidityIndex",
"depositUpdatesUserATokenSuperBalance",
"depositCannotChangeOthersATokenSuperBalance"
],
"build_cache": true,
"parametric_contracts": ["PoolHarness"],
"msg": "pool-no-summarizations::partial rules",
}
32 changes: 32 additions & 0 deletions certora/basic/conf/NEW-pool-simple-properties.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"files": [
"certora/basic/harness/ATokenHarness.sol",
"certora/basic/harness/PoolHarness.sol",
"certora/basic/harness/SimpleERC20.sol",
"src/contracts/instances/VariableDebtTokenInstance.sol",
"src/contracts/helpers/AaveProtocolDataProvider.sol",
"src/contracts/misc/DefaultReserveInterestRateStrategyV2.sol",
"src/contracts/protocol/libraries/types/DataTypes.sol",
"src/contracts/protocol/configuration/PoolAddressesProvider.sol",
],
"link": [
"ATokenHarness:POOL=PoolHarness",
"ATokenHarness:_underlyingAsset=SimpleERC20",
"PoolHarness:ADDRESSES_PROVIDER=PoolAddressesProvider",
],
"struct_link": [
"PoolHarness:aTokenAddress=ATokenHarness",
"PoolHarness:variableDebtTokenAddress=VariableDebtTokenInstance",
"PoolHarness:interestRateStrategyAddress=DefaultReserveInterestRateStrategyV2",
],
"rule_sanity": "basic", // from time to time, use advanced instead of basic, it gives more insight on requires, vacuity rules etc.
"optimistic_loop": true,
"process": "emv",
"prover_args": ["-depth 12"], // If reachability passes and the time is ok, this number is ok, dont touch it.
"solc": "solc8.19",
"verify": "PoolHarness:certora/basic/specs/NEW-pool-simple-properties.spec",
"build_cache": true,
"parametric_contracts": ["PoolHarness"],
"smt_timeout": "6000",
"msg": "pool-simple-properties::ALL",
}
16 changes: 16 additions & 0 deletions certora/basic/conf/ReserveConfiguration.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"files": [
"certora/basic/harness/ReserveConfigurationHarness.sol"
],
"msg": "ReserveConfiguration",
"optimistic_loop": true,
"process": "emv",
// "prover_args": [
// "-precise_bitwise_ops"
//],
"precise_bitwise_ops": true,
"rule_sanity": "basic", // from time to time, use "advanced" instead of "basic"
"solc": "solc8.19",
"build_cache": true,
"verify": "ReserveConfigurationHarness:certora/basic/specs/ReserveConfiguration.spec"
}
17 changes: 17 additions & 0 deletions certora/basic/conf/UserConfiguration.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"files": [
"certora/basic/harness/UserConfigurationHarness.sol"
],
// No rule sanity because a there are invariant s.t. the invariant can be proven
// without assuming it first. (for some of the functions.)
"msg": "UserConfiguration All spec",
"optimistic_loop": true,
"process": "emv",
// "prover_args": [
// "-precise_bitwise_ops"
//],
"precise_bitwise_ops": true,
"solc": "solc8.19",
"build_cache": true,
"verify": "UserConfigurationHarness:certora/basic/specs/UserConfiguration.spec"
}
12 changes: 12 additions & 0 deletions certora/basic/conf/VariableDebtToken.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"files": [
"certora/basic/harness/VariableDebtTokenHarness.sol"
],
"rule_sanity": "basic", // from time to time, use advanced instead of basic, it gives more insight on requires, vacuity rules etc.
"msg": "variable debt token",
"optimistic_loop": true,
"process": "emv",
"solc": "solc8.19",
"build_cache": true,
"verify": "VariableDebtTokenHarness:certora/basic/specs/VariableDebtToken.spec"
}
Loading
Loading