Missing deadline parameter in `swapExactIn` and `swapExactOut` functions in `UniswapSettlement.sol` allowing outdated slippage and allowing pending transactions to be executed unexpectedly
Audit: 2024-05-predy-findings
Severity: MEDIUM

# Lines of code

https://github.com/code-423n4/2024-05-predy/blob/a9246db5f874a91fb71c296aac6a66902289306a/src/settlements/UniswapSettlement.sol#L22-L56


# Vulnerability details

## Title
Missing deadline parameter in `swapExactIn` and `swapExactOut` functions in `UniswapSettlement.sol` allowing outdated slippage and allowing pending transactions to be executed unexpectedly

## Impact
Potential loss of funds/tokens for users due to transactions executing at unfavorable rates if delayed.

## Proof of Concept

AMMs provide their users with an option to limit the execution of their pending actions, such as swaps or adding and removing liquidity. The most common solution is to include a deadline timestamp as a parameter (for example see [UniswapV2](https://github.com/Uniswap/v2-periphery/blob/0335e8f7e1bd1e8d8329fd300aea2ef2f36dd19f/contracts/UniswapV2Router02.sol#L70C35-L70C35) and [Uniswap V3](https://github.com/Uniswap/v3-periphery/blob/6cce88e63e176af1ddb6cc56e029110289622317/contracts/SwapRouter.sol#L119). If such an option is not present, users can unknowingly perform bad trades.

For instance, imagine Alice wants to exchange 100 tokens for 1 WETH and later sell that 1 WETH for 1000 DAI. She submits the transaction to the mempool but sets a transaction fee too low to attract miners. As a result, her transaction remains pending in the mempool for an extended period, potentially lasting hours, days, weeks, or even longer.

Eventually, when the average gas fee decreases enough to make her transaction appealing to miners, it will be executed. However, during this waiting period, the price of WETH could have fluctuated significantly. Although Alice will still receive 1 WETH, the DAI value of that WETH might be substantially lower. Consequently, she ends up making a poor trade due to the forgotten pending transaction.

https://github.com/code-423n4/2024-05-predy/blob/a9246db5f874a91fb71c296aac6a66902289306a/src/settlements/UniswapSettlement.sol#L22-L56

The functions `swapExactIn` and `swapExactOut` in `UniswapSettlement.sol` use the following methods to swap tokens:

```solidity
function swapExactIn(
    address,
    address baseToken,
    bytes memory data,
    uint256 amountIn,
    uint256 amountOutMinimum,
    address recipient
) external override returns (uint256 amountOut) {
    ERC20(baseToken).safeTransferFrom(msg.sender, address(this), amountIn);
    ERC20(baseToken).approve(address(_swapRouter), amountIn);

    amountOut = _swapRouter.exactInput(
        ISwapRouter.ExactInputParams(data, recipient, block.timestamp, amountIn, amountOutMinimum)
    );
}
```

```solidity
function swapExactOut(
    address quoteToken,
    address,
    bytes memory data,
    uint256 amountOut,
    uint256 amountInMaximum,
    address recipient
) external override returns (uint256 amountIn) {
    ERC20(quoteToken).safeTransferFrom(msg.sender, address(this), amountInMaximum);
    ERC20(quoteToken).approve(address(_swapRouter), amountInMaximum);

    amountIn = _