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

0xlucky - Check for amount to invest is should be less than predefined is not there is addInvestmentRecords() #297

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

Comments

@sherlock-admin4
Copy link

sherlock-admin4 commented Nov 17, 2024

0xlucky

High

Check for amount to invest is should be less than predefined is not there is addInvestmentRecords()

Summary

In invest function, check if kyc address has already invested the max stablecoin-equivalent amount for this round,
or if the total invested for this round has reached the limit is present , but it has been missed in other functions where particular mapping is updated.

Root Cause

It can be the case when particular which is add in particualr functions can exceed the max amount. So ti break the invariant. because the caller has given rights to add, particular amount for each user and round, but amount check is missed.

https://github.com/sherlock-audit/2024-11-vvv-exchange-update/blob/main/vvv-platform-smart-contracts/contracts/vc/VVVVCInvestmentLedger.sol#L256C1-L277C6

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

No response

PoC

No response

Mitigation

check should be put in this function too, which is put in invest()

@sherlock-admin3 sherlock-admin3 changed the title Cool Gauze Walrus - Check for amount to invest is should be less than predefined is not there is addInvestmentRecords() 0xlucky - Check for amount to invest is should be less than predefined is not there is addInvestmentRecords() 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