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

redbeans - user can void getting penalty by front running setPenaltyPercentages . #271

Open
sherlock-admin2 opened this issue Nov 13, 2024 · 0 comments

Comments

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Nov 13, 2024

redbeans

Medium

user can void getting penalty by front running setPenaltyPercentages .

Summary

In AirdropDistribution:claim, user can claim for airdrop using 4 options lets consider options 2 and 3 :

  1. Tax Paid Early Claim (Top 80% - Tax paid): These users, while originally part of a vesting schedule, can pay a tax to skip the vesting. Once the tax is paid, they can claim the total amount directly without waiting for monthly releases.
  2. Vested Claim (Top 80% - No Tax Paid): These users must follow the vesting schedule, which allows monthly claims between January 12th and June 12th.

If the user misbehaves then penalty is applied to the user but User can frontrun setPenaltyPercentages function by paying tax early and claiming.

Root cause

In AirdropDistribution:claim, there is no check to prevent frontrunning of setPenaltyPercentages.

Internal pre-conditions

NO_RESPONSE

External pre-conditions

  1. User should in group Top 80.

Attack Path

  1. User misbehaves which will get him penaltied.
  2. User front-runs setPenaltyPercentages transaction , pays tax and calls claim AirdropDistribution:claim to claim all airdrop from all vesting scheldule .
  3. User receives tokens without getting penaltied.

Impact

user can avoid penaltied by fron running setPenaltyPercentages

POC

NO_RESPONSE

Migation

we could prevent frontrun by using timelocks but not sure how we could prevent user who has already paid tax .

@sherlock-admin4 sherlock-admin4 changed the title Brisk Mango Starfish - user can void getting penalty by front running setPenaltyPercentages . redbeans - user can void getting penalty by front running setPenaltyPercentages . Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant