<!-- canonical: https://0xsimao.com/findings/more-markets-approval-approving-repayment-loop -->

# Approval is not reset to 0 after approving the markets for wFlow assets repayment in LoopStrategy::onMoreFlashLoan()

Low/Info · Three Sigma · Lending · 2nd December 2024

Finding 3S-MORE-N04 of the MORE Optimizer security review.

- Protocol: https://www.more.markets/
- Report: /reports/more-optimizer
- Source: https://github.com/0xsimao/audits/blob/main/Three%20Sigma/2024-12-02-more-markets.pdf

---

### Description

LoopStrategy::onMoreFlashLoan() does not reset the approval of the markets to 0 after
approving the repayment of wFlow.

### Recommendation

This is not a problem for wFlow, but some tokens revert when approving from a null amount
to a non null amount, so consider resetting the approval.

### Status

Addressed in [#f17f609](https://github.com/MoreLabsXYZ/MORE-Optimizers/commit/f17f609902e27d95cfe08f1a463d1fe0dfc9d0b2).

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

---

Related findings:

- [`FlashRolloverLoan_G5` will not work for certain tokens due to not setting the approval to `0` after repaying a loan](https://0xsimao.com/findings/teller-finance-flash-rollover-approval-repaying): Teller Finance
- [Vesting interest is not reset to 0 in case there is no interest in LoopedVault11::updateTotalAssets()](https://0xsimao.com/findings/yieldoor-ii-vesting-interest-reset-vault11): Yieldoor LoopedVault
- [`FlashRolloverLoan_G5` will fail for `LenderCommitmentGroup_Smart` due to `CollateralManager` pulling collateral from `FlashRolloverLoan_G5`](https://0xsimao.com/findings/teller-finance-flash-rollover-collateral-pulling): Teller Finance
- [Incorrect selector in `FlashRolloverLoan_G5::_acceptCommitment()` does not match `SmartCommitmentForwarder::acceptCommitmentWithRecipient()`](https://0xsimao.com/findings/teller-finance-rollover-match-forwarder-recipient): Teller Finance
