Skip to content

Commit

Permalink
add invariant
Browse files Browse the repository at this point in the history
  • Loading branch information
haythemsellami committed Jul 5, 2024
1 parent 0994bab commit 6b7546f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/invariant/EulerAggregationLayerInvariants.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ contract EulerAggregationVaultInvariants is EulerAggregationVaultBase {
}
}

function invariant_interestLeft() public view {
EulerAggregationVault.AggregationVaultSavingRate memory aggregationVaultSavingRate =
eulerAggregationVault.getAggregationVaultSavingRate();
uint256 accruedInterest = eulerAggregationVault.interestAccrued();
assertGe(aggregationVaultSavingRate.interestLeft, accruedInterest);
}

function _deployOtherStrategies() private {
eTSTsecond = IEVault(
factory.createProxy(address(0), true, abi.encodePacked(address(assetTST), address(oracle), unitOfAccount))
Expand Down

0 comments on commit 6b7546f

Please sign in to comment.