Description:Description\
In LMPStrategy::navUpdate the internal function clearExpiredPause is called. This function returns true/false. However the return value is not taken in consideration. If we take a look at rebalanceSuccessfullyExecuted(), the return value is taken into consideration and if it returns false, _swapCostOffsetPeriod = swapCostOffsetPeriodInDays(); is performed.
Github username: @https://github.com/Pavel2202 Twitter username: https://twitter.com/timenov_pavel Submission hash (on-chain): 0xba140e5818ab14119cba829e8804bc9b480ed1be54d8cd40ae6bdc9728b98ef6 Severity: low
Description: Description\ In
LMPStrategy::navUpdate
the internal functionclearExpiredPause
is called. This function returnstrue/false
. However the return value is not taken in consideration. If we take a look atrebalanceSuccessfullyExecuted()
, the return value is taken into consideration and if it returnsfalse
,_swapCostOffsetPeriod = swapCostOffsetPeriodInDays();
is performed.https://github.com/hats-finance/Tokemak-0x4a2d708ea6b0c04186ecb774cfad1e50fb5efc0b/blob/74b397ce988a418a1bd02a45716cfc964922be26/src/strategy/LMPStrategy.sol#L895
To fix this, do the same as
rebalanceSuccessfullyExecuted()