function test_minAmountOut() public {
console.log("");
console.log("Balances of the carbon vault, alice and sender before deposits");
console.log("Here is the value in ETH of the staked RETH and STETH tokens in the carbon vault", diamond.getZethTotal(Vault.CARBON));
console.log("Here is the sender zeth tokens for the carbon vault: ", diamond.getVaultUserStruct(Vault.CARBON, sender).ethEscrowed);
console.log("Here is the begginer zeth tokens for the carbon vault: ", diamond.getVaultUserStruct(Vault.CARBON, alice).ethEscrowed);
deal(_reth, sender, 100 ether);
deal(_steth, alice, 10 ether);
console.log("");
console.log("Balances of alice and sender after dealing them RETH and STETH tokens");
console.log("reth balance of sender: ", reth.balanceOf(sender));
console.log("steth balance of begginer: ", steth.balanceOf(alice));
vm.startPrank(sender);
uint88 deposit1 = 100 ether;
diamond.deposit(_bridgeReth, deposit1);
console.log("");
console.log("Sender deposits 100 RETH");
console.log("Here is the sender zeth tokens for the carbon vault: ", diamond.getVaultUserStruct(Vault.CARBON, sender).ethEscrowed);
console.log("Here is the value in ETH of the staked RETH and STETH tokens in the carbon vault: ", diamond.getZethTotal(Vault.CARBON));
vm.stopPrank();
vm.startPrank(alice);
uint88 deposit2 = 10 ether;
diamond.deposit(_bridgeSteth, deposit2);
console.log("");
console.log("Alice deposits 10 STETH");
console.log("Here is Alice zeth tokens for the carbon vault: ", diamond.getVaultUserStruct(Vault.CARBON, alice).ethEscrowed);
console.log("Here is the value in ETH of the staked RETH and STETH tokens in the carbon vault: ", diamond.getZethTotal(Vault.CARBON));
vm.stopPrank();
uint256 _ethSupply = 0.8 ether;
uint256 _rethSupply = 1 ether;
address reth_address = bridgeReth.getBaseCollateral();
IRocketTokenRETH rocketTokenRETH = IRocketTokenRETH(reth_address);
rocketTokenRETH.submitBalances(_ethSupply, _rethSupply);
console.log("");
console.log("Withdraw fee of the Steth bridge: ", diamond.getBridgeStruct(_bridgeSteth).withdrawalFee);
vm.startPrank(alice);
diamond.withdraw(_bridgeSteth, deposit2);
console.log("");
console.log("Alice withdraws 10 STETH");
console.log("Here is the amount of ZETH tokens in the carbon vault: ", diamond.getVaultStruct(Vault.CARBON).zethTotal);
console.log("Here is the alice zeth tokens for the carbon vault: ", diamond.getVaultUserStruct(Vault.CARBON, alice).ethEscrowed);
console.log("Balance of steth of alice: ", steth.balanceOf(alice));
vm.stopPrank();
}
Balances of the carbon vault, alice and sender before deposits
Here is the value in ETH of the staked RETH and STETH tokens in the carbon vault 0
Here is the amount of ZETH tokens in the carbon vault: 0
Here is the sender zeth tokens for the carbon vault: 0
Here is the begginer zeth tokens for the carbon vault: 0
Balances of alice and sender after dealing them RETH and STETH tokens
reth balance of sender: 100000000000000000000
steth balance of begginer: 10000000000000000000
Sender deposits 100 RETH
Here is the sender zeth tokens for the carbon vault: 100000000000000000000
Here is the value in ETH of the staked RETH and STETH tokens in the carbon vault: 100000000000000000000
Here is the amount of ZETH tokens in the carbon vault: 100000000000000000000
Alice deposits 10 STETH
Here is the alice zeth tokens for the carbon vault: 10000000000000000000
Here is the value in ETH of the staked RETH and STETH tokens in the carbon vault: 110000000000000000000
Here is the amount of ZETH tokens in the carbon vault: 110000000000000000000
Withdraw fee of the Steth bridge: 0
Alice withdraws 10 STETH
Here is the amount of ZETH tokens in the carbon vault: 100000000000000000000
Here is the alice zeth tokens for the carbon vault: 0
Balance of steth of alice: 8181818181818181818