Dazzling Coral Sheep - the if (_isOracleStale() || isOraclePaused)
check doesnt revert when oracle is stale or paused
#94
Labels
Won't Fix
The sponsor confirmed this issue will not be fixed
Dazzling Coral Sheep
Medium
the
if (_isOracleStale() || isOraclePaused)
check doesnt revert when oracle is stale or pausedSummary
the
if (_isOracleStale() || isOraclePaused)
check return is wrongVulnerability Detail
in
getEarningPower
andgetNewEarningPower
we can see there is theif (_isOracleStale() || isOraclePaused)
check doesnt revert when oracle is stale or paused and returns_amountStaked
if oracle is stale or paused but the problem is it should't return the_amountStaked
because this already going to be returned if_isDelegateeEligible(_delegatee)
and not when oracle is stale or pausedImpact
the function doesnt revert when the oracle is stale or paused, hence oracle being stale or paused makes no changes
Code Snippet
as you saw it doesnt makes any sense at all that this check doesnt prevent anything at all
https://github.com/sherlock-audit/2024-11-tally/blob/b125d1f2b52170a3789b1060a52fc6609e6e2262/staker/src/BinaryEligibilityOracleEarningPowerCalculator.sol#L130-L158
Tool used
Manual Review
Recommendation
The text was updated successfully, but these errors were encountered: