uint timePassed = block.timestamp - lastFeeOperationTime;
if (timePassed >= 1 minutes) { /// @audit Can we abuse this in some way? | See ETHOS and eBTC findings
lastFeeOperationTime = block.timestamp;
emit LastFeeOpTimeUpdated(block.timestamp);
}
Will make the decay factor decay slower than intended
Impact
calcDecayedStableCoinBaseRate
calls_minutesPassedSinceLastFeeOp
which rounds down by up to 1 minute - 1https://github.com/blkswnStudio/ap/blob/8fab2b32b4f55efd92819bd1d0da9bed4b339e87/packages/contracts/contracts/TroveManager.sol#L987-L997
This, in conjunction with the logic
_updateLastFeeOpTime
https://github.com/blkswnStudio/ap/blob/8fab2b32b4f55efd92819bd1d0da9bed4b339e87/packages/contracts/contracts/TroveManager.sol#L980-L984
Will make the decay factor decay slower than intended
This finding was found in the ETHOS contest by Chaduke: https://github.com/code-423n4/2023-02-ethos-findings/issues/33