This repository was archived by the owner on Mar 2, 2025. It is now read-only.
ravikiran.web3 - PointTokenVault::execute() function does not check the status of the delegate call and revert on failure #2
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
ravikiran.web3
Medium
PointTokenVault::execute() function does not check the status of the delegate call and revert on failure
Summary
PointTokenVault::execute(...)
makes a delegate call and the status of the delegate call is returned to the caller as boolean. It is essentially transferring the responsibility to check the status of the delegate call to the caller itself. This is risk if the caller does not perform the necessary check and executes other logic assumingPointTokenVault::execute(...)
ran fine.It is recommended to revert incase the delegate call was not successful blocking the whole transaction.
Root Cause
In the below code snippet, the status for delegate call is read and passed back to the caller.
The recommendation is to revert in the
PointTokenVault::execute(...)
if the delegate function fails.https://github.com/sherlock-audit/2024-07-sense-points-marketplace/blob/main/point-tokenization-vault/contracts/PointTokenVault.sol#L365-L373
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
As
PointTokenVault::execute(...)
is an external function and hence might not be able to enforce a revert return, it is recommended that thePointTokenVault::execute(...)
reverts incase the delegate call fails.PoC
No response
Mitigation
Revise the execute function as below.
The text was updated successfully, but these errors were encountered: