Closed code423n4 closed 1 year ago
minhquanym marked the issue as primary issue
Liquidator could use private mem pool
0xShaito marked the issue as sponsor disputed
Liquidators should always use a private mempool
dmvt marked the issue as unsatisfactory: Overinflated severity
Lines of code
https://github.com/code-423n4/2023-07-amphora/blob/main/core/solidity/contracts/core/VaultController.sol#L646-L697
Vulnerability details
Impact
The
liquidateVault
function can be frontrunned every time by any bot frontrunner watching to this function in the mempool.Proof of Concept
Since the function basically only cares if the vault is underwater every time anyone would see the opportunity to liquidate a vault they would get front-runned by a bot watching this function. It would heavily discourage people from finding these under the water vaults to gain some rewards since the reward would go to the bot frontrunner.
Tools Used
Manual Review
Recommended Mitigation Steps
implement some logic to make sure the first liquidator gets the reward, if it doesnt work take a look at private transactions, it might help
Assessed type
MEV