Absence of slippage protection could lead to execution at very high prices due to frontrunning attacks. #245
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-397
edited-by-warden
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2023-12-revolutionprotocol/blob/d42cc62b873a1b2b44f57310f9d4bbfdd875e8d6/packages/revolution/src/ERC20TokenEmitter.sol#L152
Vulnerability details
Vulnerability Details:
The ERC20TokenEmitter contract features a buyToken() method enabling users to acquire governance ERC20VotesToken, with token prices determined by a linear VRGDA contract. This contract's pricing mechanism relies on daily emissions. However, a critical issue arises as users are unable to specify slippage. In the absence of slippage protection, malicious users could front-run trades, increasing the emission schedule. For instance, if a user wants to buy tokens, a malicious user could front run the trade causing an increase in emission schedule, The user's trade would be executed at unexpectedly higher prices. This vulnerability poses a risk of adverse execution outcomes for users.
Impact:
Users would be forced to accept trades at very bad prices.
Proof of Concept:
Tools Used
Vscodium
Recommended Mitigation Steps:
Add a slippage parameter to the buyToken method , to determine minimum acceptable amounts by the users.
Assessed type
MEV
The text was updated successfully, but these errors were encountered: