@@ -10,7 +10,7 @@ import {FeaturePausable} from "src/utils/FeaturePausable.sol";
1010contract FinalizationTest is Test , SetupWithdrawalQueue {
1111 function setUp () public override {
1212 super .setUp ();
13- pool.depositETH {value: 100_000 ether }(address (this ), address (0 ));
13+ pool.depositETH {value: 10_000 ether }(address (this ), address (0 ));
1414 }
1515
1616 // Basic Finalization
@@ -433,6 +433,41 @@ contract FinalizationTest is Test, SetupWithdrawalQueue {
433433 // Check finalized request has correct ETH amount unaffected by rewards
434434 assertEq (withdrawalQueue.getClaimableEther (requestId), expectedEth);
435435 }
436+
437+ // Exceeding Minted StETH
438+
439+ function test_Finalize_MultipleRequestsWithExceedingSteth () public {
440+ uint256 mintedStethShares = pool.totalMintingCapacitySharesOf (address (this )) / 3 * 3 ;
441+ pool.mintStethShares (mintedStethShares);
442+
443+ // Initially no exceeding minted steth
444+ assertEq (pool.totalExceedingMintedStethShares (), 0 );
445+
446+ // Create multiple withdrawal requests with enough stv to cover liability
447+ uint256 stvPerRequest = pool.balanceOf (address (this )) / 3 ;
448+ withdrawalQueue.requestWithdrawal (address (this ), stvPerRequest, mintedStethShares / 3 );
449+ withdrawalQueue.requestWithdrawal (address (this ), stvPerRequest, mintedStethShares / 3 );
450+ withdrawalQueue.requestWithdrawal (address (this ), stvPerRequest, mintedStethShares / 3 );
451+
452+ assertEq (withdrawalQueue.getLastRequestId (), 3 );
453+
454+ // Simulate vault rebalance to create exceeding minted steth
455+ uint256 liabilityShares = dashboard.liabilityShares ();
456+ assertGt (liabilityShares, 0 );
457+ dashboard.rebalanceVaultWithShares (liabilityShares / 2 );
458+
459+ // Exceeding minted steth should now be present
460+ assertGt (pool.totalExceedingMintedStethShares (), 0 );
461+
462+ // Finalize all requests
463+ _finalizeRequests (3 );
464+
465+ // Verify no unfinalized requests remain
466+ assertEq (withdrawalQueue.unfinalizedRequestsNumber (), 0 );
467+
468+ // Exceeding steth should be consumed during finalization
469+ assertEq (pool.totalExceedingMintedStethShares (), 0 );
470+ }
436471}
437472
438473contract RevertingFinalizer {
0 commit comments