Beginner FriendlyFoundryBridge
100 EXP
View results
Submission Details
Severity: medium
Invalid

Ignored Return Value in Token Approval Function

Summary

Missing return value in approveTo

Vulnerability Details

Within the approveTo function in the L1Vault contract, the return value of the token.approve(target, amount) function call is ignored. This function is responsible for allowing the contract owner to approve an external address to spend a defined amount of a token. However, the contract does not handle the return value of this approval function, potentially leaving the contract unaware of any failures or issues that might arise during the approval process.

Impact

The impact of this oversight could lead to potential vulnerabilities if the token approval process fails due to various reasons such as insufficient gas, invalid address, or other unforeseen issues. Without handling this return value, the contract might proceed assuming the approval was successful, leading to unexpected behavior or vulnerabilities if the approval didn’t actually occur.

Tools Used

Static analysis [slither] + manual inspection

Recommendations

Handle Return Values: Ensure the return value of the token.approve(target, amount) function call is properly handled within the contract code. This includes implementing logic to respond to potential failures in the approval process.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.