<!-- canonical: https://0xsimao.com/findings/clip-finance-ii-approve-reverts-return-boolean -->

# PHyperLPoolSwapInside::_swapWithCustomData() .approve() reverts for tokens that don't return a boolean

Low/Info · Three Sigma · DeFi infrastructure · 15th March 2024

Finding 3S-Clip-L04 of the Clip Finance Strategy Upgrade security review.

- Protocol: https://www.clip.finance/
- Report: /reports/clip-finance-strategy-upgrade
- Source: https://github.com/0xsimao/audits/blob/main/Three%20Sigma/2024-03-15-clip-finance-ii.pdf

---

### Description

[PHyperLPoolSwapInside::_swapWithCustomData()](https://github.com/ClipFinance/StrategyRouter-private/pull/107/files#diff-023946f07f510e865612a28a9a222e00f0f6b90a253fd981e9bf4f7656f5497fR581) [uses](https://github.com/ClipFinance/StrategyRouter-private/pull/107/files#diff-023946f07f510e865612a28a9a222e00f0f6b90a253fd981e9bf4f7656f5497fR596) unsafe .approve() which does
not return a bool on some tokens, reverting.

### Recommendation

Use .forceApprove().

### Status

Addressed in [#0c8de23](https://github.com/ClipFinance/StrategyRouter-private/commit/0c8de23862d9fed65f3c1a3fc4eac9a0356ef76e#diff-023946f07f510e865612a28a9a222e00f0f6b90a253fd981e9bf4f7656f5497fR603).

Disclosed by 0xSimao (https://0xsimao.com/).

---

Related findings:

- [safeApprove(...) reverts if approval is different than 0, use safeIncreaseAllowance(...) instead](https://0xsimao.com/findings/fuji-finance-approve-reverts-approval-allowance): Fuji Finance
- [Don't return the same memory variable if your passing it as argument](https://0xsimao.com/findings/fuji-finance-memory-your-passing-argument): Fuji Finance
- [_crossTransfer(...) reverts for smart contracts that don't share the same address on different chains](https://0xsimao.com/findings/fuji-finance-cross-transfer-reverts-share): Fuji Finance
- [Staked tokens inside FluidLocker can be withdrawn without calling Unstake](https://0xsimao.com/findings/superfluid-locker-system-ii-staked-inside-withdrawn-unstake): Superfluid Locker Pumponomics
