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

V3.2.0 #59

Closed
wants to merge 109 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 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
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
  •  
  •  
  •  
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
20 changes: 10 additions & 10 deletions certora/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: 7 additions & 9 deletions certora/conf/NEW-pool-no-summarizations.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
"files": [
"certora/harness/ATokenHarness.sol",
"certora/harness/PoolHarness.sol",
"certora/harness/StableDebtTokenHarness.sol",
"certora/harness/SimpleERC20.sol",
"src/core/instances/VariableDebtTokenInstance.sol",
"src/core/contracts/misc/AaveProtocolDataProvider.sol",
"src/core/contracts/protocol/pool/DefaultReserveInterestRateStrategyV2.sol",
"src/core/contracts/protocol/configuration/ACLManager.sol",
"src/core/contracts/protocol/libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol",
"src/core/contracts/protocol/configuration/PriceOracleSentinel.sol",
"src/core/contracts/protocol/configuration/PoolAddressesProvider.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",
Expand All @@ -20,7 +19,6 @@
],
"struct_link": [
"PoolHarness:aTokenAddress=ATokenHarness",
"PoolHarness:stableDebtTokenAddress=StableDebtTokenHarness",
"PoolHarness:variableDebtTokenAddress=VariableDebtTokenInstance",
"PoolHarness:interestRateStrategyAddress=DefaultReserveInterestRateStrategyV2",
],
Expand Down
12 changes: 5 additions & 7 deletions certora/conf/NEW-pool-simple-properties.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
"files": [
"certora/harness/ATokenHarness.sol",
"certora/harness/PoolHarness.sol",
"certora/harness/StableDebtTokenHarness.sol",
"certora/harness/SimpleERC20.sol",
"src/core/instances/VariableDebtTokenInstance.sol",
"src/core/contracts/misc/AaveProtocolDataProvider.sol",
"src/core/contracts/protocol/pool/DefaultReserveInterestRateStrategyV2.sol",
"src/core/contracts/protocol/libraries/types/DataTypes.sol",
"src/core/contracts/protocol/configuration/PoolAddressesProvider.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",
Expand All @@ -17,7 +16,6 @@
],
"struct_link": [
"PoolHarness:aTokenAddress=ATokenHarness",
"PoolHarness:stableDebtTokenAddress=StableDebtTokenHarness",
"PoolHarness:variableDebtTokenAddress=VariableDebtTokenInstance",
"PoolHarness:interestRateStrategyAddress=DefaultReserveInterestRateStrategyV2",
],
Expand Down
19 changes: 0 additions & 19 deletions certora/conf/StableDebtToken.conf

This file was deleted.

12 changes: 6 additions & 6 deletions certora/harness/ATokenHarness.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.19;

import {Pool} from '../munged/core/contracts/protocol/pool/Pool.sol';
import {ATokenInstance} from '../munged/core/instances/ATokenInstance.sol';
import {WadRayMath} from '../munged/core/contracts/protocol/libraries/math/WadRayMath.sol';
import {ScaledBalanceTokenBase} from '../munged/core/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol';
import {IScaledBalanceToken} from '../munged/core/contracts/interfaces/IScaledBalanceToken.sol';
import {Pool} from '../munged/contracts/protocol/pool/Pool.sol';
import {ATokenInstance} from '../munged/contracts/instances/ATokenInstance.sol';
import {WadRayMath} from '../munged/contracts/protocol/libraries/math/WadRayMath.sol';
import {ScaledBalanceTokenBase} from '../munged/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol';
import {IScaledBalanceToken} from '../munged/contracts/interfaces/IScaledBalanceToken.sol';

/**
/*
* @title Certora harness for Aave ERC20 AToken
*
* @dev Certora's harness contract for the verification of Aave ERC20 AToken.
Expand Down
19 changes: 7 additions & 12 deletions certora/harness/PoolHarness.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.19;

import {PoolInstance} from '../munged/core/instances/PoolInstance.sol';
import {DataTypes} from '../munged/core/contracts/protocol/libraries/types/DataTypes.sol';
import {ReserveLogic} from '../munged/core/contracts/protocol/libraries/logic/ReserveLogic.sol';
import {IPoolAddressesProvider} from '../munged/core/contracts/interfaces/IPoolAddressesProvider.sol';
import {PoolInstance} from '../munged/contracts/instances/PoolInstance.sol';
import {DataTypes} from '../munged/contracts/protocol/libraries/types/DataTypes.sol';
import {ReserveLogic} from '../munged/contracts/protocol/libraries/logic/ReserveLogic.sol';
import {IPoolAddressesProvider} from '../munged/contracts/interfaces/IPoolAddressesProvider.sol';

import {IERC20} from '../../src/core/contracts/dependencies/openzeppelin/contracts/IERC20.sol';
import {ReserveConfiguration} from '../munged/core/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';
import {IERC20} from '../../src/contracts/dependencies/openzeppelin/contracts/IERC20.sol';
import {ReserveConfiguration} from '../munged/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';

contract PoolHarness is PoolInstance {
using ReserveLogic for DataTypes.ReserveData;
Expand All @@ -23,8 +23,7 @@ contract PoolHarness is PoolInstance {

function getTotalDebt(address asset) public view returns (uint256) {
uint256 totalVariable = IERC20(_reserves[asset].variableDebtTokenAddress).totalSupply();
uint256 totalStable = IERC20(_reserves[asset].stableDebtTokenAddress).totalSupply();
return totalVariable + totalStable;
return totalVariable;
}

function getTotalATokenSupply(address asset) public view returns (uint256) {
Expand All @@ -35,10 +34,6 @@ contract PoolHarness is PoolInstance {
return _reserves[asset].liquidityIndex;
}

function getReserveStableBorrowRate(address asset) public view returns (uint256) {
return _reserves[asset].currentStableBorrowRate;
}

function getReserveVariableBorrowIndex(address asset) public view returns (uint256) {
return _reserves[asset].variableBorrowIndex;
}
Expand Down
25 changes: 5 additions & 20 deletions certora/harness/ReserveConfigurationHarness.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.19;
pragma experimental ABIEncoderV2;

import {ReserveConfiguration} from '../munged/core/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';
import {DataTypes} from '../munged/core/contracts/protocol/libraries/types/DataTypes.sol';
import {ReserveConfiguration} from '../munged/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';
import {DataTypes} from '../munged/contracts/protocol/libraries/types/DataTypes.sol';

contract ReserveConfigurationHarness {
DataTypes.ReserveConfigurationMap public reservesConfig;
Expand Down Expand Up @@ -130,18 +131,6 @@ contract ReserveConfigurationHarness {
return ReserveConfiguration.getBorrowingEnabled(reservesConfig);
}

// Enables or disables stable rate borrowing on the reserve
function setStableRateBorrowingEnabled(bool enabled) public {
DataTypes.ReserveConfigurationMap memory configNew = reservesConfig;
ReserveConfiguration.setStableRateBorrowingEnabled(configNew, enabled);
reservesConfig.data = configNew.data;
}

// Gets the stable rate borrowing state of the reserve
function getStableRateBorrowingEnabled() public view returns (bool) {
return ReserveConfiguration.getStableRateBorrowingEnabled(reservesConfig);
}

// Sets the reserve factor of the reserve
function setReserveFactor(uint256 reserveFactor) public {
DataTypes.ReserveConfigurationMap memory configNew = reservesConfig;
Expand Down Expand Up @@ -301,16 +290,14 @@ contract ReserveConfigurationHarness {

// Executes a setter of a bool parameter according to the given id
function executeBoolSetterById(uint256 id, bool val) public {
require(id >= 0 && id <= 5);
require(id >= 0 && id <= 4);
if (id == 0) {
setActive(val);
} else if (id == 1) {
setFrozen(val);
} else if (id == 2) {
setBorrowingEnabled(val);
} else if (id == 3) {
setStableRateBorrowingEnabled(val);
} else if (id == 4) {
setPaused(val);
} else {
setBorrowableInIsolation(val);
Expand All @@ -319,16 +306,14 @@ contract ReserveConfigurationHarness {

// Executes a getter of a bool parameter according to the given id
function executeBoolGetterById(uint256 id) public view returns (bool) {
require(id >= 0 && id <= 5);
require(id >= 0 && id <= 4);
if (id == 0) {
return getActive();
} else if (id == 1) {
return getFrozen();
} else if (id == 2) {
return getBorrowingEnabled();
} else if (id == 3) {
return getStableRateBorrowingEnabled();
} else if (id == 4) {
return getPaused();
} else {
return getBorrowableInIsolation();
Expand Down
4 changes: 2 additions & 2 deletions certora/harness/SimpleERC20.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: agpl-3.0
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.19;

import {IERC20} from '../munged/core/contracts/dependencies/openzeppelin/contracts/IERC20.sol';
import {IERC20} from '../munged/contracts/dependencies/openzeppelin/contracts/IERC20.sol';

/**
A simple ERC implementation used as the underlying_asset for the verification process.
Expand Down
17 changes: 0 additions & 17 deletions certora/harness/StableDebtTokenHarness.sol

This file was deleted.

3 changes: 2 additions & 1 deletion certora/harness/SymbolicPriceOracle.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.19;

import {IPriceOracleGetter} from '../munged/interfaces/IPriceOracleGetter.sol';
import {IPriceOracleGetter} from '../munged/contracts/interfaces/IPriceOracleGetter.sol';

contract SymbolicPriceOracle is IPriceOracleGetter {
address public base;
Expand Down
7 changes: 4 additions & 3 deletions certora/harness/UserConfigurationHarness.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.19;
pragma experimental ABIEncoderV2;

import {UserConfiguration} from '../munged/core/contracts/protocol/libraries/configuration/UserConfiguration.sol';
import {DataTypes} from '../munged/core/contracts/protocol/libraries/types/DataTypes.sol';
import {PoolStorage} from '../munged/core/contracts/protocol/pool/PoolStorage.sol';
import {UserConfiguration} from '../munged/contracts/protocol/libraries/configuration/UserConfiguration.sol';
import {DataTypes} from '../munged/contracts/protocol/libraries/types/DataTypes.sol';
import {PoolStorage} from '../munged/contracts/protocol/pool/PoolStorage.sol';

/*
A wrapper contract for calling functions from the library UserConfiguration.
Expand Down
6 changes: 3 additions & 3 deletions certora/harness/VariableDebtTokenHarness.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.19;

import {VariableDebtTokenInstance} from '../munged/core/instances/VariableDebtTokenInstance.sol';
import {WadRayMath} from '../munged/core/contracts/protocol/libraries/math/WadRayMath.sol';
import {IPool} from '../munged/core/contracts/interfaces/IPool.sol';
import {VariableDebtTokenInstance} from '../munged/contracts/instances/VariableDebtTokenInstance.sol';
import {WadRayMath} from '../munged/contracts/protocol/libraries/math/WadRayMath.sol';
import {IPool} from '../munged/contracts/interfaces/IPool.sol';

contract VariableDebtTokenHarness is VariableDebtTokenInstance {
using WadRayMath for uint256;
Expand Down
5 changes: 0 additions & 5 deletions certora/specs/NEW-pool-base.spec
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ methods {
function _.getACLManager() external => DISPATCHER(true);
//function _.isBridge(address) external => DISPATCHER(true);

// StableDebt
function _.mint(address user, address onBehalfOf, uint256 amount, uint256 rate) external => DISPATCHER(true);
function _.burn(address user, uint256 amount) external => DISPATCHER(true);
function _.getSupplyData() external => DISPATCHER(true);

// variableDebt
function _.burn(address user, uint256 amount, uint256 index) external => DISPATCHER(true);

Expand Down
Loading
Loading