Skip to content

Commit 39607a3

Browse files
committed
S Feat: Small changes.
1 parent 3febb02 commit 39607a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/mainnet-fork/ERC4626DonationAttack.t.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
}

0 commit comments

Comments
 (0)