When calling functions like TimeswapV2Option.mint or TimeswapV2Option.swap, the user will use the callback function like ITimeswapV2OptionMintCallback.timeswapV2OptionMintCallback or ITimeswapV2OptionSwapCallback.timeswapV2OptionSwapCallback to send some of the corresponding tokens to the relevant contract, such as TimeswapV2Option. Calling functions like TimeswapV2Option.mint or TimeswapV2Option.swap will revert if its call to the following Error.checkEnough function reverts when the token amount transferred through the callback function is not enough. However, if user sends too many tokens through the callback function, the Error.checkEnough function does not revert; when this happens, the extra token amount after the corresponding token balance target is met will be locked in the relevant receiving contract like TimeswapV2Option so the user loses such extra amount.
As a mitigation, the balance < balanceTarget condition in the Error.checkEnough function can be updated to balance != balanceTarget. Alternatively, some logic can be added for returning the sent extra token amount back to the user.
https://github.com/code-423n4/2023-01-timeswap/blob/main/packages/v2-library/src/Error.sol#L151-L153
