The performUpkeep function calls marketMakingEngine.convertAccumulatedFeesToWeth, which may involve external calls (e.g., to a DEX adapter). If the external contract is malicious or compromised, it could re-enter the performUpkeep function, potentially leading to unexpected behavior or loss of funds.
The function calls marketMakingEngine.convertAccumulatedFeesToWeth, which may involve an external call to a DEX adapter or another contract.
If the external contract (e.g., DEX adapter) is malicious, it can call back into the performUpkeep function before the original call completes.
During reentrancy, the state of the contract (e.g., fee balances, market data) may be inconsistent, allowing the attacker to manipulate the system.
Reentrancy could allow an attacker to manipulate the state of the contract or drain funds.
Manual Code review
To prevent reentrancy, use OpenZeppelin's ReentrancyGuard and mark the performUpkeep function as nonReentrant
Adding a reentrancy guard (nonReentrant modifier) ensures that the function cannot be re-entered during execution, mitigating the vulnerability.\
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.