The function _approve could cause the issue of double spending. In a certain moment an spender could use all or part of the funds and in just that moment the approver sets a new limit of allowance overwritting the previous. In this way the spender could use more funds than desired.
Likelihood:
Medium. It is not that easy a user could spend at the same moment that the approver is setting a new allowance. But could happen if the spender monitorize the transactions.
Impact:
High. The spender could use more funds that intended by the approver.
The user sets a limit of allowance. Let's say 2 ETH.
The spender uses 1 ETH of 2.
At the same moment the approver sets a new limit of 3 ETH.
As consequence, the spender could potentially spend 4 ETH (one ETH spent already, and the 3 set as a new limit)
Instead of using _approve function. Could be created the functions increaseAllowance and decreaseAllowance.
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.
The contest is complete and the rewards are being distributed.