Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Low/Info A Low/Info severity issue.
Projects
None yet
Development

No branches or pull requests

2 participants