Submitted by cmichel, also found by 0xRajeev
The TridentRouter._depositToBentoBox function only uses the ETH in the contract if its higher then the desired underlyingAmount (address(this).balance >= underlyingAmount)).
Otherwise, the ETH is ignored and the function uses WETH from the user.
Note that the underlyingAmount = bento.toAmount(wETH, amount, true) is computed from the Bento share price and it might happen that it increases from the time the transaction was submitted to the time the transaction is included in a block.
In that case, it might completely ignore the sent ETH balance from the user and in addition transfer the same amount of WETH from the user.
The user can lose their ETH deposit in the contract.
Each batch must use refundETH at the end.
Furthermore, we recommend still depositing address(this).balance ETH into Bento and if its less than underlyingAmount use WETH only for the remaining token difference.
maxsam4 (Sushi) acknowledged
