-
Notifications
You must be signed in to change notification settings - Fork 7
PRAISE - Spender can frontrun setApprovalForERC20() in FootiumEscrow.sol #8
Comments
This is a duplicate for another issue in this list. However, this one has a better suggestion |
Escalate for 10 USDC The finding says that the allowance can be front-run, but it fails to acknowledge the fact that if the spender didn't want to allow the extra allowance to be at risk, they would have sent a approve(0) first in a separate transaction The finding is also logically equivalent to saying that granting allowance to a scammer is a vulnerability, which would be considered out of scope / invalid I would recommend closing as invalid If you believe that the allowance is a honey-pot vector then you should merge it with: #291 |
You've created a valid escalation for 10 USDC! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
This question really doesn't matter much. Can't reach M, suggest low/info. |
Agree with GalloDaSballo, can be a valid low / informational |
Escalation accepted Valid low |
|
PRAISE
high
Spender can frontrun setApprovalForERC20() in FootiumEscrow.sol
Summary
The approve function is frontrunnable.
Vulnerability Detail
Lets say Alice is the owner of these tokens and Bob is the spender:
Impact
It can result in losing tokens when club owner approves ERC20 tokens to any malicious Spender.
Code Snippet
https://github.com/sherlock-audit/2023-04-footium/blob/main/footium-eth-shareable/contracts/FootiumEscrow.sol#L75-L81
Tool used
Manual Review
Recommendation
Use increaseAllowance and decreaseAllowance instead of approve as OpenZeppelin ERC20 implementation. Please see details here:
https://forum.openzeppelin.com/t/explain-the-practical-use-of-increaseallowance-and-decreaseallowance-functions-on-erc20/15103/4
The text was updated successfully, but these errors were encountered: