Closed c4-bot-4 closed 7 months ago
QA at best
0xRobocop marked the issue as primary issue
0xRobocop marked the issue as insufficient quality report
0xRobocop marked the issue as duplicate of #276
3docSec changed the severity to QA (Quality Assurance)
3docSec marked the issue as grade-b
Lines of code
https://github.com/code-423n4/2024-03-ondo-finance/blob/78779c30bebfd46e6f416b03066c55d587e8b30b/contracts/ousg/ousgInstantManager.sol#L567-L573 https://github.com/code-423n4/2024-03-ondo-finance/blob/78779c30bebfd46e6f416b03066c55d587e8b30b/contracts/ousg/ousgInstantManager.sol#L554-L560
Vulnerability details
Impact
Frontrunning
ousgInstantManager::setMintFee()
andousgInstantManager::setRedeemFee()
allows an user to pay less fees.Proof of Concept
Imagine the following scenario:
Bob
is looking to mintOUSG
but he is not sure whether he can get a better deal and pay less feesBob
monitors the mempool and sees thatousgInstantManager::setMintFee()
is called with a higher value than what it wasBob
frontrunsousgInstantManager::setMintFee()
and pays the lower amount of feeBob
instead saw that the fee was lowered instead, he would just wait for the transaction to finish and then proceed with the mintingA similar situation can occur for redeeming as well.
Tools Used
Manual Review
Recommended Mitigation Steps
Depending on the goals of the protocol, there might be different solutions to that issue but since I am not aware of their goals, I can not give a solution tailored to their ideas.
Assessed type
MEV