<!-- canonical: https://0xsimao.com/findings/clip-finance-i-fee-refund-batch-sol -->

# Missing fee refund on Batch.sol

Low/Info · Three Sigma · DeFi infrastructure · 10th November, 2023

Finding 3S-Clip Finance-L01 of the Clip Finance Strategies security review.

- Protocol: https://www.clip.finance/
- Report: /reports/clip-finance-i
- Source: https://cdn.sanity.io/files/qoqld077/production/c23d04c8223879d2443221caf3ccb55ac118441a.pdf

---

### Description

The msg.value sent to Batch:deposit() might be [bigger](https://github.com/ClipFinance/strategy-router/blob/master/contracts/Batch.sol#L243-L245) than the depositFeeAmount,
which means that the contract will receive more native than the fee.

### Recommendation

Place a refund mechanism which gives back to the depositor the excess BNB.

### Status

Acknowledged

---

Related findings:

- [Protocol fee from Market.sol is locked](https://0xsimao.com/findings/perennial-v2-fee-market-sol-locked): Perennial V2
- [`ManagedLeveragedVault.sol::deposit()` is missing slippage control](https://0xsimao.com/findings/beraborrow-i-sol-deposit-slippage-control): Beraborrow Managed Dens
- [Fee event is missing in the constructors of BRC20Factory and Vault](https://0xsimao.com/findings/orange-fee-event-constructors-brc20): Orange Bridge
