Description:Description\
In order to keep consistency of how errors are handled it can be considered to slightly alter the code of increaseAllowance.
The method for decreaseAllowance handled arithmetic under flow with a require statement that checks that the resulting subtraction will not error as below
Attack Scenario\
Although this could not be exploited for consistency it can be considered to add checks for arithmetic overflow
Proof of Concept (PoC) File
Please copy and paste to code below into the test directory file EETH.t.sol
The code adds a check to ensure that the increaseAmount added to the currentAllowance variable.
Github username: -- Submission hash (on-chain): 0x7a2fae9da62e384b042714c294fd9299eb43180b62c0243b391dea2dc4cb133c Severity: low
Description: Description\ In order to keep consistency of how errors are handled it can be considered to slightly alter the code of
increaseAllowance
.The method for
decreaseAllowance
handled arithmetic under flow with a require statement that checks that the resulting subtraction will not error as belowHowever the increase allowance would revert with an arithmetic overflow if the user tried to increase to allowance beyond type(uint256).max.
The currently code is below
Attack Scenario\ Although this could not be exploited for consistency it can be considered to add checks for arithmetic overflow
EETH.t.sol
The code adds a check to ensure that theincreaseAmount
added to thecurrentAllowance
variable.