Griefing (e.g. no profit motive for an attacker, but damage to the users or the protocol)
Description
Note, this is a submission of a similar bug report from before, but only on a different condition that an attacker may be able to do. Since, dilligently mentioned before, integer overflows and underflows will in fact revert for any operations for the most part in the solidity, this issue focuses on zeroing out the reserves rather than causing an underflow, preventing reverts.
Brief/Intro
Essentially an attacker can obtain an AmountOut that would be just enough to zero out the reserve that other users have contributed to, which can impact the overall protocol for that pool.
Vulnerability Details
In Well.sol, there isn't any checks to make sure the AmountOut can't exceed the Reserve Amount, With logic denoting AmountOut from user transfers.
}
This has no checks for AmountOut, and amountOut can be freely called from its initialization from Swapfrom. Called again, the AmountOut which > Reserves and be subtracted from reserves from 2nd function (SwapIn) without any checks to make sure the reserves aren't impacted by an attackers AmountOut that can zero out the reserves potentially that other users have added to.
Impact Details
The impact would primarily be to the users who've contributed to the protocol, causing damage to the overall reserves, but the attacker wouldn't necessarily benefit.
// Attacker utilizes this function to cause reserve damages. function
getSwapIn( IERC20 fromToken, IERC20 toToken, uint256 amountOut )
external view readOnlyNonReentrant returns (uint256 amountIn);
}
contract Well { address immutable Well2 = 0xBA51AAAA95aeEFc1292515b36D86C51dC7877773;
After reviewing your report, we have decided to close it due to the absence of a PoC.
Our review found that:
assessed impact by the triage team is / is not in scope for the bug bounty program
assessed asset by the triage team is / is not in scope for the bug bounty program
No working PoC was submitted with the report
As per the program policy, A PoC, demonstrating the bug's impact, is required for this program and has to comply with the Immunefi PoC Guidelines and Rules.
We take the triaging of submissions seriously at Immunefi, and our process involves checking the PoC to see if it matches the assessed impact and bug description, as well as verifying the accuracy of the whitehat's claims.
Please note that the Project's team will receive a report of the closed submission and may choose to re-open it at their discretion. However, they are under no obligation to do so.