Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Frequently bumping to increase earning power may eat depositor rewards #42

Open
CergyK opened this issue Dec 11, 2024 · 2 comments
Open
Labels
Low/Info A Low/Info severity issue.

Comments

@CergyK
Copy link
Collaborator

CergyK commented Dec 11, 2024

Description

The bump mechanism is intended to incentivize keepers to update depositors earning power in exchange for a fee. We can see that in the case the earning power is increased, the keeper can take the whole rewards intended for the depositor :

GovernanceStaker.sol#L489-L491:

    if (_newEarningPower > deposit.earningPower && _unclaimedRewards < _requestedTip) {
        revert GovernanceStaker__InsufficientUnclaimedRewards();
    }

The only constraint is that _requestedTip should be lower than maxBumpTip.

GovernanceStaker.sol#L473:

    if (_requestedTip > maxBumpTip) revert GovernanceStaker__InvalidTip();

This behavior may be expected and may not be a problem with the current implementation of calculator BinaryBinaryEligibilityOracleEarningPowerCalculator, but future implementations may have a more continuous formula for earning power which would result in the ability to bump earning power more frequently.

Impact

Depositor rewards are stolen by keepers

Recommendation

Multiple mitigations may envisioned:

  • Design _isQualifiedForBump calculation in the calculator in order to rate limit bumping
  • Limit bump tip to a fraction of rewards in the increase case
@alexkeating
Copy link

Will document

@CergyK
Copy link
Collaborator Author

CergyK commented Dec 16, 2024

Documented in withtally/staker#90

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Low/Info A Low/Info severity issue.
Projects
None yet
Development

No branches or pull requests

2 participants