File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ contract ERC4626DonationAttack is ERC4626DonationAttackTestBase {
103103 vm.prank (relayer);
104104 uint256 shares = mainnetController.depositERC4626 (address (morphoVault), 2_000_000e18 );
105105
106+ // We can compute:
106107 // shares == assets * (totalSupply + 1) / (totalAssets + 1)
107108 // == 2_000_000e18 * (1 + 1) / (1_000_000e18 + 1 + 1)
108109 // == 3.9..
@@ -126,6 +127,7 @@ contract ERC4626DonationAttack is ERC4626DonationAttackTestBase {
126127
127128 function _doAttack () internal {
128129 Market memory market = morpho.market (marketId);
130+
129131 assertEq (market.totalSupplyAssets, 36_095_481.319542091092211965e18 ); // ~36M USDS
130132 assertEq (market.totalSupplyShares, 36_095_481.319542091092211965000000e24 );
131133
@@ -157,5 +159,5 @@ contract ERC4626DonationAttack is ERC4626DonationAttackTestBase {
157159
158160 deal (address (usds), address (almProxy), 2_000_000e18 );
159161 }
160- }
161162
163+ }
You can’t perform that action at this time.
0 commit comments