<!-- canonical: https://0xsimao.com/findings/singularity-uniswap-managers-slippage-checks -->

# Uniswap asset managers are missing slippage checks

Medium · Three Sigma · Private DeFi access · 26th February, 2024

Finding 3S-SG-M03 of the Singularity security review.

- Protocol: https://www.thesingularity.network/
- Report: /reports/singularity
- Source: https://cdn.sanity.io/files/qoqld077/production/45b8aac56a2b8e3b557df4329ac9bf8220b64012.pdf

---

### Description

All Uniswap [interactions](https://github.com/portalgateme/darkpool-v1-zk-contracts-fork/blob/master/contracts/defi/uniswap/UniswapLiquidityAssetManager.sol#L696-L699) are [missing](https://github.com/portalgateme/darkpool-v1-zk-contracts-fork/blob/master/contracts/defi/uniswap/UniswapLiquidityAssetManager.sol#L748-L750) a deadline argument and are not setting the following
slippage protection arguments in UniswapLiquidityAssetManager:
- amount0Min and amount1Min in MintParams.
- amount0Min and amount1Min in DecreaseLiquidityParams.
UniswapSwapAssetManager [sets](https://github.com/portalgateme/darkpool-v1-zk-contracts-fork/blob/master/contracts/defi/uniswap/UniswapSwapAssetManager.sol#L239C44-L239C56) the minAmountOut value, but is not signed by the user in
the circuit, so it could be gamed.

### Recommendation

These arguments should be part of the proof and the user should sign them to prevent
slippage.

### Status

Addressed in [#8b300f0](https://github.com/portalgateme/darkpool-v1-zk-contracts-fork/commit/8b300f07a28f2c073154c8de3e9e90ba64ef1934).

---

Related findings:

- [`ManagedLeveragedVault::donateCollateral()` is missing a slippage check](https://0xsimao.com/findings/beraborrow-i-managed-donate-collateral-slippage): Beraborrow Managed Dens
- [`ManagedLeveragedVault.sol::deposit()` is missing slippage control](https://0xsimao.com/findings/beraborrow-i-sol-deposit-slippage-control): Beraborrow Managed Dens
- [Throughout code-base: missing address checks.](https://0xsimao.com/findings/maple-finance-iii-throughout-code-address-checks): Maple Finance
- [OstiumTrading::closeTradeMarket() and OstiumTrading::topUpCollateral() are missing pending trigger checks](https://0xsimao.com/findings/ostium-close-trade-top-collateral): Ostium
