ReaperVaultV2 share price manipulation #533
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-848
grade-b
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2023-02-ethos/blob/main/Ethos-Vault/contracts/ReaperVaultV2.sol#L319
Vulnerability details
Impact
Underlying token can be stolen from depositors in ReaperVaultV2
Proof of Concept
(19e18 * 1) / 10e18 = 1
Tools Used
Manual Review
Recommended Mitigation Steps
Add a minimum deposit size for the first deposit, or add "virtual" assets and shares when doing conversions.
Example: https://github.com/boringcrypto/YieldBox/blob/0d150234f855ff2e1319159ef1e835f0d5ea9d3c/contracts/YieldBoxRebase.sol#L24-L29
The text was updated successfully, but these errors were encountered: