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

feat: add l2Pool and configurator diffs #35

Merged
merged 16 commits into from
Oct 1, 2024
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.
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**

sakulstra marked this conversation as resolved.
Show resolved Hide resolved
#### 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.
9 changes: 4 additions & 5 deletions certora/basic/harness/DummyContract.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

contract DummyContract {
function havoc_all_dummy() external {
// havoc_all_dummy_internal();
}
function havoc_all_dummy() external {
// havoc_all_dummy_internal();
}

//function havoc_all_dummy_internal() internal {}
//function havoc_all_dummy_internal() internal {}
}
24 changes: 16 additions & 8 deletions certora/basic/harness/EModeConfigurationHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,29 @@ contract EModeConfigurationHarness {

function setCollateral(uint256 reserveIndex, bool enabled) public {
DataTypes.EModeCategory memory emode_new = eModeCategory;
eModeCategory.collateralBitmap = EModeConfiguration.setReserveBitmapBit(emode_new.collateralBitmap, reserveIndex, enabled);
eModeCategory.collateralBitmap = EModeConfiguration.setReserveBitmapBit(
emode_new.collateralBitmap,
reserveIndex,
enabled
);
}

function isCollateralAsset(uint256 reserveIndex) public returns (bool) {
return EModeConfiguration.isReserveEnabledOnBitmap(eModeCategory.collateralBitmap, reserveIndex);
return
EModeConfiguration.isReserveEnabledOnBitmap(eModeCategory.collateralBitmap, reserveIndex);
}



function setBorrowable(uint256 reserveIndex,bool enabled) public {
function setBorrowable(uint256 reserveIndex, bool enabled) public {
DataTypes.EModeCategory memory emode_new = eModeCategory;
eModeCategory.borrowableBitmap = EModeConfiguration.setReserveBitmapBit(emode_new.borrowableBitmap, reserveIndex, enabled);
eModeCategory.borrowableBitmap = EModeConfiguration.setReserveBitmapBit(
emode_new.borrowableBitmap,
reserveIndex,
enabled
);
}

function isBorrowableAsset(uint256 reserveIndex) public returns (bool) {
return EModeConfiguration.isReserveEnabledOnBitmap(eModeCategory.borrowableBitmap, reserveIndex);
return
EModeConfiguration.isReserveEnabledOnBitmap(eModeCategory.borrowableBitmap, reserveIndex);
}
}
20 changes: 10 additions & 10 deletions certora/basic/harness/PoolInstanceHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ import {DataTypes} from '../munged/contracts/protocol/libraries/types/DataTypes.
import {ReserveLogic} from '../munged/contracts/protocol/libraries/logic/ReserveLogic.sol';
import {WadRayMath} from '../munged/contracts/protocol/libraries/math/WadRayMath.sol';

import {DummyContract} from "./DummyContract.sol";

import {DummyContract} from './DummyContract.sol';

contract PoolInstanceHarness is PoolInstance {
DummyContract DUMMY;

constructor(IPoolAddressesProvider provider) PoolInstance(provider) {}

function cumulateToLiquidityIndex(address asset,
uint256 totalLiquidity,
uint256 amount
) external returns (uint256) {
function cumulateToLiquidityIndex(
address asset,
uint256 totalLiquidity,
uint256 amount
) external returns (uint256) {
return ReserveLogic.cumulateToLiquidityIndex(_reserves[asset], totalLiquidity, amount);
}

Expand All @@ -34,12 +34,12 @@ contract PoolInstanceHarness is PoolInstance {
function havoc_all() public {
DUMMY.havoc_all_dummy();
}

function rayMul(uint256 a, uint256 b) external returns (uint256) {
return WadRayMath.rayMul(a,b);
return WadRayMath.rayMul(a, b);
}

function rayDiv(uint256 a, uint256 b) external returns (uint256) {
return WadRayMath.rayDiv(a,b);
return WadRayMath.rayDiv(a, b);
}
}
2 changes: 1 addition & 1 deletion certora/stata/harness/pool/SymbolicLendingPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ contract SymbolicLendingPool {
res.isolationModeTotalDebt = reserveLegacy.isolationModeTotalDebt;
return res;
}

function getReserveDataExtended(
address asset
) external view returns (DataTypes.ReserveData memory) {
Expand Down
115 changes: 0 additions & 115 deletions changelog/3.2.md

This file was deleted.

Loading
Loading