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

0xLeveler - user tokens can be claimed by anyone #280

Open
sherlock-admin4 opened this issue Nov 17, 2024 · 0 comments
Open

0xLeveler - user tokens can be claimed by anyone #280

sherlock-admin4 opened this issue Nov 17, 2024 · 0 comments

Comments

@sherlock-admin4
Copy link

sherlock-admin4 commented Nov 17, 2024

0xLeveler

High

user tokens can be claimed by anyone

Summary

while a user submits the claimParams the tokens are sent to the caller of the function, which is anyone that can see the transaction in the mempool and frontrun the actual owner.

Root Cause

This is the entire claim function with insufficient validation
https://github.com/sherlock-audit/2024-11-vvv-exchange-update/blob/main/vvv-platform-smart-contracts/contracts/vc/VVVVCTokenDistributor.sol#L106-L136

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

  1. user calls the claim function with valid claim params signed offchain by the signer.
  2. any other user can see this claim in the mempool and submit it to withdraw all the user tokens due to lack of validation

Impact

Loss of investment returns for the user

PoC

No response

Mitigation

add validation to ensure that the claim is for the kycAddress that invested in the first place.

@sherlock-admin3 sherlock-admin3 changed the title Upbeat Red Duck - user tokens can be claimed by anyone 0xLeveler - user tokens can be claimed by anyone Nov 23, 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