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

Reward distribution can be called multiple times for the same campaign #48

Open
hats-bug-reporter bot opened this issue May 29, 2024 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@hats-bug-reporter
Copy link

Github username: @skypper
Twitter username: tudoratu
Submission hash (on-chain): 0x0c4f668567bc6045f828f9c0ea56129743e2a4d14a6db4f85399a45bd0abcd62
Severity: medium

Description:
Description
The method distributeRewards can be called again for the same campaign to correct a mistake.
If in the meanwhile a claim could have been processed and it is irreversible. and could drain the funds which by right should be assigned to another address.

The likelyhood of this issue is very low, however the severity is medium.
Attack Scenario\

  1. The updater account performs distributeRewardsand assigns 1 WETH to Alice and 1 WETH to Bob.
  2. Bob claims the 1 WETH.
  3. The updater noticed the assignment should be 2 WETH to Alice and no WETH to Bob and performs another distributeRewards.

Now it is too late as Bob has already claimed 1 WETH and Alice can only claim 1 WETH (instead of 2).

@hats-bug-reporter hats-bug-reporter bot added the bug Something isn't working label May 29, 2024
@luzzif
Copy link

luzzif commented May 29, 2024

The backend is coded so that claims are ever-increasing. A claim can never be reduced in quantity, only increased, and the smart contract keeps track of how much reward has already been claimed so double claim risks are neutralized.

@luzzif luzzif added the invalid This doesn't seem right label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant