Skip to content

Commit 24fbdcd

Browse files
committed
feat: use rebate pool total stake to skip calculations when zero
1 parent 9f3f87b commit 24fbdcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contracts/staking/libs/Rebates.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ library Rebates {
8787
uint256 rebateReward = 0;
8888

8989
// Calculate the rebate rewards for the indexer
90-
if (pool.fees > 0 && _indexerEffectiveAllocatedStake > 0) {
90+
if (pool.fees > 0 && pool.effectiveAllocatedStake > 0) {
9191
rebateReward = LibCobbDouglas.cobbDouglas(
9292
pool.fees, // totalRewards
9393
_indexerFees,

0 commit comments

Comments
 (0)