<!-- canonical: https://0xsimao.com/findings/maple-finance-syrup-balancer-swap-deadline -->

# Deadline parameter in SyrupUserActions::_swapViaBalancer() could be set to minimize MEV

Low/Info · Three Sigma · Permissionless lending · 23rd August, 2024

Finding 3S-SY-L01 of the Maple Syrup security review.

- Protocol: https://maple.finance/
- Report: /reports/maple-finance-syrup
- Source: https://github.com/0xsimao/audits/blob/main/Three%20Sigma/2024-08-23-maple-finance-syrup.pdf

---

### Description

SyrupUserActions sets a minimum amount out limit to prevent excessive MEV. However, as the deadline parameter is set to `block.timestamp` there is still some room for MEV.

### Recommendation

Send a deadline parameter instead of hardcoding 0 to further mitigate MEV.

---

Related findings:

- [Deadline in Ole swap could be sent as a parameter to further prevent MEV](https://0xsimao.com/findings/districtone-deadline-ole-further-mev): DistrictOne
- [mTapiocaOFT can't be rebalanced because the Balancer in tapiocaz-audit calls swapETH() or swap() of the RouterETH but does not forward ether for the message fee](https://0xsimao.com/findings/tapioca-dao-rebalanced-balancer-eth-fee): Tapioca DAO
- [Swapping with deadline as block.timestamp and 0 minimum amount out is vulnerable to MEV](https://0xsimao.com/findings/clip-finance-i-swapping-deadline-timestamp-mev): Clip Finance Strategies
- [Lack of deadline in PowerToken.buy can lead to user's cashToken being distributed through ZeroToken holders](https://0xsimao.com/findings/m-0-deadline-cash-through-zero): M^0 Minter Gateway
